Teensy 4.0 - slow baud rate 600bps

Status
Not open for further replies.

Chris O.

Well-known member
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‬‬.
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
}
 
Good news, here it is running on a Teensy 4.0.

file.png

DSC_0567_web.jpg
 
Thanks Paul I didn't expect you to reply, I am pretty sure that your hands are full.
I'm hoping you were taking a break from all the office management shipping going on.
Anyways this is excellent news to me, this will make my vintage Atar-8bit cassette tape WAV File FSK (Frequency shift keying) decoding with sound support a lot easier :D.
ATARI TAPE.jpg
 
Status
Not open for further replies.
Back
Top