Playing with an AXE033, few questions...

pichutch

New Member
Hi, I ordered up an AXE033 LCD module and built it last night. Great little kit (although they didn't include a jumper for CLK, and it'd even greater if it was backlit). I also added the 'clock' just for completeness.

Now after tinkering and doing the "hello world" sort of thing I have a few questions. I've read and re-read the datasheet, and had a search about here but can't find what I'm looking for, so I hope one of you can help?

[assume I'm using serial mode not i2c]

1) I'm after a full list of 'Control Commands'. I found the 'scroll' ones ('254,24' for left, '254,28' for right), but guess there might be more to play with?

2) I notice that if I display a pre-saved 16 char message and scroll it using the 254,24 command, the message scrolls off screen leftwards for quite a while until it returns on the right. So I assume that there is a max length for a line, with only 16 chars being displayed. Anyone know how long this is?

3) Is there NO way to get the time /date on the top line? And is there a way to display just the time and not the date?

4) Are custom characters at all possible with the AXE033, or would I have to drive an LCD directly to achieve this?

5) How would I display one of the special characters shown in Appendix B of the datasheet? e.g. the ohms symbol.

Right that'll do, thanks a lot :)
 

Andrew Cowan

Senior Member
All is explained in the datasheet.

1) See the datasheet:

The most common control commands are
254,1 Clear Display (must be followed by a ‘pause 30’ command)
254,8 Hide Display
254,12 Restore Display
254,14 Turn on Cursor
254,16 Move Cursor Left
254,20 Move Cursor Right
254,128 Move to line 1, position 1
254, y Move to line 1, position x (where y = 128 + x)
254,192 Move to line 2, position 1
254, y Move to line 2, position x (where y = 192 + x)

Write commands are all prefixed by the number 253. They are used to program the
predefined messages, current time or alarm times into the Serial LCD module.
0 Set clock time
1-7 Set predefined messages 1-7
8 Set Alarm (date/time)
9 Set Alarm (interval)
10 Turn Alarm Off



2) Not sure, sorry. Why not work it out - count it?

3) I don't think there is.

4) I have used custom characters - there is a wizard in programming editor for creating them.

5) Not sure - but when I wanted a £ sign, although it was in Appendix B, I just made a custom character.

Andrew
 
Last edited:

Texy

Senior Member
2)...I suspect that the LCD 'module', or driver chip is designed to be used with different types of LCD, so it is probably scrolling for either 20, or more likely, 40 width displays, hence the delay before it comes back.


Texy
 

westaust55

Moderator
Re question5:
For the extra characters in the right half of the page in App B just print the value to the LCD screen. This can be determined from the values at the top and left of the table.

eg
SEROUT 7, N2400, ($F4) for the Omega (Ohms) symbol

Across the top starting at the space at the left mark the hexadecimal numbers:
2,3,4,5,6,7,8,9,A,B,C,D,E,F

Down the left starting at the top mark the hexadecimal numbers:
0,1, 2,3,4,5,6,7,8,9,A,B,C,D,E,F

The get the hexadecimal number first digit is the top number and second digit is the side number

Hope all that is clear
 
Last edited:

westaust55

Moderator
wrt item 3:

the way to display time and date or just the time on the top line is to use the AXE033 in i2c mode.
Then you read the data from the DS1307 RTC into the PICAXE and write it back out to the LCD display (still in i2c mode).

In i2c mode the LCD side acts as a dumb terminal/screen. I think that you will not have access to pre-defined messages or custom characters.
 

hippy

Ex-Staff (retired)
Staff member
1) I'm after a full list of 'Control Commands'. I found the 'scroll' ones ('254,24' for left, '254,28' for right), but guess there might be more to play with?

Assuming it's a HD44780 controlled LCD; for "254,n" the 'n' is simply the 8-bit command which would be sent to the LCD's Control Register. Have a read of a HD44780 datasheet.

2) I notice that if I display a pre-saved 16 char message and scroll it using the 254,24 command, the message scrolls off screen leftwards for quite a while until it returns on the right. So I assume that there is a max length for a line, with only 16 chars being displayed. Anyone know how long this is?

Probably 40 charcaters per line. This will be in the HD44780 datasheet.

4) Are custom characters at all possible with the AXE033

Should be. Using "SEROUT...($00)" to "...($07)" should show User Defined Character 0 through 7.They'll be garbage because you haven't defined what they are yet. If "...($00)" to "...($07)" doesn't work try "...($08)" to "...($0F)".

To program them it's a case of sending the right bytes. Untested, but this should program User Defined Character 3 -

SEROUT...(254,$51,$1F,$11,$1F,$04,$15,$0E,$04,$00)

Issue a clear screen then "SEROUT...($03)" to display it.

5) How would I display one of the special characters shown in Appendix B of the datasheet? e.g. the ohms symbol.

Usually just by sending its value. If the ohms symbol is $A5 then "SEROUT...($A5)"
 

pichutch

New Member
Brilliant, thanks all, I'll have another go later and put all this to use.

Sorry Andrew for not being clearer, I should have said that I was looking for command codes besides the ones in the datasheet. Thanks Hippy I'll try and work out any extras codes from the driver datasheet, although on first glance I got pretty lost.

Texy: 40 chars wide, yea that sounds about right, I'll measure it later. That'll be useful for scrolling longer messages me thinks.

West and Hippy, thanks for explaining the way that chars are output. The datasheet says (at the top of page 9) that there are only 2 methods:
"Characters can be output via two methods – either by using the ASCII number or the symbol enclosed in speech marks e.g. (65) and (“A”) both output the same symbol."
And I guess it should say that the hex code/address can be used too. "($41)" for "A" yea? Think its worth asking for this to be added/clarified?

Regarding your comments about custom chars, and user defined chars, it looks like (using the wizard that Andrew suggested) that addresses 8-15 can be used like so:
serout 0, N2400, ({8-15})
and programmed like:
serout 0, N2400, (254, 64, 59, 41, 59, 36, 36, 49, 63, 46)

I'll try this later, and try and work out why the wizard doesn't use '$' symbols like you did. I'm struggling with this hex business to be honest. But then I've only been playing with microcontrollers for about.. uh.. 5 hours in total? so I guess it takes a while to learn. I always want to know everything about a subject instantly!
 

hippy

Ex-Staff (retired)
Staff member
Character Codes 8-15 usually map to 0-7 but are handy in cases where 0-7 ( particularly 0 ) may have a special purpose or be used for something else.

Hex numbers are a bit weird at first but you'll pick it up. They are more often easier to use than decimal or binary because it's a compact notation and easy to convert to binary with a little practice. They're particulary useful when 'bits' of a byte are important ...

65 = %01000001 = $41

No idea why the CGRAM Wizard uses decimal rather than hex, as this is where hex and binary makes a lot more sense than decimal ...

Code:
31    $1F   %11111   #####
17    $11   %10001   #   #
31    $1F   %11111   #####
4     $04   %00100     #
21    $15   %10101   # # #
14    $0E   %01110    ###
4     $04   %00100     #
 

westaust55

Moderator
Good to hear that this has all made sense.

It is pretty much all there in the manual but can be hard to find at times.

An understanding of hexadecimal numbers can be a great help and maybe, as your suggest, a bit more in the manuals as an intro on binary and hexadecimal would be good for new comers.
 
Top