Serial LCD problem

ColinP

New Member
Hi all - I have been given a serial enabled LCD from SparkFun. It uses ASCII - hence 8 data bits. The data sheet also states it uses no parity, 1 start and 1 stop bit. This seems compatable with the PICaxe serout command with the exception of the start bit. Perhaps not surprisingly at the moment I just get rubbish instead of text on the screen!
Is there any way around this?
Its a pretty cool screen - white on black with backlight I would love to use it

thanks

Colin
 

ColinP

New Member
Hi - thanks for getting back to me. It is the one on the data sheet. So far I have tried the usual type of thing for example -

pause 1000
serout 7, n2400, ("Hello world")

according to the sheet 2400 is compatable, n or t makes no difference.

Colin
 

eclectic

Moderator
Hi - thanks for getting back to me. It is the one on the data sheet. So far I have tried the usual type of thing for example -

pause 1000
serout 7, n2400, ("Hello world")

according to the sheet 2400 is compatable, n or t makes no difference.

Colin
Have you set the baudrate to 2400,
using the 124 ctrl k sequences?
 

ColinP

New Member
NO ! I have tried to follow the instructions I can find about this but am finding it rather unclear - could you give me an idiot proof run through!

many thanks

Collin
 

eclectic

Moderator
NO ! I have tried to follow the instructions I can find about this but am finding it rather unclear - could you give me an idiot proof run through!

many thanks

Collin
In the editadd to post #2, VMorley posted this:

Code:
setfreq m8 'sets picaxe frequency
pause 2000 'wait 1 sec (at 8mhz) to initialise lcd
serout 4, t4800,(124,9) 'i think this will turn off the boot screen
serout 4, t4800, (124,11) ' 11 = $0B = Ctrl-k
setfreq m4 'returns picaxe to default speed
serout 4,t2400,(254,128,"can you see this")
Try the code and see what happens.

e
 

ColinP

New Member
Hi - the code is brilliant and works fine and I even think I understand what you are doing! However when the chip is powered down and switched back on it is back to something which looks like Klingon on the display - when reprogrammmed with your code its fine again - any ideas what is going on?

Many thanks

Colin
 

eclectic

Moderator
@Colin.
Firstly, it's not my code. I simply "found" it.

It appears, from page 3 of the datasheet,
that you need to RE-set the frequency
to 2400 at startup, each time. (Unless anyone has a fix?)

Or, depending on your Picaxe, you could use 9600.

e
 

hippy

Ex-Staff (retired)
That initialisation code probably has to be executed everytime, therefor include the initialisation code at the start of the program using the LCD.
 
Top