|
|
View previous topic :: View next topic |
Author |
Message |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sun Mar 07, 2010 1:13 pm |
|
|
Quote: |
The problem is that it occasionally prints garbage, stops to work, restarts |
Consider these possible problems:
Hardware:
1. Improper MCLR circuit.
2. No bypass capacitors (100 nF, ceramic) on the Vdd pins.
3. Poorly regulated power supply.
4. Incorrect crystal circuit.
5. Poor solder joints (cracked, intermittent connections).
One quick way to check the hardware is to use a factory-built eval board
rather than your own breadboard. If the problem goes away, there is
likely something wrong with your breadboard.
Software:
1. Enabling GLOBAL interrupts while inside an #int_xxx routine.
2. Enabling the XINST fuse in an 18F PIC.
3. Writing past the end of an array, thus over-writing other variables.
4. Watchdog timer enabled, but restart_wdt() is not called often enough.
One quick way to find if it's a software problem is to start commenting
out parts of your code and see if the problem goes away. Disable
interrupts. Comment out any "weird" things that you're doing, such as
#build, High Ints, FAST ints, etc. |
|
|
meereck
Joined: 09 Nov 2006 Posts: 173
|
|
Posted: Sun Mar 07, 2010 1:37 pm |
|
|
thanks for the response.
I am sure this is not HW related, I have tried different crystal oscillators, MCLR is disabled,
>>Comment out any "weird" things that you're doing, such as #build, High ints, FAST ints, etc.
I have already tried those.
>>XINST fuse
It is not possible to use "#fuses NOXINST" keyword when using PIC18F1220.
>>WDT
The watchdog is also disabled.
I am going to comment out some parts of the source code tomorrow. Anyway, the source code is very short - there is nothing which would cause those troubles (e.g. there are no arrays at all...). I highly suspect there is something wrong with the compiler.
I am also going to convert the project to, say, PIC18F2420.
However, can anyone replicate the issue?
Cheers |
|
|
meereck
Joined: 09 Nov 2006 Posts: 173
|
Sorted out |
Posted: Mon Mar 08, 2010 9:07 am |
|
|
I have changed the PIC to 18F2420 and problem is sorted out. |
|
|
Ttelmah Guest
|
|
Posted: Mon Mar 08, 2010 9:43 am |
|
|
Obvious thing. Revision B1 silicon.
Look at the errata sheet.
Best Wishes |
|
|
meereck
Joined: 09 Nov 2006 Posts: 173
|
|
Posted: Mon Mar 08, 2010 9:51 am |
|
|
Ttelmah wrote: | Obvious thing. Revision B1 silicon.
Look at the errata sheet.
Best Wishes |
omg, piece of crap.
thanks |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|