ON 20020930@3:50:55 AM at page: http://www.piclist.com/techref/member/NGS-EC-KA7/index.htm NGS-EC-KA7 Nicolaas Gerhardus Scheepers added 'Questions: I am contemplating getting the gun out of the safe and use it either on myself or on the pic 16F877. I succesfully talked to the LCD from a 16F84A with no problems. I then build myself the ICD. I went through the tutorial and succesfully tested it. I also ran a little program to count seconds on the LEDS of the demo board. So I am pretty sure there is nothing wrong with the ICD. I am now trying to use a LCD instead of the LEDS and are using the firmware I used on the 16F84a to display the seconds on the LCD. The only difference is that I am using PORTE for the ctrl lines and PORTC for the data lines. The LCD just keeps on showing me the middle finger. I can put my code up here cause it is going to look like I do not want to take the time to solve the problem myself because I have to put the whole listing here asking you to solve the problem but I think then one of you will shoot me. I am pretty sure I am overlooking something small like special setup of PORTE to use it for the CTRL or maybe something I have to change on the ICD demo board. I just dont know anymore. Did somebody else tried this from the ICD demo board before that I can have a peak at your code or your settings of MPLAB. Oh yes, I am using a RC oscillator @ 4Mhz. ' ON 20020930@3:52:59 AM at page: http://www.piclist.com/techref/member/NGS-EC-KA7/index.htm NGS-EC-KA7 Nicolaas Gerhardus Scheepers added 'Questions: I am contemplating getting the gun out of the safe and use it either on myself or on the pic 16F877.
I succesfully talked to the LCD from a 16F84A with no problems.
I then build myself the ICD. I went through the tutorial and succesfully tested it. I also ran a little program to count seconds on the LEDS of the demo board. So I am pretty sure there is nothing wrong with the ICD.
I am now trying to use a LCD instead of the LEDS and are using the firmware I used on the 16F84a to display the seconds on the LCD. The only difference is that I am using PORTE for the ctrl lines and PORTC for the data lines. The LCD just keeps on showing me the middle finger. I can put my code up here cause it is going to look like I do not want to take the time to solve the problem myself because I have to put the whole listing here asking you to solve the problem but I think then one of you will shoot me.
I am pretty sure I am overlooking something small like special setup of PORTE to use it for the CTRL or maybe something I have to change on the ICD demo board. I just dont know anymore. Did somebody else tried this from the ICD demo board before that I can have a peak at your code or your settings of MPLAB.
Oh yes, I am using a RC oscillator @ 4Mhz.
' ON 20020930@3:54:41 AM at page: http://www.piclist.com/techref/member/NGS-EC-KA7/index.htm NGS-EC-KA7 Nicolaas Gerhardus Scheepers edited the page ON 20020930@3:55:42 AM at page: http://www.piclist.com/techref/member/NGS-EC-KA7/index.htm NGS-EC-KA7 Nicolaas Gerhardus Scheepers edited the page ON 20020930@3:56:27 AM at page: http://www.piclist.com/techref/member/NGS-EC-KA7/index.htm NGS-EC-KA7 Nicolaas Gerhardus Scheepers edited the page ON 20020930@10:56:22 PM at page: http://www.piclist.com/techref/member/NGS-EC-KA7/index.htm NGS-EC-KA7 Nicolaas Gerhardus Scheepers edited the page ON 20020930@11:01:15 PM at page: http://www.piclist.com/techref/member/NGS-EC-KA7/index.htm NGS-EC-KA7 Nicolaas Gerhardus Scheepers edited the page ON 20020930@11:12:51 PM at page: http://www.piclist.com/techref/member/NGS-EC-KA7/index.htm NGS-EC-KA7 Nicolaas Gerhardus Scheepers added 'Says OK,

First tip to myself and to you all out there that has problems porting code from the 16F84a to the 16F877 or for that matter to any other MCU.

1. RTFDS - This means "Read The ^#$@%^@#$% Data Sheet"

One big difference between the 16F84 and the 16F877 is the peripherals the 16F877 has extra on board. Some of these peripherals like the A/D needs to have some of the ports setup as analog ports. Microchip in their wisdom decided to make some of the ports analog by default and it took me two weeks to actually find this out.

Use the ADCON1 register to setup the D and E ports as analog or digital. You still have to do all the other setup, do not go and throw your other code out the window.

Let me know how this helped you!!!

P.S. I know we are usually lazy to read the datasheet but I think it is worth your while to take a day or two and thoroughly scan the datasheet before digging in. '