View previous topic :: View next topic |
Author |
Message |
Einly
Joined: 10 Sep 2003 Posts: 60
|
Power on reset |
Posted: Wed Dec 29, 2004 1:13 am |
|
|
Dear all,
I am doing a reset as suggested earlier:
#asm
MOVLW 0
MOVWF PLCATH
GOTO 0
#endasm
I noticed that by writing this line, it is not exactly function like a power on reset. I am using PIC16f876, CCS Compiler version 2.734.
By the way, does the USART_Transmit_Buffer_Full bit in the TXSTA register reset to the default state, i.e. 1? If not, what should I do to reset it? Is there any other way for me to simulate a power-on reset?
Thanks a lot _________________ Einly |
|
|
Haplo
Joined: 06 Sep 2003 Posts: 659 Location: Sydney, Australia
|
|
Posted: Thu Dec 30, 2004 5:34 am |
|
|
The default state of the registers are mentioned in the datasheet.
What you are doing just jumps to the beginning of the program, it does not reset any of the registers.
Try letting the watchdog time out instead. |
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Mon Jan 03, 2005 9:32 am |
|
|
From the Microchip application note on bootloaders AN851: Quote: | For PIC18F devices,
the RESET command actually generates a true RESET
via the RESET instruction (same as MCLR). Other than
tying a port pin to MCLR, a true RESET is not possible
in firmware on PIC16F87XA devices. Although the
RESET command is supported, it only causes the
PIC16F device to jump to the RESET vector; the registers
used to perform bootload operations are not
changed to their RESET states. |
|
|
|
jds-pic
Joined: 17 Sep 2003 Posts: 205
|
|
|
jds-pic
Joined: 17 Sep 2003 Posts: 205
|
|
|
|