I want to use PFC8583 . But i coludn't get/set any data .
I tried
i2cread sda,scl,$A2,2,[S]
i2CWrite sda,scl,$A2,4,[H]
andi changed $A2 =%10100010 ------> %10100001..
and what must be min configuration for connecting PFC!
I connected scl and SDA pin!
......
sec var bit
S var byte
M var byte
H var byte
SCL var PORTB.0
SDA var PORTA.4
....
.
.
.
'
Read 4,H
i2CWrite sda,scl,$A2,4,[H]
pause 20
Read 3,M
i2CWrite sda,scl,$A2,3,[M]
pause 20
.
...
call Display_clock
.
'''
Display_Clock:
toggle sec
i2cread sda,scl,$A2,2,[S]
i2cread sda,scl,$A2,3,[M]
i2cread sda,scl,$A2,4,[H]
'i2cread sda,scl,$A2,5,[D]
'i2cread sda,scl,$A2,6,[Mn]
'i2cread sda,scl,$A2,7,[y]
LCDout $FE,$C0
if sec=0 then
lcdout hex(H),":",hex(M),":",hex(S)
else
lcdout hex(H)," ",hex(M)," ",hex(S)
endif
return
thx
Bookmarks