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

Compute Module • Re: 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.
might ge of interest https://revolutionpi.com/de/tutorials/m ... tu-slave-3

Statistics: Posted by aBUGSworstnightmare — Tue Feb 27, 2024 2:29 pm



Viewing all articles
Browse latest Browse all 4906

Trending Articles