PIC Output's

For E-blocks user to discuss using E-blocks and programming for them.

Moderators: Benj, Mods

Post Reply
User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

PIC Output's

Post 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

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times

Re: PIC Output's

Post 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
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

Re: PIC Output's

Post 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

Post Reply