Problem with Oatley Electronics serial LCD kit

loc243

New Member
Serout command dropping first character in serial string

Hi, I have searched the forum but can;t seem to find an answer to my problem with a 28x1 picaxe driving an oatley electronics serial LCD driver board (K221), connected to a 4 x 20 LCD. It appears that the serout command is dropping off the first character inside the "text string". This means the serial LCD commands wont work. Has anyone else had this issue?

Thanks

PS my first post, really enjoying working with the picaxe system
 
Last edited:

Texy

Senior Member
Hi, I have searched the forum but can;t seem to find an answer to my problem with a 28x1 picaxe driving an oatley electronics serial LCD driver board (K221), connected to a 4 x 20 LCD. When I send a serial string using T2400 command it comes out garbled on the LCD. I hade the same problem when using the sertxt command and found that if I set the baud rate on the serial terminal to 4800 it worked fine. Has anyone else had this experience?

Thanks

PS my first post, really enjoying working with the picaxe system
So whats the problem then - haven't you found the solution - its expecting 4800 baud connection?

Texy
 

loc243

New Member
Serial string for serial LCD controller

Hi eclectic, my program is

program is serout 1,T2400,("Hello?n")

I sent the initialisation command to set the LCD driver to 4 x 20 (serout 1, T2400 (?G420") but because the string is losing teh first character this may not have worked..
 

Dippy

Moderator
Note that all commands are prefaced with a "?" and the commands are case sensitive.

Have you done that? Your example implies you haven't ' serout 1,T2400,("Hello?n") '


If you think there is a technical problem with the product why not contact Oatley?

Have you tried their example: Serout 1,T2400,("?y1?x10Hello?n") ??????
 

loc243

New Member
Problems with LCD serial string

Hi Dippy, thanks for the heads up, when I try the example Serout 1,T2400,("?y1?x10Hello?n") I get v; on the LCD. It looks like it must be a problem with the program on the PIC chip driving the interface.

Last resort is to reset the LCD driver and see what happens.

Thanks
 

eclectic

Moderator
LOC.

I've got an Oatley 221 board on a PHAnderson LCD(#115)

I've just run this program.
Code:
#picaxe 28x1

High 1		' Be sure Tx Pin is idle for some time
Pause 2000		' wait for PICAXE LCD to boot

   serout 1,t2400,("?B00")
   pause 1000
serout 1,t2400,("?BFF") ; full backlight

serout 1,t2400, ("?f")

serout 1,t2400, ("?y0?x00Hello Loc243?n")

serout 1,t2400, ("?y1?x00Try this program?n")
Might be worth a try?
e
 

Attachments

loc243

New Member
Trying Eclectics program

I new I paid extra for a back light! Great now I have a backlight, unfortunately no text on the screen. When I rebbot the LCD it has ff in the strat up screen now. Is this possibly from the serout,1,t2400,("?BFF") command?
 

eclectic

Moderator
LOC

the "?B00" and "?BFF" commands are in the Oatley datasheet p. 3

However, just rem them out for the time being,
and try the rest of the program as it is.

Other things to try.

1. Disconnect the battery. Wait ten seconds. Reconnect.
Wait another ten seconds, then press the reset button on the Picaxe board.

2. VERY VERY carefully, connect the R reset pin to ground, just for a second.

e
 

hippy

Technical Support
Staff member
The solution is possibly as in eclectic's post; add the following at the start of the program -

- High 1
- Pause 2000

If it works you can start reducing the length of the pause.
 

Dippy

Moderator
I must ask two cheeky questions:-

1. Have you contacted Oatley for advice. They probably know more than anyone here :)

2. Are you sure the LCD is compatible? Is it an Oatley-supplied item, or a well known brand or some 10cent tat off Ebay? (That last bit was the cheeky bit, but I know of occasions where , after a lot of questioning, it turns out to be down to a cheap POS from a vendor on Ebay).

Yes, high 1 may work. I hope it does.
 

loc243

New Member
Issues with LCD interface

Thanks Dippy, Hippy and Eclectic for all of your help. Unfortunately I cannot get any text to appear now. I can turn the backlight on and off, but no text.

I will try oatley electronics next week..... by the way Dippy, I paid AU$27 for the LCD from Ocean Controls... excellent next day service.

Apologies for my spelling, fingers going faster than the brain.....

My main project is to build an eight channel temp logger hooked up to my home network and the DS18B20 sensors connected via my CAT6 structured cabling.... (water tank level and mail box sensor as well)

I wanted the LCD so I can confgure and tune the picaxe system before hooking up to my network.

Thanks again, it's 10:30pm here so time to go and sleep on this one....
 

hippy

Technical Support
Staff member
When you get back to it, strip the backlight handling code out, just use a simple SEROUT x,y,("Hello") and aim to get that working without dropping or corrupting the first character.

When behaviour changes, go back to earlier versions of code and check the behaviour is still the same as it was before. If different, wires may have been dislodged, snapped off, or batteries may be going flat.

Also remember that LCD's may behave differently when first powered up to when they have already had stuff sent to them. If one test locks up an LCD subsequent tests may never work.
 

eclectic

Moderator
Curiouser and curiouser

I've just REtried the program from post #8

4 x AA NiMh (Loaded voltage ~5.00)

First run. Blank screen.
Press reset button. Text is displayed.
Disconnect the batteries. Wait ten seconds. Re-connect.
Blank screen until reset.

Then, I increased the pause to 5000.
(Copied from Prof Anderson's program, p. 5 of the Oatley datasheet)

Works first time. Then works after reconnection.

Hmm?
 

Dippy

Moderator
Well spotted ec.

That is a long pause innit. I've never seen anything that slow. Looks fudgey to me. But if it works...
 

loc243

New Member
Not so much a problem with serial LCD solved

Thanks Hippy, Dippy and Ec....

I snuck out of bed to give it one more go and guess what.... I increased the pause to 5000 and bingo its working. (I get onto the forum again and you have come up with the same explanantion... great minds think...)

pls find my code below used to show temp from a BS18B20 and display it on the LCD... simple but it may help someone starting out like me...

symbol degrees=b1
symbol tenths=b2
symbol counter=b3

High 1
Pause 5000 'wait for LCD to boot
serout 1,t2400,("?f") 'Clear the LCD

main:
for b3 =1 to 60 'setup loop for 59 readings
readtemp12 1,w1 'get temp from DS18B20
w1=w1*10/16 'convert temp into decimal
degrees = w1/10
tenths = w1//10
serout 1,t2400,("?y0?x00Current Temp ",#degrees,".",#tenths," C") 'select cursor position column 1, line 1 and show temp reading
pause 250
next b3
end

I am really enjoying this, it takes be back to the days of GWbasic on my first 8088 PC...

Thanks again for everything...
 

hippy

Technical Support
Staff member
That's an incredibly long time for an LCD controller to get up to working speed. I can't imagine what it's doing during that time. It's so unusual that it may be there is some other problem as well. Might be worth emailing Oatley to ask if this is usual ( and why ) and searching t'interweb to see what start-up times others may be reporting.
 

pha555

Senior Member
When the LCD is reset or powered up, a splash screen is displayed for 2.5 seconds. So, I suspect a 3000 ms delay would also work as well as the 5000.

On later designs, (LCD #118) the user may turn the splash screen off and bypass this delay.

Peter H Anderson
 

eclectic

Moderator
LOC.
My trusty DXAtlas shows that it's 04.50 in East-Oz.
But, you may already have solved this in your sleep.

Firstly, add the highlighted lines to your program.
Run the program and watch the display for about a minute.
Code:
pause 250 

serout 1,t2400,("?y2?x00",#counter) '***********
next b3
serout 1,t2400,("?y3?x00The End") '***********

end
Then, have a look at Manual 1, page 39.

e (and o.e.)
 
Top