get LCD to blink cursor at designated position

Berny

Member
I am trying to get my LCD, https://www.sparkfun.com/products/9568 , to leave a blinking cursor at the position in the attached code. I have searched this forum and Google but with no luck, at least that I could understand. Any help would be appreciated.

#picaxe 08m2
setfreq m8

high LCDwrite 'enable the write pin
pause 100
serout LCDwrite,Baudmode,(254,1) 'reset the LCD
serout LCDwrite,Baudmode,(254,212,"Enter Password ") 'write message to line 4
pause 10
for b15 = 0 to 254
serout LCDwrite,Baudmode,(254,227,b15) 'try to make cursor at postion 15 blink
pause 300
next b15
end
 

hippy

Ex-Staff (retired)
I am not sure if your 212 and 227 positioning values are correct. From the manual, which isn't entirely clear, I would try the following ...

serout LCDwrite,Baudmode,(254,128,"Enter Password ")
serout LCDwrite,Baudmode,(254,143)
serout LCDwrite,Baudmode,(254,0x0E)

Then adjust the positioning values (128 and 143) as appropriate
 

Berny

Member
Hippy,
Thank you for the suggestion. The values are correct for using the last 2 lines of the 20 char/4 line display. Your suggestion did get me a horizontal bar but it does not blink. I agree the manual is not very useful. Another page I found is here, www.geocities.com/dinceraydin/lcd/commands.htm, but I could not get the values shown to work either. I will keep searching for a solution and post it should I find one. Thanks
 

westaust55

Moderator
Hippy gave you a command line with the parameter/value $0E which by the link you give above is for an underline character.
The same webpage indicates $0F for a blinking block in the desired character position.
Have you tried that?

The core informations to send commands to most LCDs can be found on page 24 here:
https://www.sparkfun.com/datasheets/LCD/HD44780.pdf
Specific to cursors and blinking see the fourth line down in table 6.
 
Last edited:

Berny

Member
My bad .... this now works. THANK YOU!

setfreq m8
high LCDwrite
pause 100
serout LCDwrite,Baudmode,(254,1)
pause 500
serout LCDwrite,Baudmode,(254,148,"Newton 2014")
pause 10
serout LCDwrite,Baudmode,(254,212,"Enter Password")
pause 50
serout LCDwrite,Baudmode,(254,227)
serout LCDwrite,Baudmode,(254,0x0F) '0x0F
pause 500
end
 
Top