Datasheet

Jon Waddington
100
text.out($20) 'space
text.dec(date>>4 & $03) 'display the 10s of date
text.dec(date & $0F) 'display the units of date
text.out($20) 'space
case m 'display the month
1 : text.str(string("Jan"))
2 : text.str(string("Feb"))
3 : text.str(string("Mar"))
4 : text.str(string("Apr"))
5 : text.str(string("May"))
6 : text.str(string("Jun"))
7 : text.str(string("Jul"))
8 : text.str(string("Aug"))
9 : text.str(string("Sep"))
10 : text.str(string("Oct"))
11 : text.str(string("Nov"))
12 : text.str(string("Dec"))
text.out($20) 'sapce
text.str(string("20"))
text.dec(yr>>4 & $0F) 'display the 10s of yr
text.dec(yr & $0F) 'display the units of yr
PRI getseconds : s
s := i2c.getbyte($A3, $02)
PRI getminute : m
m := i2c.getbyte($A3, $03)
PRI gethour : h
h := i2c.getbyte($A3, $04)
PRI waitm | m, w
w := getminute
repeat until w <> m
m := getminute
PRI getdate : d
d := i2c.getbyte($A3, $05)
PRI getday : d
d := i2c.getbyte($A3, $06)
d := d & $07
PRI getmonth : m
m := i2c.getbyte($A3, $07)
m := ((m>>4 & $01)*10) + (m & $0F)