Help please, using 14m2 and LCD from sparkbright.

JPU

Senior Member
Hi

Please can someone help with this. I have a 14m2, I was using this chip with an LCD screen called texstar. I have been using this combination for a couple of years without problems, However the texstar LCD from coolcomponents is no longer available. I need a similar low porfile LCD for our product. (I couldnt get the screen from PICAXE to fit in our box, otherwise I would have used that). I have sourced a screen from Sparkbright sold by proto-pic that has a low profile (SERIAL ENABLED 16X2 LCD - WHITE ON BLACK 5V)

Unfortunaly the info and help files associated with it are limited and I am uable to change the baud rate of this lcd. I can send and display data at 9600baud which is the default but I need to display info at 2400baud to suit my application. Can someone please explain how I change the baud rate using my PICAXE serial port as the helpfiles associated with this product talk in "Arduino" and talk about things like "send a special character" followed by control K..??? (I am not familar with arduino!!)

please see paragraph 3.4 on this PDF

Any help appreciated.

Thanks

JPU
 

BeanieBots

Moderator
The 'special' character according to the datasheet is "124". This must be sent to request a new baud rate.
To select a baud rate of 2400, you must then send "ctrl-k". This is usually the command for vertical tab (ASCII 11)

Try sending 124 then 11 at 9600 baud to convert it to 2400 baud.
 

JPU

Senior Member
HI

Thanks for the reply

I did try this
Code:
SETFREQ M8
serout b.1,T9600_8,(124,11)
setfreq m4
do 
serout b.1,T2400_8,(254,128)
serout b.1,T2400_8,("TEST")

pause 1000
serout b.1,T2400_8,(254,128)
serout b.1,T2400_8,("----")
pause 1000
loop
it works if I rem out lines 1 and 2 and set the baud to 9600 on all serout commands but as soon as I try to change the baud I get garbage on the screen.

Any thughts? Please.
 

JimPerry

Senior Member
HI

Thanks for the reply

I did try this
Code:
SETFREQ M8
serout b.1,T9600_8,(124,11)
setfreq m4
do 
serout b.1,T2400_8,(254,128)
serout b.1,T2400_8,("TEST")

pause 1000
serout b.1,T2400_8,(254,128)
serout b.1,T2400_8,("----")
pause 1000
loop
it works if I rem out lines 1 and 2 and set the baud to 9600 on all serout commands but as soon as I try to change the baud I get garbage on the screen.

Any thughts? Please.
Line 3 changes to 4MHz - but you are sending at _8 MHz :confused:
 

hippy

Ex-Staff (retired)
If you specify N2400_8, but are running at 4MHz as set by the line 3 "SETFREQ M4", you will be sending data at 1200 baud not the desired 2400 baud.
 

JPU

Senior Member
If you specify N2400_8, but are running at 4MHz as set by the line 3 "SETFREQ M4", you will be sending data at 1200 baud not the desired 2400 baud.
Thanks, so I should be then sending the data like this

Code:
SETFREQ M8
serout b.1,T9600_8,(124,11)
setfreq m4
do 
serout b.1,T4800_8,(254,128)
serout b.1,T4800_8,("TEST")

pause 1000
serout b.1,T4800_8,(254,128)
serout b.1,T4800_8,("----")
pause 1000
loop

If this is the case, I am now totally confused. As I managed to get the Texstar screen to work using n2400_8 at 4Mhz and I know that the Textstar LCD was set to a baud rate of 2400 as it has a in built menu.

???I am confussed!!
 

hippy

Ex-Staff (retired)
If this is the case, I am now totally confused. As I managed to get the Texstar screen to work using n2400_8 at 4Mhz and I know that the Textstar LCD was set to a baud rate of 2400 as it has a in built menu.
Something is not right there. Either the code was not how you believe it was or the LCD was accepting 1200 baud rate.

When specifying the PICAXE baud rate it is best to use the polarity and baud rate you want and a frequency suffix which matches the frequency the PICAXE is running at. A mismatch of suffix and frequency simply leads to confusion.
 
Top