22solutions
New Member
hi
i have a picaxe device that i would like to interface to a 16f628 using software uart. has anyone attempted this or got this happening at all using picsimide? the device is a cheap serial oled display and they tell me it will happily take ttl serial. anyway i have tried the hardware uart and the software uart but no dice. data gets garbled on the oled display. tried seroutinv as well with no joy. tried lifting the delay, no joy.
has anyone noticed problems with the oshonsoft software uart at all? the baud is only 2400 so nothing huge. there is data being transmitted, but there must be a clock or sync issue somewhere maybe? both clocks are set for 16MHz
i the picaxe and display module are quite cheap ~$30 so i figured with the display taken care of i can just program the logic and update the display via serial.
i pulled out the picaxe and put a 16f628A in there and tried driving the display with the lcd commands picsimide offers but there is an issue there with the lcdout command.
any ideas out there?
heres my code:
'interface to a picaxe axe133 oled serial display module
'http://www.picaxe.com/downloads/axe133.bas.txt
TRISB = 0x00
Define SEROUT_DELAYUS = 1000
Dim cnt As Byte
cnt = 0
WaitMs 500
'loop forever
SeroutInv PORTB.6, 2400, 254 'clear the display
SeroutInv PORTB.6, 2400, 1
loop:
Gosub do_oled
WaitMs 1000
Goto loop
End
do_oled:
cnt = cnt + 1
SeroutInv PORTB.6, 2400, 254
SeroutInv PORTB.6, 2400, 128 'return screen to home
'WaitMs 10
SeroutInv PORTB.6, 2400, "count=", #cnt 'data
If cnt > 255 Then
cnt = 0
Endif
Toggle PORTB.7 'visual feedback
Return
thanks
nick
i have a picaxe device that i would like to interface to a 16f628 using software uart. has anyone attempted this or got this happening at all using picsimide? the device is a cheap serial oled display and they tell me it will happily take ttl serial. anyway i have tried the hardware uart and the software uart but no dice. data gets garbled on the oled display. tried seroutinv as well with no joy. tried lifting the delay, no joy.
has anyone noticed problems with the oshonsoft software uart at all? the baud is only 2400 so nothing huge. there is data being transmitted, but there must be a clock or sync issue somewhere maybe? both clocks are set for 16MHz
i the picaxe and display module are quite cheap ~$30 so i figured with the display taken care of i can just program the logic and update the display via serial.
i pulled out the picaxe and put a 16f628A in there and tried driving the display with the lcd commands picsimide offers but there is an issue there with the lcdout command.
any ideas out there?
heres my code:
'interface to a picaxe axe133 oled serial display module
'http://www.picaxe.com/downloads/axe133.bas.txt
TRISB = 0x00
Define SEROUT_DELAYUS = 1000
Dim cnt As Byte
cnt = 0
WaitMs 500
'loop forever
SeroutInv PORTB.6, 2400, 254 'clear the display
SeroutInv PORTB.6, 2400, 1
loop:
Gosub do_oled
WaitMs 1000
Goto loop
End
do_oled:
cnt = cnt + 1
SeroutInv PORTB.6, 2400, 254
SeroutInv PORTB.6, 2400, 128 'return screen to home
'WaitMs 10
SeroutInv PORTB.6, 2400, "count=", #cnt 'data
If cnt > 255 Then
cnt = 0
Endif
Toggle PORTB.7 'visual feedback
Return
thanks
nick