| ??? 08/14/01 16:27 Read: times |
#14067 - RE: 8051/2 IO |
The PIO remains configured as an input until you change it by software.
Writing a '1' to a PIO bit actually tri-states the output pin and allows you to "see" the input. The PIO bit is pulled High through a pullup resistor, with the exception of port P0. So, in reality, the 8051's I/Os are somewhat limited. You can actively drive an output Low. However, you cannot actively drive an output High. It is pulled High through an internal pull-up resistor. Here is a diagram from our FastChip development software, which may make things a little clearer. http://www.8052.com/users/sknapp/8051_pio_port.gif When you write to a PIO, the value is stored in a register. When you read from a PIO port, most instructions read the value on the PIO pin. However, some of the read-modify-write instructions, like ANL, ORL, INC, DEC, etc., read from the register and write back to the register. I'm not sure, but this was probably done by the original 8051 architects to save on then-exteremely-valuable silicon real estate. You only need one register to control the input/output direction and to control the state of the output. On the Triscend E5, we also provide a duplicate I/O structure if you want full compatibility with the original 8051. However, you have full access to much more powerful I/O structures on the E5. You get to choose the I/Os that you want. http://www.triscend.com/products/indexE5.html |
| Topic | Author | Date |
| 8051/2 IO | 01/01/70 00:00 | |
RE: 8051/2 IO | 01/01/70 00:00 |



