different direction pin on the same port

Status
Not open for further replies.

Darth Maul

Junior Member level 1
Joined
Jul 19, 2007
Messages
18
Helped
2
Reputation
4
Reaction score
0
Trophy points
1,281
Location
Yogyakarta, Indonesia
Activity points
1,436
Can we use pins on at89s52 in different direction on the same port? E.g. pin 3.0 as RxD, pin 3.1 as TxD, pin 3.2 to 3.6 as output and p3.7 as input. I have found several sources saying that we can do that by setting the input pin high (P3_7 = 1; //SDCC), by i just want to make sure. Need for advice pls. Thanx in advance.
 

Can we use pins on at89s52 in different direction on the same port?

Of course you can ..
On power-on (reset) all pins are set to that mode ..

Regards,
IanP
 

Hi,Darth Maul
All of PIN of Port0,1,2,3 can use as input when we set it to 1. But Some pin in port3 beside I/O function, they are also individual special function. Such as pin 3.0 is RXD (set it to 1 and enable serial port_control by SCON register),It can receive serial Data in to SBUF register in your uC.
 

s we can do this after POR when the controller starts reading the code you must specify the corresponding pins as input and output either by setting them up individually r by moving the corresponding values to the port
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…