LCDInfo.com

http://www.lcdinfo.com
It is currently Thu Nov 21, 2024 21:42

All times are UTC + 2 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Mon Jul 11, 2005 18:38 
Offline

Joined: Wed Jul 06, 2005 19:44
Posts: 1
Hello, I'm new in this forum and I have a problem with the inicialitzacion of a graphic lcd (powertip 128x64). The code that I use follows the instructions that toshiba says in his datasheet (the datasheet of the controller). This is what i've done:

INIT_LCD
BSF PORTD,RST
BSF PORTD,LCD_WR
BSF PORTD,LCD_RD
BSF PORTD,CD

BCF PORTD,RST

MOVLW 0xff
CALL X_DELAY500
MOVLW 0xff
CALL X_DELAY500
MOVLW 0xff
CALL X_DELAY500
MOVLW 0xff
CALL X_DELAY500
MOVLW 0xff
CALL X_DELAY500
MOVLW 0xff
CALL X_DELAY500
MOVLW 0xff
CALL X_DELAY500



BSF PORTD,RST

BCF PORTD,CD;text home addres set
BCF PORTD,LCD_WR
MOVLW 0x00
MOVWF PORTB
BSF PORTD,LCD_WR
MOVLW 0xff
CALL X_DELAY500

BCF PORTD,LCD_WR
MOVLW 0x00
MOVWF PORTB
BSF PORTD,LCD_WR
MOVLW 0xff
CALL X_DELAY500

BSF PORTD,CD
BCF PORTD,LCD_WR
MOVLW 0x42
MOVWF PORTB
BSF PORTD,LCD_WR
BCF PORTD,CD
MOVLW 0xff
CALL X_DELAY500



BCF PORTD,CD;text area set command
BCF PORTD,LCD_WR
MOVLW 0x10
MOVWF PORTB
BSF PORTD,LCD_WR
MOVLW 0xff
CALL X_DELAY500

BCF PORTD,LCD_WR
MOVLW 0x00
MOVWF PORTB
BSF PORTD,LCD_WR
MOVLW 0xff
CALL X_DELAY500

BSF PORTD,CD
BCF PORTD,LCD_WR
MOVLW 0x43
MOVWF PORTB
BSF PORTD,LCD_WR

MOVLW 0xff
CALL X_DELAY500


BCF PORTD,CD;ADDRES POINTER SET COMMAND
BCF PORTD,LCD_WR
MOVLW 0x00
MOVWF PORTB
BSF PORTD,LCD_WR
MOVLW 0xff
CALL X_DELAY500

BCF PORTD,LCD_WR
MOVLW 0x08
MOVWF PORTB
BSF PORTD,LCD_WR
MOVLW 0xff
CALL X_DELAY500

BSF PORTD,CD
BCF PORTD,LCD_WR
MOVLW 0x40
MOVWF PORTB
BSF PORTD,LCD_WR
MOVLW 0xff
CALL X_DELAY500

BCF PORTD,CD;SET TEXT AREA SET
BCF PORTD,LCD_WR
MOVLW 0x10
MOVWF PORTB
BSF PORTD,LCD_WR
MOVLW 0xff
CALL X_DELAY500

BCF PORTD,LCD_WR
MOVLW 0x00
MOVWF PORTB
BSF PORTD,LCD_WR
MOVLW 0xff
CALL X_DELAY500

BSF PORTD,CD
BCF PORTD,LCD_WR
MOVLW 0x41
MOVWF PORTB
BSF PORTD,LCD_WR
MOVLW 0xff
CALL X_DELAY500


BSF PORTD,CD;mode set
BCF PORTD,LCD_WR
MOVLW 0x80
MOVWF PORTB
BSF PORTD,LCD_WR
MOVLW 0xff
CALL X_DELAY500
MOVLW 0xff
CALL X_DELAY500

BSF PORTD,CD
BCF PORTD,LCD_WR
MOVLW 0x9E
MOVWF PORTB
BSF PORTD,LCD_WR
MOVLW 0xff
CALL X_DELAY500
MOVLW 0xff
CALL X_DELAY500

BCF PORTD,CD
BCF PORTD,LCD_WR
MOVLW 0x23
MOVWF PORTB
BSF PORTD,LCD_WR
MOVLW 0xff
CALL X_DELAY500

BCF PORTD,LCD_WR
MOVLW 0x01
MOVWF PORTB
BSF PORTD,LCD_WR
MOVLW 0xff
CALL X_DELAY500

BSF PORTD,CD
BCF PORTD,LCD_WR
MOVLW 0x24
MOVWF PORTB
BSF PORTD,LCD_WR
MOVLW 0xff
CALL X_DELAY500

BCF PORTD,CD
BCF PORTD,LCD_WR
MOVLW 0x21
MOVWF PORTB
BSF PORTD,LCD_WR
MOVLW 0xff
CALL X_DELAY500
MOVLW 0xff
CALL X_DELAY500

BSF PORTD,CD
BCF PORTD,LCD_WR
MOVLW 0xC0
MOVWF PORTB
BSF PORTD,LCD_WR
MOVLW 0xff
CALL X_DELAY500

RETURN

I use a pic 16f877. In the display only appears a line, and then disappears. Somebody can help me?
Thank you


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 2 hours


Who is online

Users browsing this forum: Google [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group