LCD confused /

Lez T

Member
Hi all and Merry Christmas, I am using an Axe033 with a 18x, and would llike to hide the display while the stored messages load, I am using the commands as per the datasheet but the screen 'hides' but does not return, played hide and seek for a day or so now and cannot see what I am doing wrong.
Code:
init: pause 1000
	serout 7,n2400,(254,8)					'hide display
	pause 500							'short pause
	serout 7,n2400,(253,1,"Received code is")	'load mess #1
	pause 500							'short pause
	serout 7,n2400,(253,2,"      ..Store ? ")		'load mess #2
	pause 500							'short pause
	serout 7,n2400,(254,12)				'show display
	pause 500							'short pause
[code]

Please could one of the 'elders' ( meant in the wiseness terms rather than age) help me in where I am going wrong here.
Many thanks.
Lez.
 

kevrus

New Member
Merry Xmas...I don't have a display to hand but from the data sheet, ..each stored message must be 16 characters long and you need a 1000mS pause...your second message is only 11 characters long and your pause is only 500mS.
As a matter of interest, have you been able to show anything on the display?
 

eclectic

Moderator
@Lez.

As Kev says, you need 16 characters in the messages.

You'll also need 1000 pauses after the writes.
(AXE033 manual p.10)

This works, in simulation and on a real display.
Code:
#picaxe 18X

serout 7,n2400,(254,1) ;initialise  and clear screen
pause 100

serout 7,n2400,(253,1,"Received code is") 'load mess #1  16*****
pause 1000 'short pause

serout 7,n2400,(253,2,".......Store ? ") 'load mess #2  16 *****
pause 1000 'short pause


serout 7,n2400,(254,1)                  ;clear screen
pause 1000
serout 7,n2400,(254,128,"Merry Xmas :-)") ; line 1
pause 100
serout 7,n2400,(254,192,"From Picaxe")    ;line 2
pause 3000 ; show for 3 sec
 
serout 7,n2400,(254,8) 'hide display
pause 3000 'for 3 sec
serout 7,n2400,(254,12) 'show display
pause 3000 'for 3 sec

serout 7,n2400,(254,1)
pause 100

serout 7,n2400, (1)
pause 100
serout 7,n2400, (2)
pause 4000 ; 4 sec

serout 7, n2400,(254,1)
serout 7,n2400,(254,128,"Happy New Year")
serout 7,n2400,(254,192, "from Ec.  :-))")

You should be able to chop bits out for your own project.

e
 
Last edited:

russbow

Senior Member
E.C.

Just run your code in the sim, works fine thanks. didn't know you could blank & enable display like that.

A label before the hide display line & a goto the label after the restore delay
proves the code nicely.

A couple of queries though.

What does the 253 code do? ( 253,1,"xxx")

also what do these do?

Code:
serout 7,n2400, (1)
pause 100
serout 7,n2400, (2)
I guess the 253 stores the "xxx" in location 1 and the code snip recalls from
locations 1 and 2. Doesn't show on the sim though. Maybe needs some delay.

Thanks,

Russ
 

Lez T

Member
Kevrus and @e,
Apologies for the shortening of mesage #2, not sure how that happened, all my messages are of the correct length and display perfectly well, my problem is with the 'hide display' code 254,8 which works well, so that when the stored messages load it is not displayed, and 'restore display' code 254,12 which doesn't want to restore at all. I have 5 stored messages in the complete code and all of them work OK, I slowly cut down the time period between each message load and it was hit and miss at 350ms, so I used 500ms as my load time which works OK.
There are also some other messages that are one-off and are not stored in the display, they also work OK, it was just to 'hide' the loading of the stored messages that I was trying to do.
Thanks and Regards.
Lez.

@Russ, you are correct,
the 253 commands are write memory commands, there are spaces 1 - 7 for storing predefined messages. ie "serout 7,n2400,(253,1,"Received code is") 'load mess #1" puts the message inside the " " into storage area 1 for recall as required, using
Code:
	infrain2							'code 'ID' from IR 

	serout 7,n2400,(254,128)				'goto line1 pos1
	pause 50							'short pause
	serout 7,n2400,(1)					'display mess #1
	pause 1250							'short pause
	serout 7,n2400,(254,192)				'goto line2 pos1
	pause 50							'short pause	
	serout 7,n2400,(2)					'display mess #2
	pause 1250							'short pause
	serout 7,N2400,(254,192,#infra," ")			'display infra and mess #2
	pause 1000
[code]
and I have just discovered that messages in area's 1,3,5,7. are shown on line 1 of the display and messages in area's 2,4,6 are shown on line 2. That is unless you tell them to go elsewhere.
Regards.
Lez.
 
Last edited:
Top