>> >Hi I meant by two rows at the end as opposed to one row of terminals >across the top of the lcd module as these seem to be the two standards I >see most.My module arrived today and I am still seeking software help. >The software and FAQ that I have recieved and found so far are for other >pic,s than the 84' and did little to satisfy me. >As to the rb1-7 I simply meant those were the pins I had chosen to drive >the display. When you have a 7x2 connector, this simply means that the pins are put in this order: 7x2 Gnd - 1 2 - Vcc Contrast - 3 4 - R/W - Typically Held Low (for Instructions E - 5 6 - R/S Bit 0 - 7 8 - Bit 1 Bit 2 - 9 10 - Bit 3 Bit 4 - 11 12 - Bit 5 Bit 6 - 13 14 - Bit 7 This can be connected to easily using Ribbon ("Scotchflex") Connectors. As for Code, here's a post earlier from Walt Banks of Bytecraft. You should be able to use it pretty much directly (but you may want to change some pin definitions): #include /******************************************************** * Device driver for 4 bit LCD interface using * * Hitachi H2570 controllers. These displays are in * * configurations from one line by 16 characters to * * 4 lines by 40 characters * * * * No warranty is implied or given as to * * their usability for any purpose. * * * * (c) Copyright 1990 * * Byte Craft Limited * * Waterloo, Ontario * * Canada N2J 4E4 * * (519) 888-6911 * * * * Walter Banks * ********************************************************/ 0000 registerx index; #pragma option p ; /* --------------- | | | Pn0 |--------------------------\ Pn1 |--------------------------+\ Pn2 |--------------------------++\ Pn3 |--------------------------+++\ E Clock Pn4 |-------------------\ |||| Register Pn5 |-------------------+-\ |||| Select Pn6 |- | | |||| Pn7 |- | | |||| | | | |||| | | | |||| | | | |||| | Vcc | | |||| --------------- | | | |||| |---- | | |||| | | | | |||| - | | | |||| 20K | <---+ | | |||| pot | ||| | |||| ----------+++ | |||| | 1 |||||||||||||| 14 | ---------------------------- --- | .............. | - | Liquid Crystal Display | | | ---------------------------- */ 0005 #define LCDdata PORTD /* Data output */ 0006 #define LCD_RS PORTD.5 /* Register select bit */ 0007 #define LCD_E PORTD.4 /* Clock bit */ /******************************************************** * wLCDdat - Write data word to LCD peripheral * * Enter with data word in accumulator * * Delay w120fS after data write * ********************************************************/ void wLCDdat(unsigned int tempa) 0035 { 001B 1283 BCF STATUS,RP0 001C 00B5 MOVWF 35 /* Write HI nybble word to LCD */ 001D 00A1 MOVWF 21 LCDdata = tempa >> 4; 001E 0EA1 SWAPF 21 001F 300F MOVLW 0Fh 0020 0521 ANDWF 21,W 0021 0088 MOVWF PORTD 0022 1688 BSF PORTD,5 LCD_RS = 1 ; /* RS->1 */ 0023 1608 BSF PORTD,4 LCD_E = 1 ; /* E->1 */ 0024 1208 BCF PORTD,4 LCD_E = 0 ; /* E->0 */ 0025 1288 BCF PORTD,5 LCD_RS = 0 ; /* RS->0 */ 0026 300F MOVLW 0Fh LCDdata = tempa & 0x0f; 0027 0535 ANDWF 35,W /* Write LO nybble word to LCD */ 0028 0088 MOVWF PORTD 0029 1688 BSF PORTD,5 LCD_RS = 1 ; /* RS->1 */ 002A 1608 BSF PORTD,4 LCD_E = 1 ; /* E->1 */ 002B 1208 BCF PORTD,4 LCD_E = 0 ; /* E->0 */ 002C 1288 BCF PORTD,5 LCD_RS = 0 ; /* RS->0 */ 002D 3014 MOVLW 14h index = 20; 002E 0084 MOVWF FSR 002F 0384 DECF FSR while (--index); /* 120usec $$$$*/ 0030 0804 MOVF FSR,W 0031 1903 BTFSC STATUS,Z 0032 2834 GOTO 0034h 0033 282F GOTO 002Fh 0034 0008 RETURN } /********************************************************* * wLCDctrl4 - Write control word to LCD peripheral * * configured as a 4 bit interface * * Enter with control word in accumulator * * Delay w4.5mS if A=0x01 or 0x02 else delay w120fS * *********************************************************/ void wLCDctrl4(unsigned int tempa) 0036 { 0035 1283 BCF STATUS,RP0 0036 00B6 MOVWF 36 /* Write HI nybble to LCD */ 0037 00A1 MOVWF 21 LCDdata = tempa >> 4; 0038 0EA1 SWAPF 21 0039 300F MOVLW 0Fh 003A 0521 ANDWF 21,W 003B 0088 MOVWF PORTD 003C 1608 BSF PORTD,4 LCD_E = 1 ; /* E->1 */ 003D 1208 BCF PORTD,4 LCD_E = 0 ; /* E->0 */ 003E 300F MOVLW 0Fh LCDdata = tempa & 0x0f; /* Write LO nybble to LCD */ 003F 0536 ANDWF 36,W 0040 0088 MOVWF PORTD 0041 1608 BSF PORTD,4 LCD_E = 1 ; /* E->1 */ 0042 1208 BCF PORTD,4 LCD_E = 0 ; /* E->0 */ 0043 3014 MOVLW 14h index = 20; 0044 0084 MOVWF FSR 0045 0384 DECF FSR while (--index); /* 120usec */ 0046 0804 MOVF FSR,W 0047 1903 BTFSC STATUS,Z 0048 284A GOTO 004Ah 0049 2845 GOTO 0045h 004A 3002 MOVLW 02h if (tempa <= 2) 004B 1283 BCF STATUS,RP0 004C 0236 SUBWF 36,W 004D 1903 BTFSC STATUS,Z 004E 2851 GOTO 0051h 004F 1803 BTFSC STATUS,C 0050 2860 GOTO 0060h 0051 { 0051 0384 DECF FSR while (--index); 0052 0804 MOVF FSR,W /* 4.6 ms or so delay */ 0053 1903 BTFSC STATUS,Z 0054 2856 GOTO 0056h 0055 2851 GOTO 0051h 0056 0384 DECF FSR while (--index); 0057 0804 MOVF FSR,W 0058 1903 BTFSC STATUS,Z 0059 285B GOTO 005Bh 005A 2856 GOTO 0056h 005B 0384 DECF FSR while (--index); 005C 0804 MOVF FSR,W 005D 1903 BTFSC STATUS,Z 005E 2860 GOTO 0060h 005F 285B GOTO 005Bh } 0060 0008 RETURN } void initLCD(void) { /* LCD display peripheral initialization */ 0061 3024 MOVLW 24h wLCDctrl4(0x24); 0062 2035 CALL 0035h /* Function Set-4-bit,1-line,5X7 */ 0063 300C MOVLW 0Ch wLCDctrl4(0x0c); 0064 2035 CALL 0035h /* Display on, Cursor off */ 0065 3006 MOVLW 06h wLCDctrl4(0x06); 0066 2035 CALL 0035h /* entry mode- Inc addr, no shift */ 0067 3001 MOVLW 01h wLCDctrl4(0x01); 0068 2035 CALL 0035h /* Clear Display */ 0069 0008 RETURN } void putcharLCD(char sci_char) /* Send a character to the LCD display */ 0037 { 006A 1283 BCF STATUS,RP0 006B 00B7 MOVWF 37 006C 300A MOVLW 0Ah if ((sci_char == 0x0a) || 006D 0237 SUBWF 37,W (sci_char == 0x0d)) /* Look for a LF */ 006E 1903 BTFSC STATUS,Z 006F 2874 GOTO 0074h 0070 300D MOVLW 0Dh 0071 0237 SUBWF 37,W 0072 1D03 BTFSS STATUS,Z 0073 2877 GOTO 0077h 0074 3001 MOVLW 01h wLCDctrl4(0x01); /* Clear Display */ 0075 2035 CALL 0035h 0076 287A GOTO 007Ah else 0077 1283 BCF STATUS,RP0 wLCDdat(sci_char); 0078 0837 MOVF 37,W 0079 201B CALL 001Bh 007A 0008 RETURN } Good Luck! myke Today, the commercial sector is advancing computer and communication technology at a breakneck pace. In 1992, optical fiber was being installed within the continental U.S. at rates approaching the speed of sound (if computed as total miles of fiber divided by the number of seconds in the year). Aviation Week and Space Technology, October 28, 1996