hjl4
Member
Hello and thank you for reading this post.
Again I seem to have confused myself after all day of reading 16f88 datasheet.
Here is what I want to accomplish. RA1-RA3, used for driver of 7 segment common anode LED display. PORTB, (RB0-RB7), used as terminals for the cathodes.
Now here where I'm confused.
When RA1 is high, it supplies around 5V to an NPN transistor, on the common anode side of a multiplexed 7 segment LED display, therefore, turning it on.
So, PORTB, would be sinking the current, would'nt it(cathodes)???
Now when I setup PORTB, do I initialize it as all inputs(1), or a 0.(making them outputs).??
Its even hard to explain.
Basically if display is turned on, what state should the pins on PORTB be, high or low. If segment A,B and C, are on, display showing 7, what state are the PORTB pins RB0, RB1 and RB2. High or Low
I know this is basic, but long day here, and I don't want to short my new chip.
Thanks.
Again I seem to have confused myself after all day of reading 16f88 datasheet.
Here is what I want to accomplish. RA1-RA3, used for driver of 7 segment common anode LED display. PORTB, (RB0-RB7), used as terminals for the cathodes.
Now here where I'm confused.
When RA1 is high, it supplies around 5V to an NPN transistor, on the common anode side of a multiplexed 7 segment LED display, therefore, turning it on.
So, PORTB, would be sinking the current, would'nt it(cathodes)???
Now when I setup PORTB, do I initialize it as all inputs(1), or a 0.(making them outputs).??
Its even hard to explain.
Basically if display is turned on, what state should the pins on PORTB be, high or low. If segment A,B and C, are on, display showing 7, what state are the PORTB pins RB0, RB1 and RB2. High or Low
I know this is basic, but long day here, and I don't want to short my new chip.
Thanks.
Last edited: