Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : SD Card Problem
Page 2 of 3 | |||||
Author | Message | ||||
bigmik Guru Joined: 20/06/2011 Location: AustraliaPosts: 2914 |
Hi Rob, Great News... I feel really `chuffed' when I get feed back that things worked as I hoped... I am sure you will be happy and that everything will work as expected for you. The only part of my PCB design I have not yet been able to test is the CAN but the circuit is so simple in that I dont hold any fears about that section (as I did some of the others). Out of Interest have you reprogrammed the UBW32 with the MMBasic Bootloader or still have the UBW bootloader? Regards, Mick Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<< |
||||
Zougie Newbie Joined: 04/10/2012 Location: AustraliaPosts: 18 |
Hey Guys, Just tried Don's test program (thanks Don)and found that pin 1 input did not respond during the a/d test. It only registered 0V whilst all other ports (2-10)worked just fine. Could this be a result of using the UBW native bootloader? I seem to recall pin 1 being used on the UBW32 and suspect that I should have gone with the Maximite bootloader from the beginning. Has anyone else come across this issue? Cheers, George |
||||
bigmik Guru Joined: 20/06/2011 Location: AustraliaPosts: 2914 |
Hi George, If you have the UBW Native bootloader then Pin(1) will not work (I believe in ANY configuration mode) but if you flash the Pic32 with the Colour Maximite Bootloader using a PicKit3 then Pin(1) becomes fully operational. On the UBW32-MCC Board you will also need to link JP1 to get Pin(1) connected to the GPIOa header... I disconnected it as I wasnt sure of the affect of various signals on that pin if the UBW32 was programmed with its native bootloader. (The native bootloader configures B5 --- Pin(1) to be VbusOn thus rendering it unusable) The Colour Maximite Bootloader can be found Here but you will need a PicKit3 to flash it into your UBW32.. I am happy to provide this service for anyone who either wishes to pop in (Melbourne Nth/West subs.) with their UBW or will provide return postage.. PM me if required. Regards, Mick Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<< |
||||
Zougie Newbie Joined: 04/10/2012 Location: AustraliaPosts: 18 |
Hi Mick, I did notice that the jumper JP1 had something to do with pin#1. Thanks for the offer, but fortunately I have access to a Pickit3 here at work. I have already tried flashing the Colour Maximite V4.0 with bootloader software into it without any success. I could get the pickit3 program and verify that all was good, but there was no response when re-powering up the unit. I pretty much got to the point of re-loading the UBW32 bootloader just to confirm that the board was Ok. I'm not sure if there's a hardware configuration needed (i.e. pin set high ot low) during programming of the bootloader. (more than likely not) Are there any memory allocation settings needed in MPLAB prior to programming? I will give it another go with the software link you kindly provied in your last post. Thanks again! Cheers, George |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6098 |
Geoff's instructions worked OK for me and it was my first ever attempt with a Pickit3. To program the PIC32 you must use a hex file that has
"incl bootloader" in its filename. You can program a chip with the normal "update" version but this will not include the bootloader and you will not be able to update it via USB. So... look for the words "incl bootloader". Detailed programming sequence: 1. Start MPLAB (can be downloaded from microchip.com). 2. Make sure no other project/workspace is open by selecting File -> Close Workspace from the toolbar. 3. Select the target device by selecting Configure -> Select Device. 4. Open the Configuration Bits dialog by selecting Configure -> Configuration Bits from the toolbar. Make sure the checkbox labelled 'Configuration bits set in code' is SET. 5. Select the programmer and enable it. 6. Import the HEX file by selecting File -> Import. Importing the hex BEFORE selecting the programmer or target device will cause the HEX file to be cleared from memory, so it is important to do it in the order shown here. 7. Program the device. Make sure that you select the correct processor type. That was the only setting that I had to change. Once programmed will need to remove the J2 jumper (or C13 to ground link) which will now be used to put it into bootloader mode. Jim VK7JH MMedit MMBasic Help |
||||
Zougie Newbie Joined: 04/10/2012 Location: AustraliaPosts: 18 |
Ok gotcha! Thanks Jim. I'll give it another go. I'm just hoping that I don't exceed the manufacturers maximum No# of programming repetitions for the PIC. Cheers, George |
||||
bigmik Guru Joined: 20/06/2011 Location: AustraliaPosts: 2914 |
Gday George, Ok that really sounds to me like you flashed in the version of MMBasic 4.0 that either has 1. bootloader for the Mono Maximite or 2. Color Maximite Hex ONLY Please try this file, it definately has the the Bootloader plus MMBasic 4.0 included. 2012-10-29_070341_ColourMM_Firmware.zip The only other thing I can think of is that you have the PIC32MX795H chip selected instead of the PIC32MX795L chip.. Well actually I have another thought.... You DO have the UBW32 that has the 795 chip on it dont you? There was an early version that had, I think it was, the 440 chip Regards, Mick Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<< |
||||
Zougie Newbie Joined: 04/10/2012 Location: AustraliaPosts: 18 |
Hi Mick, Before I proceed, I'll answer some of your questions. The UBW board is only a couple of weeks old and is fortunately the 795L variety. I'm pretty sure that I'm doing something quite silly with the way I'm programming the pic. I'm using the PICkit3 to power up my device during programming and it's not plugged into the MCC board during programming. I've followed Geoff's instructions as per Jim's post to the T but still no luck. It programs and verifies and after about 20 seconds, it says it's finished. Could it be the way that I'm powering up the device? I'm assuming that since the pic is erased during the programming process, I don't need to hold any pins high or low. If I don't succeed....I'm jumping in the car! Cheers, George |
||||
bigmik Guru Joined: 20/06/2011 Location: AustraliaPosts: 2914 |
Ahhaa, There is a difference George, From my experience with mono Maximite programming I was not able to get the PicKit3 to power it so I had the USB supply the power.. I do the same when I program to UBW32, ie. I supply power to the UBW32 via its own USB cable and have the Pickit3 connected without supplying power. I also dont have it plugged into the UBW32-MCC PCB (cant access the ISP pins plugged in anyway) Also I think mine took more like a minute to complete (but it has been a while since I have done it) Also as Jim said Select the PicKit3 BEFORE Importing the HEX file. Regards, Mick Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<< |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6098 |
You would certainly need to power the UBW32 separately while programming. The Pickit3 can only supply a small amt of power. Jim VK7JH MMedit MMBasic Help |
||||
Zougie Newbie Joined: 04/10/2012 Location: AustraliaPosts: 18 |
So I may not be going crazy after all? That's a relief. I was under the impression that the PICkit3 was supposed to supply enough power to program the PIC32 and all the other Silicon based life forms in the Mirco chip PIC family. I still find it odd that the UBW32 bootloader did load successfully using the PICkit3's power supply. Very stange indeed. As per your last post Jim, I'll try again using an external USB power supply. Thanks again for your thoughts and suggestions and hope that this thread is helping others out there who have come across the same issue. Cheers, George |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6098 |
Being a beginner, I read the Pickit manual while I was waiting for the postman to deliver. From the manual: 2.4.3 Target Powered In the following descriptions, only three lines are active and relevant to core debugger operation: pins 1 (VPP/MCLR), 5 (PGC) and 4 (PGD). Pins 2 (VDD) and 3 (VSS) are shown on Figure 2-4 for completeness. PICkit 3 has two configurations for powering the target device: internal debugger and external target power. The recommended source of power is external and derived from the target application. In this configuration, target VDD is sensed by the debugger to allow level translation for the target low voltage operation. If the debugger does not sense voltage on its VDD line (pin 2 of the interface connector), it will not operate. 2.4.4 Debugger Powered The internal debugger power is limited to 30 mA. This may be of benefit for very small applications that have the device VDD separated from the rest of the application circuit for independent programming, but is not recommended for general usage as it imposes more current demands from the USB power system derived from the PC. Jim VK7JH MMedit MMBasic Help |
||||
Zougie Newbie Joined: 04/10/2012 Location: AustraliaPosts: 18 |
That makes sense to me. I'm thinking that an external power supply is a necessity and if this sorts out my woes, we'll need to make it known to other members. Thanks again Jim. Cheers, George |
||||
Zougie Newbie Joined: 04/10/2012 Location: AustraliaPosts: 18 |
Finally success!!!!! Spent a couple of hours last night trying various things to breath life into the UBW32 MCC including a benchtop power supply and V4.0 software with bootloader. Initially, I had little success. The PIC programmed successfully but was not responsive once reset. Current draw from the power supply was tyically 20ma....not much at all. I then loaded the native UBW32 bootloader and it loaded and instantly came to life. Current draw jumped to 120ma and USB activity was detected at the PC end. I decided to dig deeper and look at the configuration bits. The Maximite configuration I had was somewhat different to the UBW configuration. I became even more curious when I was just how different the clock/oscillator configuration bits were. If these are not configured correctly, the PIC will have nowhere to go. I made the changes to the Maximite V4.0 file configuration bits and tried reprogramming the PIC. This time it came to life and drew the correct 120ma. Also, all of the A/D pins were accessable and the unit has performed as expected. Attched are the settings I used: So it looks like MPLAB configuration bits got me....and am curious how no one else has seen this before.....or have they? Thanks again everyone for all of your support!!! Cheers, George |
||||
BobD Guru Joined: 07/12/2011 Location: AustraliaPosts: 935 |
George, that photo is not the best. Why don't you have another go and attach it as a JPG file and it will be able to be displayed much better. Bob |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6098 |
Glad you have had success. I didn't look at the configuration bits, I just left the setting to "configuration bits set in code" and it worked. I don't know how to find out what settings the code used when I only have the HEX file. And I certainly don't know enough about the PIC's to start playing around! Jim VK7JH MMedit MMBasic Help |
||||
bigmik Guru Joined: 20/06/2011 Location: AustraliaPosts: 2914 |
Great news George, Glad you have it working... we need to investigate exactly what went wrong for you... In my case I installed MPLab then selected the device type, selected the PicKit3 then imported the file and it just worked... Maybe I was lucky but so many others seem to have been `lucky' as well. I cant spend the time investigating it for another 10-12 days due to work commitments but I would like to know the difference from your method to mine... I would be worried about changing the HEX file as what other strange things might be introduced if you change an important bit. Regards, Mick Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<< |
||||
Zougie Newbie Joined: 04/10/2012 Location: AustraliaPosts: 18 |
Mick, I too find it odd that two separate PCs at work and a laptop at home with MPLAB 8.87 all programmed ok, but were setting the config bits differently to what is required for operation. As for the dodgy screenshot I sent through (sorry Bob), I'll put together something more legible. Is anyone else using MBLAB 8.87? I'm wondering if there is something going with this version? If the HEX works for so many people, I'd leave it as it is....and anyway Mick, this the busiest time of the year for you.....you have all those horses to keep track of. Cheers, George |
||||
bigmik Guru Joined: 20/06/2011 Location: AustraliaPosts: 2914 |
I just checked... I am using 8.87 and I checked I have `use configuration bits set in source' checked I am actually afraid of horses.. I would rather face a snarling pitbull.... I actually look after the the totalisator... (betting terminals) and thankfully,, have nothing to do with the horses. Mick Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<< |
||||
Wajkaj Newbie Joined: 03/11/2012 Location: NetherlandsPosts: 14 |
Had exactly the same problem as Zougie. I use Pikit 3 and Mlab 8.50 and Mlab X and both do the same. Thanks to Zougie, i changed the config-bits too and it works. It seems like it is only the config-bits thats giving the problem. The UBW32 works just fine now and i tested all I/O and several programs. No problems so far. Thanks Zougie. Johan. Started with LNW80. |
||||
Page 2 of 3 |
Print this page |