Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4625

Compute Module • CM4+Python+Bit banging

$
0
0
This is more like brainstorming with others more than asking how to do this. I try to summarize my setup: I have rather close to Modbus RTU protocol which I am processing using Python script on CM4. I am bit banking GPIO-pins and it works better than I expected. Less than 0.1% of frames get lost due to timeout (because RTU frame timeout).

Since this works surprisingly well, I started to wonder maybe I could replace the existing MCU based setup using CM4, but probably using lower level option than Python. Anyone else done similar to this?
I think one of the UARTs (MiniUART?) on Raspberry is actually bit banged.

Some answers before anyone asks/suggest:
* Linux is not a real time OS. Yes, I know.
* Python is not suitable for applications that require accurate timing. Yes, I know.
* Use MCU/FPGA/etc. for HW protocol needs. Yes, and that I already have. This is more like experimenting/iterating possibilities what can be done on CM4.
* Why not sticking on MCU option? Because Linux gives so much options/advantages as on operating system comparing to MCU.

Statistics: Posted by gotaf80307 — Tue Feb 27, 2024 1:53 pm — Replies 4 — Views 50



Viewing all articles
Browse latest Browse all 4625

Trending Articles