I will change my test program so speed doesn't matter
cnt = 0;
while (cnt < BUFFERED) {
if (Serial1.available()) {
val = Serial1.read();
DBG(":");
DBG(val, HEX);
Type: Posts; User: phijun
I will change my test program so speed doesn't matter
cnt = 0;
while (cnt < BUFFERED) {
if (Serial1.available()) {
val = Serial1.read();
DBG(":");
DBG(val, HEX);
FYI
The flush/available behavior can also be shown with a standard Serial test program.
Without DELAY defined, there are errors en Teensy 4.0, for example
Count Error 6
At that speed with default...
Perhaps a word about why a reliable single wire serial with tx/rx reversal API
in Teensyduino 'out of the box' could be a plus versus Arduino.
Many hobby Remote Control manufacturers (Jeti,...
New version of code, better display, and
change int show = 1; to int show = 0;
shows only errors.
#define SPEED 9600
#define BUFFERED 8
#define BIT9
#define DELAY 10
With
#define SPEED 9600
#define BUFFERED 64
#define BIT9
and adding a delay(100) after the Serial1 or 2 .flush() and the &= 0x1ff it's ok, just a bit puzzled by the need of the delay().
...
It's SERIAL_9O1 because the real device is using this.
Using the &= 0x1ff is ok, but I think the parity bit(s) aren't supposed to be returned by read().
And in 9bit mode write and read do not match expected 0x101, read 0x301
Teensy 4.0 9bit Serial Single Wire with reversal test
setMode:Serial2:TX
setMode:Serial1:RX
Write...
Almost.
There is a remaining problem with either flush() that seems not being synchronous or a bug in the below code
Using 8bit or 9bit shows same behavior, here is 8bit.
Note
There is #define...
Will try, many thanks.
Hi,
trying to do something similar, in 9 bit mode, single wire TX2 pin connected to TX1 pin, code working is below.
But I need to add a periodic reverse direction
- TX2 ----> TX1
- Reverse...
Is it possible to do something similar as done for Teensy 3.2/3.5/3.6 described here:
https://github.com/Sepp62/JetiExBus/blob/master/TeensyReadme.txt
with a teensy 4.0 ?
- Serial asynchronous...
oops, thanks
FYI
1.46-beta9 + regular installer 1.8.9
"Checking Arduino 1.8.8:
version: "lib/version.txt" wrong version: 1.8.9 Does not match Arduino 1.8.8
"
There is a single compile warning in 1.46-beta9 when setting to All, may be could be removed in next beta ?
C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3\Stream.cpp: In member...
got it, many thanks
Please what's is the link for 1.46-beta5 ?
Thanks