I wish to know the electronics behind the micro-conroller I/O system.
Any literature explaining complete schematics of I/O system.
I'm looking answers to following q's:
why tristate is used with i/o pin
how i/o signals flow in and out of mcu ?
Sinking or sourcing of currents- which one is better, and how we can find the upper limit to current in case of sinking or sourcing the current for a particular mcu ?
Using the PICmicros example, you can see the I/O port structure schematic (logic gates, drivers transistors, etc) in any datasheet from Microchip PIC micros. They vary depending on the kind of port, some of them are Schmitt Trigger inputs, other TTL compatible, other are Open Drain outputs. You have to check and study the datasheets.
I'm looking answers to following q's:
why tristate is used with i/o pin
how i/o signals flow in and out of mcu ?
Sinking or sourcing of currents- which one is better, and how we can find the upper limit to current in case of sinking or sourcing the current for a particular mcu ?
1) As a port can be used as input or output (not both at same time) you need a logic control to connect or disconnect gates depending on the direction of the port. So if the port is set to input, the output stage is disconnected from the circuit via tristate output (high impedance).
2) The I/O signals flow through logic gates inside the port structure. Some ports have an analog input (comparators or mux/switches/capacitor for the A/D converters).
3) For PICmicros, usually each individual port can source or sink the same current (25mA), So I think it doesn´t matter what you choose. I don´t know about the speed of each configuration.