thefatmoop
Member
Hi,
I've got a 250kbaud manchester signal that i'm trying to decode with the teensy 3.2 hardware serial. The signal's manchester clock is 500Khz, so a serial of 500kBaud creates the same high/low time for 1/2 manchester period. I used the code below to receive the data then transmit it back out the same serial port. So far the data looks exactly as the incoming data when viewing rx and tx on a scope, but with one problem: It gets cut off when, it seems, there is a received stop bit.
After looking over the datasheet i'm striking out how to disable the stop bit on the serial port. Any ideas? I want it to receive until it times out, then work through the task of decoding the manchester which is straightforward
atmel reference on doing the same thing:
http://www.atmel.com/images/atmel-42164-at03335-manchester-transceiver-using-the-usart-and-xcl-modules-on-xmega-e_application-note.pdf
screenshot showing the early cutoff
I've got a 250kbaud manchester signal that i'm trying to decode with the teensy 3.2 hardware serial. The signal's manchester clock is 500Khz, so a serial of 500kBaud creates the same high/low time for 1/2 manchester period. I used the code below to receive the data then transmit it back out the same serial port. So far the data looks exactly as the incoming data when viewing rx and tx on a scope, but with one problem: It gets cut off when, it seems, there is a received stop bit.
After looking over the datasheet i'm striking out how to disable the stop bit on the serial port. Any ideas? I want it to receive until it times out, then work through the task of decoding the manchester which is straightforward
Code:
#define HWSERIAL Serial1
void setup() {
delay(1000);
HWSERIAL.begin(500000); // setting SERIAL_8N1 to disable parity doesn't help
}
int incomingByte;
void loop() {
if (HWSERIAL.available()) {
incomingByte = HWSERIAL.read();
HWSERIAL.write(incomingByte);
incomingByte = 0;
}
}
atmel reference on doing the same thing:
http://www.atmel.com/images/atmel-42164-at03335-manchester-transceiver-using-the-usart-and-xcl-modules-on-xmega-e_application-note.pdf
screenshot showing the early cutoff