Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

serout to picaxe oled serial display

Status
Not open for further replies.

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
 
Ok I ended up ditching the picaxe and replaced with a 628A and got the display working (seems i had to configure the entry mode set for the display).
Having said that, i still need to transmit serial data to the display. I need to use the software uart to achieve this as the hardware uart is used for a radio communication device.
Not sure if anyone out there has done any work with the softuart, but are there any gotcha's with what pins can be used for this on a 628A??

The hardware uart works fine to transmit and receiving using serin command on the lcd module, but serout doesn't seem to work as expected.
Any ideas?

i figured it. have to set the data pin high (mark) before doing anything.
man i wish i could think of this before i post.....

Thanks
Nick
 
Last edited:
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top