Hi All,
I am attempting to build a device that, based upon data from a pressure transducer, will record the time certain events took place. These are pressure spikes to be recorded in an eprom chip, and displayed on a Serial LCD, and output in serial to an attached computer using the sertxd command. An event datalogger, if you like, a little different to the AXE110 which is scheduled.
I have at long last programmed my 18X chip to program the DS1307 chip with the time, using the Datalogger wizard. I can transmit the time of the event and the event data using SERTXD.
Now the tricky bit. Instead of using the AXE033 i have been able to lay my hands on a Modtronix LCD2s serial display unit. http://www.modtronix.com.au .
It looks physically similar to the AXE 033, but cheaper. Modtronix also have some cool pre prepared boards designed for PICs, and this is easier for me than the high cost of getting stuff from the UK. I am attempting to communicate by i2C, which should be easy for Picaxe. I replaced the $C6 in I2C address for the AXE033 with the 0x50, the address for the Modtronix unit, but i still get nothing from the Modtronix unit. It is powered but does not waver from the start up screen. In fact, when the Modronix unit is connected, instead of getting the right time on Sertxd i get question marks, which prompts me to think there is something coming back from the device.
Any ideas on how i can interface with the Modtronix LCD2S unit?
This is my code. Note much borrowed (and functional) from a previous thread by cfarr.
Thanks,
Michael Viset
I am attempting to build a device that, based upon data from a pressure transducer, will record the time certain events took place. These are pressure spikes to be recorded in an eprom chip, and displayed on a Serial LCD, and output in serial to an attached computer using the sertxd command. An event datalogger, if you like, a little different to the AXE110 which is scheduled.
I have at long last programmed my 18X chip to program the DS1307 chip with the time, using the Datalogger wizard. I can transmit the time of the event and the event data using SERTXD.
Now the tricky bit. Instead of using the AXE033 i have been able to lay my hands on a Modtronix LCD2s serial display unit. http://www.modtronix.com.au .
It looks physically similar to the AXE 033, but cheaper. Modtronix also have some cool pre prepared boards designed for PICs, and this is easier for me than the high cost of getting stuff from the UK. I am attempting to communicate by i2C, which should be easy for Picaxe. I replaced the $C6 in I2C address for the AXE033 with the 0x50, the address for the Modtronix unit, but i still get nothing from the Modtronix unit. It is powered but does not waver from the start up screen. In fact, when the Modronix unit is connected, instead of getting the right time on Sertxd i get question marks, which prompts me to think there is something coming back from the device.
Any ideas on how i can interface with the Modtronix LCD2S unit?
This is my code. Note much borrowed (and functional) from a previous thread by cfarr.
Code:
'clock display in i2c mode
'Serial Transmit clock time
'Write to Serial LCD.
init:
pause 500
i2cslave 0x50, i2cslow,i2cbyte ' Modtronix display unit LCD2S
main: writei2c 0, (254,128,255)
pause 10
writei2c 0, ("THE Time is", 255)
pause 500
i2cslave %11010000, i2cslow, i2cbyte 'DS1307 Clock chip
readi2c 0,(b0,b1,b2)
pause 30
clock:i2cslave 0x50, i2cslow,i2cbyte ' Modtronix display unit LCD2S
writei2c 0, (254,192,255)
pause 30
b4=b0 & %00001111
b3=b0 & %11110000
b3=b0/16
b3=b3+$30 ' (or you could do b1=b1 + '0')
b4=b4+$30 '
b6=b1 & %00001111
b5=b1 & %11110000
b5=b1/16
b5=b5+$30 ' (or you could do b1=b1 + '0')
b6=b6+$30 '
b8=b2 & %00001111
b7=b2 & %11110000
b7=b2/16
b7=b7+$30' (or you could do b1=b1 + '0')
b8=b8+$30'
writei2c 0, (b7,b8,":",b5,b6,":",b3,b4,255 )
'Transmit to Serial Terminal
sertxd ("THE TIME IS:",b7,b8,":",b5,b6,":", b3,b4,13,10)
low 0 'flash LED on Pin 0
pause 50
high 0
goto init
Thanks,
Michael Viset
Last edited: