CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Power on reset

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Einly



Joined: 10 Sep 2003
Posts: 60

View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger ICQ Number

Power on reset
PostPosted: Wed Dec 29, 2004 1:13 am     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Dec 30, 2004 5:34 am     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Jan 03, 2005 9:32 am     Reply with quote

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

View user's profile Send private message

Re: Power on reset
PostPosted: Mon Jan 03, 2005 3:12 pm     Reply with quote

Einly wrote:
Is there any other way for me to simulate a power-on reset?


people are trying to help you:
http://www.ccsinfo.com/forum/viewtopic.php?t=21249

jds-pic
jds-pic



Joined: 17 Sep 2003
Posts: 205

View user's profile Send private message

PostPosted: Mon Jan 03, 2005 3:28 pm     Reply with quote

but if you want to know how to re-initialize all of the PICs internal registers to "simulate" a power-on reset condition, read this thread in it's entirety:

http://www.ccsinfo.com/forum/viewtopic.php?t=20282

jds-pic
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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