Custom characters for hd44870

Thread Starter

Jns

Joined Oct 15, 2008
3
Hi I'm trying to make my own custom characters for a HD44780 LCD display
My current(part) of the code looks like this...
First it addresses the CG RAM and then it writes data to the 00000000 character code
4 bit interface should be mentioned
Can't get this to work even though I'm pretty sure I'm doing it right, can you guys see any wrongs in the code?


Rich (BB code):
char    movlw    0x40        ;CG RAM
        movwf    portb
        call    enable

        movlw      0x11        ;rad 1 - Schackrutor
        movwf    portb
        call    enable
        movlw    0x15
        movwf    portb
        call    enable
        movlw    0x10        ;rad 2
        movwf    portb
        call    enable
        movlw    0x1a
        movwf    portb    
        call    enable
        movlw      0x11        ;rad 3
        movwf    portb
        call    enable
        movlw    0x15
        movwf    portb
        call    enable
        movlw    0x10        ;rad 4
        movwf    portb
        call    enable
        movlw    0x1a
        movwf    portb    
        call    enable
        movlw      0x11        ;rad 5
        movwf    portb
        call    enable
        movlw    0x15
        movwf    portb
        call    enable
        movlw    0x10        ;rad 6
        movwf    portb
        call    enable
        movlw    0x1a
        movwf    portb    
        call    enable
        movlw      0x11        ;rad 7
        movwf    portb
        call    enable
        movlw    0x15
        movwf    portb
        call    enable
        movlw    0x10        ;rad 8 - Shackrutor
        movwf    portb
        call    enable
        movlw    0x1a
        movwf    portb    
        call    enable
The enable routine looks like this:
Portb is connected t the LCD-display on my board and portb,5 is used to send the data

Rich (BB code):
enable    bsf        portb,5
        call    waitms
        bcf        portb,5
        call    waitms
        return
 
Last edited:

Thread Starter

Jns

Joined Oct 15, 2008
3
Yup I have got the display to display any predefined character anywhere I want on the display, I have also made a counter that goes from 0-999. So I'm already familiar with the display.
 
Top