hello am using pic16f819
my problem is i use DTMFOUT function inside (for) loop this causes some times process hung after almost 9 or 10 min working time
is there any why to make pic self reset if it hung
regards
hello am using pic16f819
my problem is i use DTMFOUT function inside (for) loop this causes some times process hung after almost 9 or 10 min working time
is there any why to make pic self reset if it hung
regards
Can you post your code and schematic?
About your other process... any of those use interrupts?
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
hello no (interrupts)
this is my code
no schematic release yet still prototypal
but u can figer it out from code
pin b.0 is serail in
pin a.3 is audio out
Code:define osc 20 Include "modedefs.bas" TRISA = %00000000 gdata var byte[21] x var byte ok var bit main: x = 0 gps: if ok == 0 then serin2 portb.0 , 188 ,[wait("GPS") , str gdata\20] toggle portb.1 dtmfout porta.3 ,100 ,100,[ 10 , 0 , 10 ] for x = 0 to 20 pause 10 if gdata[x] = "." then gdata[x] = 12 endif dtmfout porta.3 ,100,100,[ gdata[x] ] next x ok = 1 endif serin2 portb.0 , 188 ,[wait("SD") , str gdata\4] ok = 0 toggle portb.2 dtmfout porta.3 ,100,100,[ 10 , 1 , 10 ] pause 1 for x = 0 to 4 pause 10 if gdata[x] = "." then gdata[x] = 12 endif dtmfout porta.3 ,100,100,[ gdata[x] ] next x pause 50 goto main
Last edited by eng.alamin; - 28th October 2008 at 22:45.
Are you positive it is not hung waiting on a serial input?
Dave
Always wear safety glasses while programming.
Don't know if it's a cut/paste problem or what...Code:define osc 20
Read the manual and what it specifically says about DEFINE's... And ENDing a program (or STOPping it)
As far as an 'automatic reset', look in the datasheet under WATCHDOG.
Last edited by Archangel; - 30th October 2008 at 17:50.
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
I am wondering if it is not a power supply problem. After a few minutes the the PS starts to fail/drop voltage.
Is the speaker direct connect to the PIC?
Dave
Always wear safety glasses while programming.
Bookmarks