madhushan90
Newbie level 6
Hi,
Can anyone tell me how to reset 18f452 micro controller in mikro c pro code.
thanks.
Can anyone tell me how to reset 18f452 micro controller in mikro c pro code.
thanks.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
hello
i think this PIC has no reset instruction as new one.
if your init sequence is correct , it means all I/O are initialised , not by default value on (hardware ) reset
you can use a
_asm
goto 0x0000h // if no bootloader !
_endasm
or maybe use an output like RA4 open collector ,in parrallele with MCLR (reset)
and write 0 on it. => Hardware reset. ( a pull up resistance is needeed for the MCLR pin ie: 10K to VDD)
Thanks paulfjujo, but i can not find out implement this in mikroc pro. Can anyone help me to figure it out. regards
_asm
goto 0x0000h // if no bootloader !
_endasm
void main() {
TRISB = 0x00;
PORTB = 0x00;
PORTB.F0 = 1;
Delay_ms(3000);
asm {
goto 0x0000 // if no bootloader !
}
Delay_ms(3000);
}
Thanks, it work for me. regardsyou can implementin mikroCCode:_asm goto 0x0000h // if no bootloader ! _endasm
---------update------------------
yes this code is not working in mikroC
Code:void main() { TRISB = 0x00; PORTB = 0x00; PORTB.F0 = 1; Delay_ms(3000); asm { goto 0x0000 // if no bootloader ! } Delay_ms(3000); }
Check this
http://www.mikroe.com/forum/viewtopic.php?f=88&t=28198
Thanks, it work for me. regards
void main() {
TRISB = 0x00;
PORTB = 0x00;
PORTB.F0 = 1;
Delay_ms(3000);
PORTB.F0 = 0;
Delay_ms(3000);
asm {
goto 0x0000 // if no bootloader !
}
Delay_ms(3000);
}