Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/08/01 13:37
Read: times


 
#17417 - RE: ljmp to zero = reset ?


erik malund wrote:
-------------------------------
Ljmp 0 = ljmp 0, nothing else. On a power-up all sfrs are set to the value shown in the data sheet (at least the Philips data sheets) on ljmp 0 they stay at the values they have. If you need a reset use a derivative with a watchdog and let the watchdog time out.
In the olden days before the puppies were born, I coded a '51 to set all sfr's to the power-up value on a jump to zero, you can use this method if you have to.

Have fun,

Erik

To accomplish the LJMP to zero the easiest way in Keil is to simply create a new file (or use a file that you already have in-line assembly in use) use the following format inthe file:

#pragma SRC /* at top of file */

void SoftReset ( void )
{
/*set init code goes here*/
#pragma ASM
LJMP 0x0000
#pragma ENDASM
}

This will then have to add this file and the output assembly file to your project. Make sure you put them in the correct order of translation.

In Raisonance it would be as follows:
void SoftReset ( void )
{
/*set init code goes here*/
asm {0x02,0x0000}; /* LJMP 0000 */
}

This would be compiled normally in your C file.

Bryan Whitton
American Raisonance

List of 15 messages in thread
TopicAuthorDate
ljmp to zero = reset ?            01/01/70 00:00      
RE: ljmp to zero = reset ?            01/01/70 00:00      
RE: ljmp to zero = reset ?-to Jacek Bog            01/01/70 00:00      
RE: ljmp to zero = reset ?-to Jacek Bog            01/01/70 00:00      
RE: ljmp to zero = reset ?            01/01/70 00:00      
RE: ljmp to zero = reset ?            01/01/70 00:00      
RE: ljmp to zero = reset ?            01/01/70 00:00      
RE: ljmp to zero = reset ?-to Jacek Bog            01/01/70 00:00      
RE: ljmp to zero = reset ?-to Jacek Bog            01/01/70 00:00      
RE: ljmp to zero = reset ?            01/01/70 00:00      
RE: ljmp to zero = reset ? - Bryan            01/01/70 00:00      
RE: ljmp to zero = reset ? - Bryan            01/01/70 00:00      
RE: ljmp to zero = reset ? - Bryan            01/01/70 00:00      
RE: ljmp to zero = reset ?            01/01/70 00:00      
RE: ljmp to zero = reset ?            01/01/70 00:00      

Back to Subject List