8051 ports configuration

Discussion in 'Embedded Systems and Microcontrollers' started by lucky007tiwari, Feb 1, 2013.

  1. lucky007tiwari

    Thread Starter New Member

    Nov 21, 2012
    Dear sir i am new for 8051 microcontroller.......i am fullly confused about port configuration on MCu.....plz explain me that why we write 0xff to make a port as i/p or o/p...what is the basis concept of it.....what is the hardware profile of 8051 mcu..
  2. Papabravo


    Feb 24, 2006
    It is fully explained in the data sheet. You should try reading one sometime. A `1' written to the port data latch enables a weak pullup. This weak pullup establishes either an output logic `1' or can be pulled low by a typical external output driver.

    Could you elaborate on the precise meaning of "hardware profile". I am not familiar with that term.
  3. nigelwright7557

    Senior Member

    May 10, 2008
    You need to configure I/o port pins as inputs or outputs.
    Sending a 1 to the config address makes it an output and a 0 makes it an input.