Just a suggestion. Make sure that the data is presented and the RS line set to its correct state and then toggle the E line. I don't like the E line high when presenting the data I think it has the potential for trouble... Ohh and a gotcha... RAA4 is open drain have you fitted the resistor ??? Steve -----Original Message----- From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On Behalf Of threewheeler7 Sent: 07 January 2010 20:12 To: piclist@mit.edu Subject: [PIC] 24x1 LCD Hello World Prog Blank Screen. (ASM) I am using the now famous WDC2401P 24x1 LCD from AllElectronics. For those of you that do not know this LCD, it is famous because it runs $.99-$1.85, making it one of the cheapest alpha-numeric LCDs on the internet. It is cheep because, 1. It is hardwired for 8-bit mode, 2. It's connector has its pins spaced at a non-standard .05" spacing, and 3. It's controller is an HD66717, not the more common Hitachi 44780 controller. I have many programs I would like to port over to this cheep LCD, but when writing a simple test program for it, I get nothing on the screen. My code is based on the HD66717's data sheet, the LCD's data sheet, and the useful info on this particular LCD at http://www.serialwombat.com/parts/lcd111.htm, which I thought explains the protocol pretty clearly. I have gone over it and over it and I cannot seem to see anything wrong with my code, or circuit, I need another set of eyes. I have it hooked up as follows: LCD's E line to RA2, LCD's RS line to RA4, LCD,s Reset line to RA3, and LCD D0-D7 to RB0-RB7. LCD's R/W pin is tied to ground. Code: LIST p=16F648a ;tell assembler what chip we are using #include "P16F648a.inc" ;include the defaults for the chip __config 0x3D18 ;Internal osc IO on RA6/RA7, WDT off, PUT off, MCLRE disabled, BODEN disabled, LVP disabled, CPD disabled, CP off #DEFINE LCD_E PORTA,2 #DEFINE LCD_RS PORTA,4 #DEFINE LCD_RESET PORTA,3 cblock 0x20 LCD_Temp count1 counta countb countc endc org 0x00 Setup movlw 0x07 movwf CMCON ;turn comparitors off bsf STATUS, RP0 ;select bank 1 movlw b'00100000' ;all but RA5 output movwf TRISA movlw b'00000000' ;all output movwf TRISB bcf STATUS, RP0 ;select bank 0 clrf PORTB clrf PORTA bsf LCD_RESET call Delay255 call LCD_Init Start movlw 'H' ;Print "Hello World!" call LCD_Char movlw 'e' call LCD_Char movlw 'l' call LCD_Char movlw 'l' call LCD_Char movlw 'o' call LCD_Char movlw ' ' call LCD_Char movlw 'W' call LCD_Char movlw 'o' call LCD_Char movlw 'r' call LCD_Char movlw 'l' call LCD_Char movlw 'd' call LCD_Char movlw '!' call LCD_Char Stop goto Stop ; Endless loop LCD_Init bcf LCD_RESET ;bring reset pin low for 20Ms to reset controller call Delay20 bsf LCD_RESET ;bring back high call Delay20 movlw 0x1c ;Turn on the lcd driver power call LCD_Cmd movlw 0x14 ;Turn on the character display call LCD_Cmd movlw 0x28 ;Set two display lines (The hd66717 considers 12 characters to be a line. Our 24 character display is actually two 12-character lines right next to each other). call LCD_Cmd movlw 0x4f ;Set to darkest contrast call LCD_Cmd movlw 0xe0 ;Set the data address to the first character call LCD_Cmd return LCD_Clr movlw 0x01 ;clear LCD call LCD_Cmd return LCD_Char bcf LCD_E ;Make sure Enable line is low nop bsf LCD_RS ;Bring register select HIGH to go to data reg nop bsf LCD_E ;Bring Enable line high nop movwf PORTB ;Present data to port nop bcf LCD_E ;Bring data line back low call Delay5 ;Delay 5 Ms between data and commands return LCD_Cmd bcf LCD_E ;Make sure Enable line is low nop bcf LCD_RS ;Bring register select LOW to go to command reg nop bsf LCD_E ;Bring Enable line high nop movwf PORTB ;Present data to port nop bcf LCD_E ;Bring data line back low call Delay5 ;Delay 5 Ms between data and commands return Delay255 movlw 0xff ;delay 255 mS goto d0 Delay100 movlw d'100' ;delay 100mS goto d0 Delay50 movlw d'50' ;delay 50mS goto d0 Delay20 movlw d'20' ;delay 20mS goto d0 Delay5 movlw 0x05 ;delay 5ms d0 movwf count1 d1 movlw 0xC7 ;delay 1mS movwf counta movlw 0x01 movwf countb Delay_0 decfsz counta, f goto $+2 decfsz countb, f goto Delay_0 decfsz count1 ,f goto d1 retlw 0x00 end -- View this message in context: http://old.nabble.com/24x1-LCD-Hello-World-Prog-Blank-Screen.-%28ASM%29-tp27 065753p27065753.html Sent from the PIC - [PIC] mailing list archive at Nabble.com. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist