This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Transmitting Serial data (ASCII) received from the computer to external LED circuit

Other Parts Discussed in Thread: MSP430G2553, ENERGIA, CC1101, CC113L

Hi there!

I am not very much experienced in MSP430 platform. I am kind of stuck in a problem. Let me describe my project goal first. What I want to do is:

1) I will input a letter (suppose "K") via serial monitor to my MSP430G2553,

2) Upon receiving the letter, the launchpad will vary the voltage level a GPIO PIN (let's assume P1.4) based on the input, which is connected to an LED,

3) As the LED blinks based on the input bit pattern (K, ASCII value = 75, Binary equivalent = 01001011), one light dependent resistor will read this variation, which is connected to another Launchpad, and stores it a buffer

4) The launchpad will read this buffer value, and print it to serial monitor

So, this is essentially a chat module between two launchpad, using serial monitor and some electronic stuff.

My Problem:

(I am using Energia for coding) I can read the character from Energia Serial Monitor, however, I don't know

1. How to transmit the received BIT pattern through a GPIO pin, towards a external LED. I am using the Hardware UART for communication with computer- Is there any other way, I can send data serially over regular GPIO PINs?


Please let me know, if my question requires further clarification. I am working on it... if I can solve it, or have any update, I am gonna post it here. I'd really appreciate your help. Thank you in advance!

  • Most IR transmitted data is encoded using subcarrier as to filter out daylight and 60hz overhead florescent light etc.
    So unless you put a black tube between them you will probably get false readings.
    The G2553 does have IRDA that is better to use than generic uart when it comes to light transfer.

    But unless this is a school project, I would go wired i2c or cc115L->cc113L (if two way cc1101) radio

  • You can use the USCI module of the G2553 in UART mode with IrDA modulation enabled.
    An LDR isn’t fast so try it first with a very low Baud Rate, let’s say 1,200 or maybe even less.
  • In theory, you can of course output a bit pattern on a plain GPIO pin. But besides the mentioned problems with the ambient, the receiver doesn't know if you're sending trailing zero bits or are just silent. This is why the UART protocol uses things like start bit, parity bit and stop bit, for idle line detection, baudrate(framing) problems and bit errors. So it's best to use an USCI module in UART mode for the transmission. And as already said, the USCI also supports the IrDA subcarrier protocol for a pulsed transmission, to overcome ambient influences.

**Attention** This is a public forum