89C2051 - serial output

Discussion in 'Programmer's Corner' started by Jefecito20, Apr 26, 2010.

  1. Jefecito20

    Thread Starter New Member

    Apr 26, 2010
    6
    0
    I'm programming an ADC using an AT89C2051 microcontroller and then need it to provide a serial output to transmit via RF 315 MHz. So far, my ADC seems to be programmed properly, but the P3.1 pin (txd for 89C2051) does not show any output. Can anyone please help me with the flaws in my program?

    I'm using Keil v2.0 to compile it.

     
  2. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    Do you have pin P3.1 set as an OUTPUT?
     
  3. GetDeviceInfo

    Senior Member

    Jun 7, 2009
    1,571
    230
    what baud are you shooting for? What's your TL1 register?

    are you scoping the output?
     
  4. Jefecito20

    Thread Starter New Member

    Apr 26, 2010
    6
    0
    @retched: I thought pin P3.1 is always the serial output. How do I set it?

    @GetDeviceInfo: Baud rate of 4800. I'm using the timer in mode 2, so I don't think I have to set TL1.

    I'm transmitting the output through RF and displaying it on an LCD.
     
  5. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
  6. Jefecito20

    Thread Starter New Member

    Apr 26, 2010
    6
    0
    So this means if I initialize P3 as

    it should work.

    I'll try that tomorrow. Thanks for the advice.
     
Loading...