This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Keil for at89s52 - Microcontroller Project Help Needed!

Let me describe my project:
I'm bulding a count-up/count-down large format display timer with big 5x7 led dot matrices.
I'm trying to use Keil uVision3 to program my microcontroller.
I'm trying to use an at89s52 to control an TLC5920 LED driver chip. The LED driver chip needs Sin, SCK, LATCH(bar), BLANK, and CSEL0-2 from the microcontroller. I am a decent C programmer. But, I do not know how to use Keil to do things like send P2.0 serial data or P2.1 a high or low signal or monitor P2.7 for a pulse from a keypad. Could someone please direct me to a knowledge base that explains how to program such things in Keil evaluation? Also, I would greatly appreciate any project advice.
Thanks,
Lee Lerner

Parents
  • I have reviewed the datasheets but I am still very confused about how to send serial data to my led driver chip in Keil code.
    Example:
    SCON = 0x50;
    TMOD |= 0x20;
    TH1 = 0xf3;
    TR1 = 1;
    TI = 1;
    PCON |= 0x80;
    I believe that this enables serial mode 1 at a baud rate of 9600 (I have an 8MHz oscillator). But now how do I send 16 bits to the Sin of the LED driver chip. The driver chip has a Sin and Sclk (I'm not sure where to connect the Sclk to on the microcontroller). Do I just write a char to SBUF?
    Thanks,
    Lee

Reply
  • I have reviewed the datasheets but I am still very confused about how to send serial data to my led driver chip in Keil code.
    Example:
    SCON = 0x50;
    TMOD |= 0x20;
    TH1 = 0xf3;
    TR1 = 1;
    TI = 1;
    PCON |= 0x80;
    I believe that this enables serial mode 1 at a baud rate of 9600 (I have an 8MHz oscillator). But now how do I send 16 bits to the Sin of the LED driver chip. The driver chip has a Sin and Sclk (I'm not sure where to connect the Sclk to on the microcontroller). Do I just write a char to SBUF?
    Thanks,
    Lee

Children