input ports in 8051

General discussion on mikroBasic PRO for 8051.
Post Reply
Author
Message
anksturs
Posts: 1
Joined: 31 Jul 2011 09:18

input ports in 8051

#1 Post by anksturs » 31 Jul 2011 09:21

hey guys i am a newbie in this world... can any one tell me how to make the ports of 8051 as input ports in Mikroc for 8051...?

User avatar
janko.kaljevic
Posts: 3565
Joined: 16 Jun 2011 13:48

Re: input ports in 8051

#2 Post by janko.kaljevic » 01 Aug 2011 17:28

Hello,

Those chips don't have register that determinate input/output.
So you don't need to declare which port is input.
Just read their registers.

Regards.

foravr
Posts: 130
Joined: 11 May 2009 19:34

Re: input ports in 8051

#3 Post by foravr » 05 Aug 2011 22:13

But you can say this: if you write a zero to a portbit: it cannot be an input. Write ones to Portbits, you need as inputs.

Post Reply

Return to “mikroBasic PRO for 8051 General”