PID in MMBasic


Author Message
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 1893
Posted: 10:51pm 14 Jan 2025      

  JohnS said  As I read it, the C code (from the github mentioned) includes a test, which simulates everything (i.e. requires no hardware I/O) using ticks every 10ms.

I think that time has been borrowed but doesn't look like it has to be so.

John


Pete replicated the entire thing (see above), including the test in MMBasic.

The simulation runs when I changed it to T=0.001 (removed the Print stuff from "sub pidint") but it refuses to accept T=0.0005 (2KHz).

Maybe it's due to the fact that it can handle multiple PIDs.

Looks darned good though and even includes a low-pass-filter.