I would try doing it with PIO blocks. Much easier to manage (one you've learned it).
I did something similar with ATMega, a SAE J1850 PWM transceiver (for Ford ECUs), and I used PWM blocks (which are more versatile in Atmel implementation).
Well, it worked, but I wouldn't do it again with PWM and (a lot of racing) interrupts at every bit.
Dealing with line noise, collisions and fragments was a nightmare, ended up mostly using the CPU to bit-bang properly.
I did something similar with ATMega, a SAE J1850 PWM transceiver (for Ford ECUs), and I used PWM blocks (which are more versatile in Atmel implementation).
Well, it worked, but I wouldn't do it again with PWM and (a lot of racing) interrupts at every bit.
Dealing with line noise, collisions and fragments was a nightmare, ended up mostly using the CPU to bit-bang properly.
Statistics: Posted by gmx — Thu Nov 14, 2024 5:37 pm