Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 5619
Posted: 08:26pm 10 Jun 2025
Hi George,
The problem is that you read 100 characters at a time. Let's assume at a certain moment there are 105 characters in the UART buffer. You read 100 (leaving 5) so LOC(#1) equals 5.
It loops, and you read 100. But there are only 5 in the buffer. So it waits until it gets 100 characters, potentially eating 95 characters of the new message.
Volhout
P.S. 50 characters every 10ms. What is your plan to do with them. MMBasic is fast (50.000 - 100.000 instructions per second), but that is still a lot of data for interpreted basic. In my morse decoder program I read 32 values every 10ms and do some fft processing, but that has close to 50% CPU power. I am still puzzling how to translate the fft output into characters fast enough. Maybe using lookup tables. Edited 2025-06-11 06:35 by Volhout