Discussion Forum

I/O configuration

Next Thread | Thread List | Previous Thread Start a Thread | Settings

DetailsMessage
Read-Only
Author
Ricky Tan
Posted
6-Nov-2001 13:18 GMT
Toolset
None
New! 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
Read-Only
Author
tom mazowiesky
Posted
6-Nov-2001 13:49 GMT
Toolset
None
New! RE: I/O configuration
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.

Read-Only
Author
Ricky Tan
Posted
6-Nov-2001 15:09 GMT
Toolset
None
New! RE: I/O configuration
Thanks a million!! I really needed that!!! =Þ

Next Thread | Thread List | Previous Thread Start a Thread | Settings