kafferejsarn
Member
Hi all!
I have a Teensy 3.2 which I try to use to communicate with my Icom radio over Ci-V at 19200 Baud.
I can transmit and change settings on the radio but even if I loop the TX directly to the RX or to another serial RX I cannot read any serial data.
Do I have to do anything else than just Serial1.begin(19200, SERIAL_8N0); to set up the RX pin as input for data?
I primarily use Serial1 as HW serial port, i.e. connect TX to pin 1 and RX to pin 0. I have also tried a patch between pin 0 and pin 7 and try to read using Serial3 but that don't work either.
I can see with the oscilloscope I have the same waveform at my RX-pin as I have at my TX-pin when sending data over TX manually via the USB interface.
Any suggestion what to try next?
My wireing is as follows. The Icom Ci-V bus is a single wire pulled up open collector bus.
The FET is a level translator of normal kind good for much more than 19200 baud:
The dotted line is my patch for trying to read using Serial3.
My code for initalizing and read/write is as follows:
I have a Teensy 3.2 which I try to use to communicate with my Icom radio over Ci-V at 19200 Baud.
I can transmit and change settings on the radio but even if I loop the TX directly to the RX or to another serial RX I cannot read any serial data.
Do I have to do anything else than just Serial1.begin(19200, SERIAL_8N0); to set up the RX pin as input for data?
I primarily use Serial1 as HW serial port, i.e. connect TX to pin 1 and RX to pin 0. I have also tried a patch between pin 0 and pin 7 and try to read using Serial3 but that don't work either.
I can see with the oscilloscope I have the same waveform at my RX-pin as I have at my TX-pin when sending data over TX manually via the USB interface.
Any suggestion what to try next?
My wireing is as follows. The Icom Ci-V bus is a single wire pulled up open collector bus.
The FET is a level translator of normal kind good for much more than 19200 baud:
The dotted line is my patch for trying to read using Serial3.
My code for initalizing and read/write is as follows:
Code:
void initCAT(){
#ifdef CAT_REPEATER
Serial.begin(CAT_BAUD, SERIAL_8N1);
Serial1.begin(CAT_BAUD, SERIAL_8N1);
//Serial3.begin(CAT_BAUD, SERIAL_8N1);
#endif
}
void serviceCAT() {
// USB->CAT
int c = Serial.read(); // read from USB
if (c != -1) { // got anything?
Serial1.write(c); // Yes write char to UART (CAT)
//Serial3.write(c); // Yes write char to UART (CAT)
}
// CAT -> USB
c = Serial1.read(); // read from UART
//c = Serial3.read(); // read from UART
if (c != -1) { // got anything?
Serial.write(c); // Yes write ro USB
}
}
Attachments
Last edited by a moderator: