This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

I/O configuration

Does anybody know how to configure the 4 ports of the 8XC251SB? I need to configure ports 0,1,2 so that i get 2 output and 1 input port.
Thanks

  • Well, you dont have to specifically configure them. Just as in an 8051, the ports dont have any kind of configuration registers. Any port pin that you write a 1 to, will be driven high with a weak pull up, and can therefore act as a 1 output, or an input. Any pin driven with a 0, will be an output low.

    The exception to this is port 0, which requires a pull up resistor to VCC on each pin, if you want to use it as an output and drive a 1 on it. Without the pull up it is an open drain output.

    Also, port 0 and 2 cant be used as ports if you are addressing external memory. External addressing uses port 0 and port 2 to provide the addressing (port 2 & 0) and the data bus (port 0 multiplexed).

    If you don't already have it, get the 8XC251SA, etc. Embedded Microcontroller Users Manual from Intel. This describes the chip and its operation in detail.

  • Thanks a million!! I really needed that!!! =Þ