I don't want to bother anyone, but my teensy 4.0 isn't here yet .
I'm aware there was a thread like this before for teensy 3.x here: Teensy-3-2-odd-results-with-Slow-Baud-rates-and-High-CPU-Speeds
I'm just curious if anyone with oscilloscope or logic analyzer could help me out here.
example code:
Send 0x55, BIN 01010101.
I'm aware there was a thread like this before for teensy 3.x here: Teensy-3-2-odd-results-with-Slow-Baud-rates-and-High-CPU-Speeds
I'm just curious if anyone with oscilloscope or logic analyzer could help me out here.
example code:
Send 0x55, BIN 01010101.
Code:
// Teensy 4.0 - slow baud rate (need 600bps)
// HW serial# oscilloscope baud rate test
// Send 0x55, BIN 01010101.
// Pin 13 has an LED connected on most Arduino boards.
uint8_t led = LED_BUILTIN;
#define HWserial Serial1 // HW serial #
void setup() {
pinMode(led, OUTPUT);
// TEST 1
// HWserial.begin(550); // HWserial.begin(550) -- TEENSY 3.2 @ 72Mhz, Oscilloscope FREG = 275Hz, 275*2 = 550 baud rate. This is correct !!
// HWserial.begin(550) -- TEENSY 3.2 @ 96Mhz, Oscilloscope FREG = 1.10kHz, 1.10*2 = 2200 baud rate. This is incorrect !!
// TEST 2
HWserial.begin(600); // HWserial.begin(600) -- TEENSY 3.2 @ 72Mhz, Oscilloscope FREG = 300Hz, 300*2 = 600 baud rate. This is correct !!
// HWserial.begin(600) -- TEENSY 3.2 @ 96Mhz, Oscilloscope FREG = 1.65kHz, 1.65*2 = 3300 baud rate. This is incorrect !!
}
void loop() {
delay(500); // wait
digitalWriteFast(led, HIGH); // turn the LED on, See if It's Alive
HWserial.write(0x55); // send it out
delay(500); // wait
digitalWriteFast(led, LOW); // turn the LED off, See if It's Alive
}