![]() | ![]() | ![]() |
| | |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| Ive run into a strange problem with some code on a PIC18f1320 After I program the chip with a particular code (just a test program that flashes LEDs etc), the pic can no longer be recognised by the programmer. The test code works as it should, but once programmed MPLAB cant recognise the chip anymore. So now I have accumulated several chips and boards (with soldered on chip), that are stuck with this flashing LED software. It does the same thing with a fresh DIP package PIC18f1320 in my ICD2 programmer. My hardware works fine with other code. I want to look into the software, to see what the problem is, but im confused as to whats going on below the surface. My questions are: #1 How is this behaviour possible? #2 How can I restore the chips? Ive tried erasing, and reprogramming through MPLAB, and just skipping past all the errors but that doesnt work. Can I just stick the programming voltage into the MCLR pin to erase the chip?
__________________ The first rule of mstechca club is do not talk about mstechca club. http://www.electro-tech-online.com/s...induser&u=1245 | |
| |
| | (permalink) |
| Can you post the code? | |
| |
| | (permalink) |
| They tell me it shouldn’t happen but check this thread out. http://www.electro-tech-online.com/m...t-working.html
__________________ C:\WHUT ? Beware the asterisk * | |
| |
| | (permalink) |
| If you've programmed the PIC so that it uses the internal oscillator AND have programmed the MCLR pin as an IO you'll have this problem. This is because the programmer will no longer be able to reset the PIC or stop the oscillator before entering programming mode. Usually MPLAB will warn you about this when you configure the PIC in this way. I think there is a mod for the ICD2 so that it switches Vdd to the PIC so programming can be entered before the internal oscillator can run.
__________________ --- The days of the digital watch are numbered. --- Last edited by kchriste; 18th November 2007 at 12:31 AM. | |
| |
| | (permalink) |
| True MPLAB warns but you may still bypass the warning and program the chip. Having internal oscillator and MCLR pin as an IO is the bulk of PIC usage. Microchip as a company would have never grown to the level they are now if this condition was a blockade. A.K.A flash not being flash. Send code if you would like, I wish to try this myself. What is the warning, and do you have all warnings disabled from Programmer->Settings->Warnings? | |
| |
| | (permalink) |
| Hey Guys, Just got chance to reply. The link provided by ClydeCrashKop pointed me in the direction of timer1 which was indeed misconfigured. It is strange that MPLAB wouldnt erase them anyway seeing as I was telling it to ignore all the errors. Thanks to all. John
__________________ The first rule of mstechca club is do not talk about mstechca club. http://www.electro-tech-online.com/s...induser&u=1245 | |
| |
| | (permalink) | |
| Quote:
| ||
| |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Title | Starter | Forum | Replies | Latest |
| Help with problem programming 16F628A | ukatv | Micro Controllers | 8 | 25th September 2007 09:23 PM |
| Newcomers, please read! (PIC regarded) Upd. 0xD | Jay.slovak | Micro Controllers | 0 | 17th April 2005 02:05 PM |
| Problem; Random pic performance | timothyjackson | Micro Controllers | 7 | 19th February 2005 07:20 PM |
| Program Address for 16F628A | johnnyquest | Micro Controllers | 1 | 11th January 2005 07:47 PM |
| Big thermocouple ADC problem | Oznog | General Electronics Chat | 9 | 4th May 2004 09:42 PM |