Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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.
 

IanP

Advanced Member level 5
Joined
Oct 5, 2004
Messages
7,942
Helped
2,309
Reputation
4,620
Reaction score
531
Trophy points
1,393
Location
West Coast
Activity points
66,459
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
 

hbaocr

Full Member level 4
Joined
May 13, 2007
Messages
235
Helped
25
Reputation
48
Reaction score
5
Trophy points
1,298
Location
Hochiminh City university of technology (VietNam)
Activity points
2,777
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.
 

vijaya_narayana

Full Member level 3
Joined
Jun 12, 2007
Messages
172
Helped
11
Reputation
22
Reaction score
1
Trophy points
1,298
Location
India
Activity points
2,158
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

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top