Define the ports of AT89C51 as input or output.

Discussion in 'Programmer's Corner' started by MicroClub, Jul 21, 2009.

Thread Status:
Not open for further replies.
  1. MicroClub

    Thread Starter New Member

    Jul 19, 2009
    2
    0
    I m using AT89C51 for digital clock, with external pulse.
    and in m using keil 2.23
    i m using assembly (ASM) files

    i want to set the port0-1-2 for parallel data, and port3 for serial data

    the problem is to define the port as input or Output

    Master Clock
    ------------------
    port0 for input ; Full 8 bit port
    port1 for output ; Full 8 bit port
    port2 for output ; Full 8 bit port
    port3 for output (to send serial data) ; Full 8 bit port

    Slave Clock
    ------------------
    port0 for output ; Full 8 bit port
    port1 for output ; Full 8 bit port
    port2 for output ; Full 8 bit port
    port3 for input (to receive data) ; Full 8 bit port

    please tell me how can i set the ports for input and/or as output
     
  2. Dave

    Retired Moderator

    Nov 17, 2003
    6,960
    144
Loading...
Thread Status:
Not open for further replies.