Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 5 months ago.
receive and transmit serial signal (DMX)
Hello everyone,
I am using LPC1768 I am trying to receive a signal from a USB to Serial converter (MM232R) and then re-transmit it, without any change. I connected the MM232R interface, directly to Mbed (pin5 TXD of MM232R to pin 114 RX of Mbed)
I used readable() command to determine if there is any signal received on Mbed. Then I want to transmit the received signal, through TX (pin13). I used: Serial a(p13, p14); ... a.putc(a.getc());
But I cannot transmit the signal..
any ideas? Thank you for any help :)
2 Answers
10 years, 5 months ago.
Actually I have:
PC -> USB to Serial converter -> Mbed(UART pins) > max485 chip > XLR port and a DMX light device
I want to transmit a DMX signal, which is generated from a lighting control software (on PC)
when I connect:
PC -> USB to Serial converter > max485 chip > XLR port and a DMX light device
it works fine.
but know I need to add the Mbed
10 years, 5 months ago.
Recommend you use Serial pc(USBTX, USBRX) to echo received data and check that part of code works. Note that when you split TX and RX and use them in different directions they will both run at the same baudrate, bits, parity etc. Do you have a common GND between PC, USB to Serial, mbed, max485 and XLR. Is the max485 powersupply ok and is the TX part enabled (max485 DE pin 3 and nRE pin 2 at high level), mbed TX pin should go to max485 DI pin (pin 4).
How do you know you're not transmitting the byte? What's on the other end of the serial converter - a PC? Are you communicating through a serial terminal emulator? Is the bit rate / baud correct (9600 by default)?
If it were me, for debugging, I'd open a port like this:
And send the received bytes on the one channel - "a" in your case - to the other, "pc," to make sure I'm receiving them properly.
posted by Aaron Minner 18 Mar 2014