Allen, I had tried it earlier and I took it out because it was being set=20 to 0. I just put it back in and it still doesn't work. No activitiy on=20 the PORTA or D lines. I'm completely lost. I don't know what else to do. Thanks, rich! On 10/20/2015 10:59 AM, Allen Mulvey wrote: > I haven't been following this too closely but I don't see > ADCON0 set in there. > > This is what I use: > ADCON0 =3D 0; // adc off > ADCON1 =3D 7; // all > digital > CMCON =3D 7; // > Comparators off > > Allen > >> -----Original Message----- >> From: piclist-bounces@mit.edu [mailto:piclist- >> bounces@mit.edu] On Behalf Of Richard R. Pope >> Sent: Tuesday, October 20, 2015 11:45 AM >> To: Microcontroller discussion list - Public. >> Subject: Re: SV: SV: SV: SV: [PIC]: Trying to get a > 16F877A to >> talk to an LCD! >> >> Jan-Erik, >> There is no activity on either PORTA or D. The blip > that I see >> is >> probably just the pin burbbing on application of the > power. I >> know that >> the chip is running because the OSC is running. >> Well I have reduced this to the absolute minimal > code. Here >> it is: >> #pragma config FOSC =3D HS, #pragma config WDTE > =3D >> OFF, >> #pragma config PWRTE =3D OFF >> #pragma config BOREN =3D OFF, #pragma config > LVP =3D >> ON, >> #pragma config CPD =3D OFF >> #pragma config WRT =3D OFF, #pragma config CP =3D > OFF >> ADCON1 =3D 7; >> CMCON =3D 7; >> >> PORTA =3D 0; >> PORTD =3D 0; >> >> TRISA =3D 0; >> TRISD =3D 0; >> >> en =3D 0; >> Init: >> PORTA =3D 0; >> PORTD =3D 0; >> wait(5); >> PORTA =3D 1; >> NOP(); >> NOP(); >> NOP(); >> PORTD =3D 1; >> NOP(); >> NOP(); >> NOP(); >> wait(5); >> goto Init; >> It doesn't get much simpler than that. There is a 8MHz > crystal >> hooked up >> to the OSC pins. It is running at 7.9997 MHz. The caps =3D > 47pF. >> As per >> the data sheet the FOSC =3D HS. Almost everything else is > turned >> off. What >> do you think? Any ideas from anybody? >> Thanks, >> rich! >> >> --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .