PICO high speed serial problem


Author Message
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5994
Posted: 07:26am 20 Jun 2024      

  ElectroPI said  Unfortunately both solutions are work-arounds to what seems to be a timing problem in the INPUT$ command when using high baud rates.


They are solutions to a problem! When you increase the speed enough, there will allways be a moment when the CPU can't keep up.

And you will find more problems. Because at this data rate (close to 1 Mbit/s), doing something usefull with the data will introduce new challenges. At 378MHz, MMBasic can execute close to 100000 (MM)Basic instructions per second.

If you look at system design (how much data MMBasic can process per second) depends of coarse on the complexity of the processing, but if you assume 10 MMBasic instructions per value (i.e. a byte) you can process maximum 10000 values per second. For 16 ADC channels that would be 625 per second (1.6ms), and a baudrate of 16x(16bit+start/stop)x600 = 172kbaud would be sufficient.

Maybe your design could also work, just as well, with 115200 baud, at 300 ADC refreshes per second) where the problem does not exist.

Volhout
Edited 2024-06-20 17:41 by Volhout