89C2051 - same port, 2 functions

Discussion in 'Embedded Systems and Microcontrollers' started by Jefecito20, Apr 28, 2010.

  1. Jefecito20

    Thread Starter New Member

    Apr 26, 2010
    6
    0
    I'm using an AT89C2051 in my project of a tire pressure measuring system, as I've already mentioned in a thread in the programmer's corner. At the receiver side, I am getting a serial input from the RF receiver and sending it to pin P3.0 (rxd pin) of the 2051. I'm using P1 as the port to display the data on an LCD. But this means I still have 3 connections of the LCD (RS, WR, EN) that I have to run as well as an LED and a buzzer. As P1 has 7 pins, and only one is the input, can I use the other 6 as output pins to run the above functions?

    Can this be achieved, say by initializing port P3 as P3 = 0x01?
     
  2. binu_ji

    Member

    Jul 13, 2007
    22
    1
    Are you using the remaining pins of the P3?
    Are you connecting the LCD in 8bit mode or 4bit mode?
     
  3. GetDeviceInfo

    Senior Member

    Jun 7, 2009
    1,571
    230
    Yes you can
     
Loading...