how to configure a port as i/p or o/p.

Status
Not open for further replies.

vikrant

Junior Member level 2
Joined
Jun 30, 2006
Messages
20
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,425
hi friends,

I want to know how to make a port as i/p or o/p.

its fine that we have to configure the port before using but what is the logic behind assigning values 00H or FFH to make a port as i/p or o/p.

I am using a 245 buffer which is interfaced with Port 0 of at89s52 , now this buffer IC has one pin DIR which set the direction of data flow through these port pins. Now if suppose i will make port 0 as i/p port and DIR is set such that data has to go out from the port ,will this situation creates any problem?
 

Hi vikrant

What mode are you using PORT0 in?
Are you using it for I/O or for multiplexed address/data?

Polymath
 

    vikrant

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…