What is the best way to reset Pic18 using C code With HiTech Pic18 C Compiler
Edit:
I use
void reset() { #asm reset #endasm }
but there must be a better way
Here is the FAQ here .
Q: How to reset micro?
One way is to reset all variables to their default values, as indicated in the PIC manual. Then use assembly language to go to location 0x0000 in micro.#asm ljmp 0x0000#endasm, . PIC 16x 8 . , , . , -7 , reset , , .- , , CLRWDT() . , reset, reset 18 2 .
One way is to reset all variables to their default values, as indicated in the PIC manual. Then use assembly language to go to location 0x0000 in micro.
#asm ljmp 0x0000
#endasm
, . PIC 16x 8 . , , . , -7 , reset , , .
- , , CLRWDT() . , reset, reset 18 2 .
reset(), , , .
.
- . , , . , , , reset , - . , reset . , , .
If there is no library function defined by the compiler runtime library (if such a library exists even in the microcontroller world ... but it should), then no. C itself, of course, will not help you, since "a reset" is too big a problem for the C platform to cover it.
I am using the ccsinfo.com compiler, which has a similar API call to reset the pic, but I would have thought that the solution for the compiler would go right.
Source: https://habr.com/ru/post/1698407/More articles:Silverlight 2 development using only Visual Studio? - visual-studio-2008how to get java app icon? - winapiHow to configure gzip compression on a web server? - javascriptC # libraries? - c #Lua Library for Jabber - luaHow to enable autofill WebOb response / request objects in Pydev for Eclipse? - eclipseЧто может выполнять Cheat-Engine как задачи в Linux? - debuggingSimple C ++ UML w / Reverse Engineering - c ++Populating the CVS tab for modules on Linux - linuxCalculating totals from group totals in Reporting Services - reporting-servicesAll Articles