You might find some inspiration in this code, which does HDLC Tx and Rx and flag generation in the inter-packet gap (but not manchester coded - this system had a separate clock).
https://github.com/arg08/picoeco/blob/m ... econet.pio
This system (Acorn Econet from the BBC Micro of the 1980's) was half-duplex and had tricky timing requirements - under some circumstances to send precisely one flag after the end of the packet and the switch to receive, while in other situations an unlimited number of flags can be sent while the host is 'thinking'.
It was extremely tight to get this all into the available 32 instructions of PIO; clearly it isn't directly applicable to your problem but maybe some of the techniques used could help you.
https://github.com/arg08/picoeco/blob/m ... econet.pio
This system (Acorn Econet from the BBC Micro of the 1980's) was half-duplex and had tricky timing requirements - under some circumstances to send precisely one flag after the end of the packet and the switch to receive, while in other situations an unlimited number of flags can be sent while the host is 'thinking'.
It was extremely tight to get this all into the available 32 instructions of PIO; clearly it isn't directly applicable to your problem but maybe some of the techniques used could help you.
Statistics: Posted by arg001 — Fri Nov 15, 2024 11:20 am