Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

User defined characters-alfanumeric LCD

Status
Not open for further replies.

ady689

New Member
Haw I write a rutine in MPASM to generate user defined charcters on a alfanumeric LCD, i find a similary example but is write in C++ and i dont undersant..nothing....Can you help me?
 
I read this tutorial, and he is not what i want




Purpose: - Load a user-defined character definition into the HD44780 character generator memory.

Quick explanation on how to implement user-defined characters:

First you will need to make a pixel definition for the characters
you want to use. Below is the pixel definition for an underlined
'0' (char code 0x30) based on a 5x7 dots character definition:

| bits | byte
row | 76543210 | value
------------------------
000 | xxx | 0x0E
001 | x x | 0x11
010 | x xx | 0x13
011 | x x x | 0x15
100 | xx x | 0x19
101 | x x | 0x11
110 | xxx | 0x0E
111 | xxxxx | 0x1F
 
I think the datasheet states clear enough.
Set DDRAM address, CGRAM address and followed by CGRAM data.
 
ady689 said:
i dont understand very good, practicaly can you give me an concrete example?

hi,
Attached is a Oshonsoft Basic program and its asm listing output.
You should be able to figure out how defined characters are created and used.

Hope this helps.

EDITED: its best to download the *.asm to view off line, else there is no formatting!
 
Last edited:
It goes like this,

MOVLW B'01000000' ;USER GRAPHIC 0
CALL COMMAND ;SENT TO LCD AS COMMAND
MOVLW B'00000000' ;PIXEL DATA 1 OF 7
CALL DISPLAY ;SENT TO LCD AS DATA

Then to actualy print the user graphic

MOVLW .0 ;USER GRAPHIC POINTER
CALL DISPLAY ;SENT TO LCD AS DATA
 
Status
Not open for further replies.

Latest threads

Back
Top