Hello,
The following code does not transmit the DS1307 RTC information correctly.
With a few changes, (the pin # and display locations), I was able to display the clock data(Hours and minutes) on a serial LCD.
Now I am trying to transmit the data to another picaxe, both 18m2+, without success.
The hex variables, b10 b11 b12, are transmitting and displaying correctly. The clock data is not.
The receiving picaxe does nothing but receive serial communication and control the display.
The sending picaxe does nothing but receive the clock data and send serial communication to the LCD picaxe.
The LCD displays 00:80. (no matter what time it is)
Can anyone tell me what I'm doing wrong?
Thanks in advance.
DBoyd
The following code does not transmit the DS1307 RTC information correctly.
With a few changes, (the pin # and display locations), I was able to display the clock data(Hours and minutes) on a serial LCD.
Now I am trying to transmit the data to another picaxe, both 18m2+, without success.
The hex variables, b10 b11 b12, are transmitting and displaying correctly. The clock data is not.
The receiving picaxe does nothing but receive serial communication and control the display.
The sending picaxe does nothing but receive the clock data and send serial communication to the LCD picaxe.
The LCD displays 00:80. (no matter what time it is)
Can anyone tell me what I'm doing wrong?
Thanks in advance.
DBoyd
Code:
symbol mins = b1 'for DS1307 data
symbol hour = b2 'for DS1307 data
'b10 is variable for rtemp
'b11 ftemp
'b12 stemp
hi2csetup i2cmaster, %11010000, i2cslow, i2cbyte 'setup i2c
pause 50
main:
b10 = $5a 'fixed variable for testing
b11 = $50 'fixed variable for testing
b12 = $55 'fixed variable for testing
bintoascii b10, b21,b22,b23 'changed to send ASCII to parallel LCD
bintoascii b11, b24,b25,b26 'changed to send ASCII to parallel LCD
bintoascii b12, b5,b13,b14 'changed to send ASCII to parallel LCD
hi2cin b0, (mins,hour) ; Receive information from clock
bcdtoascii mins, b17, b18 'minutes
bcdtoascii hour, b15, b16 'hours
serout c.1, t2400, (b22,b23,b25,b26,b13,b14,b15,b16,b17,b18) 'sent to picaxe controlling parallel LCD in byte mode
pause 1000
goto main
Last edited by a moderator: