Page 1 of 1

PIC Output's

Posted: Thu Jul 21, 2011 11:55 am
by Jan Lichtenbelt
Due to some reason, I thought the output of the I/O pin of a microcontroller (like eg. PIC16F877A) is an open collector with emitter to ground. That means the external resistor to Vdd is necessary to get "1" on the output.
However I used today the E-004 LED block and realised that the LED's are blinking, without external power supply. Conclusion: The outputs can never the an open collector.

I someone tell me who the outputs works? ANs, if possible, give e reference, where I can find details.

Kind Regards

Jan Lichtenbelt

Re: PIC Output's

Posted: Thu Jul 21, 2011 12:26 pm
by kersing
Jan,

Have you checked the 16F87XA data sheet? (http://ww1.microchip.com/downloads/en/D ... 39582b.pdf) Pages 41, 42, 44, 46 and 48 show diagrams of the ports. Different ports have a different configuration, port B has a weak pull-up that can be switched off with RBPU.

Regards,

Jac

Re: PIC Output's

Posted: Thu Jul 21, 2011 12:44 pm
by Jan Lichtenbelt
Dear Jac,

Thanks a lot. I thought that the square, with cross in it for the I/O pin, contains more electronics. But for the pull-up resistance that is not important. I see, in your B-port example, that the weak pull-ups can be enabled by setting TRIS and clear the RBPU bit (see details the datasheet).

Kind regards

Jan Lichtenbelt