|
|
View previous topic :: View next topic |
Author |
Message |
Stu H Guest
|
Odd pathology PIC16F877 |
Posted: Tue Feb 22, 2005 8:30 am |
|
|
Hi,
I'm implementing a fairly straightforward up/down counter using a PIC16F877A with PCM 3.185.
The counter works as a counter, that isn't the problem. The trouble occurs because I'm using the RB6 and RB7 lines as counter inputs (the only lines physically available at the board edge connector). I've bodged it using RB4 and RB5 and the problem seems to go away using these inputs.
The trouble? The PIC frequently crashes when one of the count lines is brought low (pullups are enabled, lines idle high), and the watchdog only resets it occasionally. I'm thinking that this behaviour may have something to do with the LVP/ICSP mode and I'm causing the PIC to enter a programming state - am I right? Pin RB3 is pulled to 0V via 10K. I can't see what's causing this - my fuses line reads:
Code: |
#pragma fuses HS,WDT,PUT,BROWNOUT,NOLVP,NODEBUG,NOPROTECT
|
Any ideas/suggestions? |
|
|
Ttelmah Guest
|
|
Posted: Tue Feb 22, 2005 9:13 am |
|
|
Are you sure your actual programming routine is reading the fuses?. Some packages 'override' the fuses, ignoring some of them, and requiring you to set these manually in the programmer software. Check in this, that the fuses are as expected.
Best Wishes |
|
|
Guest
|
|
Posted: Wed Feb 23, 2005 10:05 am |
|
|
I've just checked this - a good point.
The fuses would appear to be set correctly in the programmer, and I've confirmed this by reading back a programmed chip.
Fuses are: (Enabled) WDT,BODEN,PWRTE, WRT Enable (Disabled) CPD,DEBUG,Code Protect,LVP. Oscillator is HS. That's the contents of the fuses screen on the programmer other than the chip ID. |
|
|
|
|
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
|