Jump to content

Recommended Posts

Posted

Hello,

It's nice to see this website has inscreased with the time. I used to refer in my University projects due to the simplicity and detailed information.

I still using pic's and in this case is not for MIDI but for music as usual.

In this particular I have bought a WINSTAR LCD 144x32 that comes with a ST7920 Controller.

I have managed to see the rom characters on the screen but I like to boost the graphics. I read the datasheets and I have supposed to write a code to store a dummy character in the user ram. But I cannot see it anywhere in the display.

Here is the relevent code (subroutines for wrting command or data seems to b ok as I managed to see the rom characters on the display):

start

CLRF PORTD

CLRF PORTH

MOVLW 0X00

MOVWF TRISH

MOVWF TRISD

MOVLW B'10000000'

MOVWF T0CON

CALL DELAY

MOVLW B'00111000' ;SET UP 8 BIT MODE-4, BASIC INST-2

CALL WRITE_DIS_COMMAND

MOVLW B'00111000' ;

CALL WRITE_DIS_COMMAND

MOVLW B'00001110' ;SWITCH LCD ON-2, CURSOR-1, BLINKING-0

CALL WRITE_DIS_COMMAND

MOVLW B'00000001' ;DISPLAY CLEAR

CALL WRITE_DIS_COMMAND

MOVLW B'00000110' ;ENTRY MODE: INCREASE-1,SHIFT-0

CALL WRITE_DIS_COMMAND

MOVLW B'01000000' ;address cgram 00

CALL WRITE_DIS_COMMAND

;load  chars to cgram

MOVLW 0X0A

CALL    WRITE_DIS_DATA

MOVLW 0X11

CALL    WRITE_DIS_DATA

MOVLW 0X0E

CALL    WRITE_DIS_DATA

MOVLW 0X04

CALL    WRITE_DIS_DATA

MOVLW 0X1F

CALL    WRITE_DIS_DATA

MOVLW 0X04

CALL    WRITE_DIS_DATA

MOVLW 0X0A

CALL    WRITE_DIS_DATA

MOVLW 0X11

CALL    WRITE_DIS_DATA

MOVLW B'10000000'

CALL WRITE_DIS_COMMAND

MOVLW B'00000001'

CALL WRITE_DIS_DATA

Unfortunatelly again I can see only the rom characters (happy face....ascii chars) but not anything else.

Any help will be must appreciated even some source code in your new c based operating system could help me to see what the hell I am doing wrong. 

Thanks in advance.....JG

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...