Shop OBEX P1 Docs P2 Docs Learn Events
How to write ''WRITE''? — Parallax Forums

How to write ''WRITE''?

ArchiverArchiver Posts: 46,084
edited 2003-01-08 07:47 in General Discussion
¡¥
¡¥Description:write date & time to EEPROM when micro-switch is
' triggered, using BS2 & Real Time Clock DS1302
¡¥
¡¥
¡¥Program Code
¡¥
Input 4
Input 5

Recheck: ¡¥a label
if in4=0 OR in5=0 then Log_Data ¡¥check if P4 or P5 is a ¡§0¡¨,
if yes then go Log_Data
goto Recheck ¡¥if P4 or P5 was a ¡§1¡¨, then go back & check again

Log_Data:
GOSUB ReadRTCBurst
=Write Location, [noparse][[/noparse]Seconds,Minutes,Hours,Date,Month,Day,Year]
=Write¡K
GOTO Recheck

ReadRTCBurst:
HIGH RTCReset
SHIFTOUT DTA, Clk, LSBFIRST, [noparse][[/noparse]%1\1,BrstReg\5,%10\2]
SHIFTIN DTA, Clk, LSBPRE, [noparse][[/noparse]Seconds,Minutes,Hours,Date,Month,Day,Year]
LOW RTCReset
RETURN

Above is part the program code that suppose to write 21 sets of
[noparse][[/noparse]Seconds,Minutes,Hours,Date,Month,Day,Year] to EEPROM of BS2.

Then, the 21 sets of data will be downloaded for analysis using
Microsoft Excel.

My problem is how to write the expression start with "=" sign in
program code above so that i will not mixed up the 21 sets of data
when i retrieve them?

Thanks! Have a nice day!!
Sign In or Register to comment.