Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body I can probably figure this by experiment but since it is likely to hit others at some stage a definitive answer from someone who really knows may be useful to others. I have implemented PICtoLCD using 4 byte. I needed to scroll the 16*2 line screen (new char goes to line2<15>,line2<0> goes to line1<15>, all other chars goes to line1<1> goes to line1<0>,lose line1,0>). I did this by reading all the chars and rewriting them to and from LCD (I know there are probably other better ways but I wanted flexibility). I built this on a piece of gash stripboard, wires going everywhere and it works AOK every time. I then rebuilt the whole project tidy on new stripboard using the strips wherever possible and now get spurious errors (space displayed as $ or &, P as T). Looks like if low bit is 0000 it gets read as 0010 or 0110 occassionally (in fact more often than not). It's gotta be the read code getting it wrong because all the non-scrolling write code works OK and most of the other alphabet chars are OK in scroll mode). Fairly sure it's not a soldering error because built it twice now and also if I position the board on a different insulator higher above the surface of my metal desk the pattern of $ and & changes (get all & rather than all $). It doesn't appear to be software because works AOK everytime on my gash board and have tried 3 different manufacturers LCD and get same work/don't work problem. So I guess it's a capacitive effect of the stripboard (the 16C84 is at 4Mhz) ?? Whats the best way to fix? (touching my fingers across the LCD pins seems to work!!!). Do the unused LCD data pins need tying low? Do I need caps from active LCD data pins to ground? DO I have a s'ware timing error that is borderline and works sometime (tried all sorts of delays etc and same resurlt) I need this to work for a demo so will circumvemt by maintaining a circular buffer in EEPROM and writing LCD direct from there but am curious to understand what might be going on here. Will attach the LCD 4 bit read code, someone might find it useful (I couldn't find any on the net) or someone might be able to point out a timing error. Thanks, Brian Brian Jones Java Technology Centre IBM Hursley Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Text from file 'read.asm.txt' Read_Data call Wait_Busy ;wait for LCD bsf STATUS, RP0 ; Select Register page 1 movlw 0xF0 ; Set port to input iorwf LCD_DATA_TRIS,W ; Only set upper half of port movwf LCD_DATA_TRIS bcf STATUS, RP0 ; Select Register page 0 bsf LCD_CNTL, RS ; Set LCD for Data mode bsf LCD_CNTL, R_W ; Setup to read bsf LCD_CNTL, E ;toggle E for LCD bcf LCD_CNTL, E movf LCD_DATA, W ; Read upper nibble data andlw 0xF0 ; Mask out lower nibble movwf Temp bsf LCD_CNTL, E ;toggle E for LCD bcf LCD_CNTL, E swapf LCD_DATA, W ; Read lower nibble data andlw 0x0F ; Mask out upper nibble iorwf Temp,F ; Combine nibbles bsf STATUS, RP0 ; Select Register page 1 movlw 0x0F andwf LCD_DATA_TRIS,W movwf LCD_DATA_TRIS ; Set Port for output bcf STATUS, RP0 ; Select Register page 0 movf Temp,W ;return with read data byte in W return