eric0524
Newbie level 2
I am new at this so please be patient. I am tring to write some code that flashes an led 292 times per second for 30 minutes. Every time I try I get differnt results with a new power supply. It's suppose to run 30 minutes at 292hz then pause 20 minutes (the 20 minute pause is the only thing I have right). Can anyone help with my spagetti code (that I inherited)? I am using a 16F627 with PICBASIC Pro. The only ocillator I have is the onboard one in the 16F627.
Code:
DEFINE OSC 4
Out VAR Portb.7
Green VAR Portb.2
Yellow VAR Portb.0
Out2 VAR portb.5
EE VAR Word
FF VAR Word
X VAR Word
CMCON = 7
FF = 1
EE = 1
High Green
Low Yellow
' Run out at 292hz for 30 minutes.........not happening always
FOR FF = 1 TO 5267
FOR EE = 1 TO 100
High Out
High Out2
PAUSEUS 2102
Low Out
Low Out2
PAUSEUS 1400
NEXT EE
NEXT FF
'Put every thing off and change the status LED to Yellow
Low Out
Low out2
Low Green
High Yellow
' Pause for 20 minutes before doing it again.
X = 1
For X = 1 to 20
Pause 60000
Next X