Hello all, I am working on a project and have a couple of questions. I am using theADC on port A to read a pressure sensor and....
I've read that I should be tieing all unused pins on my 16F877 port a to ground with 10k ohm resistors. So far I am using RA0 as my ADC in and have set up RA1 and RA2 as output to trip my TTL relays. This is working well on my proto type board. I plan on adding on push button off of RB0 again this is working. I believe I set porta up correctly to accomplish this since the ADC is working and my relays are tripping as designed/planned. I set up ADCON1 below and in do I not have to set TRISA as well to be able to use RA1 and RA2 as output? I didn't misunderstand the datasheet did I?
ADCON1 = %10001110
TRISA = %00000001

Secondaly since I am only using RB0 as an input should I make all the others input as well and tie them to ground as well with 10k resistors orjust leave them not connected to anything. I did tie RB0 with a pull up 10k resistor, that too is correct right?

Not that those questions were novice enough I get worse. I am not planning on doing anything with any other pins so do I even care about setting or tieing portC and portd to anything at all?

Thanks for your assitance.

P.S. Normally I would just carry on my way experimenting on my own reading the data sheet but I've already fried 2 16F877's and don't want to fry anymore haha

David