Em 6/8/2010 10:09, Carl Denk escreveu: > I am driving a 44780 LCD display 4 bit data mode with an 18F1320 with in= =20 > the common way, the 4 data signals are driven by RB4 - RB7. Using a=20 > PICKIT2 to program and debug the board. RB7 and RB6 are dual function=20 > also as PGC and PGD. I get an error when trying to program or debug with= =20 > this setup. The error goes away if I unplug the display ribbon cable. > > The PICKIT2 manual shows resistors going th the application on these 2=20 > signals, with the MCLR signal having "470 ohm*" resistor and below "=20 > *Typical". Should I interpret that, that my 2 resistors should be 470=20 > ohm also? And will that drive the LCD OK? Or is there a better way of=20 > doing this? > > I do have a stand alone programmer, but the requires pulling the chip=20 > each time. And pulling the ribbon cable each time isn't good either. > > I do have spare 1320 pins and could move the LCD data pins to eliminate=20 > the conflict, use a variable to do the shift 4 to send the other nibble,= =20 > but the programming gets a little messy. > > Thoughts?? > > Thanking in advance. :) Your problem may be the LCD's internal pull-ups on the data lines. It is stated in the documentation of ICD2 and ICD3 (and I suppose that PICKit2 is the same) that no pull-up should be used on PGC and PGD. The LCD's internal pull-ups are weak, perhaps if you add pull-downs on PGC and PGD to compensate it may work. Another possible cause may be bus contention due to the LCD's enable pin floating while the PIC is in reset and enabling the LCD's output drivers. If so, put a pull-down on the LCD's enable pin. Best regards, Isaac __________________________________________________ Fale com seus amigos de gra=E7a com o novo Yahoo! Messenger=20 http://br.messenger.yahoo.com/=20 --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .