PICO high speed serial problem


Author Message
ElectroPI
Regular Member

Joined: 27/04/2012
Location: Australia
Posts: 42
Posted: 01:06pm 19 Jun 2024      

Hi John,
There shouldn't be any extra because I've only sent 32 bytes.

The reason I found the problem is because in my 4 PICO-zero setup I'm sending data from each of 3 PICOs to PICO#0 as low byte, high byte, low byte, high byte, etc for 32 bytes. Since the data is coming from the ADCs with floating inputs I should get values around 500 to 600. But occasionally I'd get values up in the thousands. When I checked I found that a dropped byte would make the packet go from low byte, high byte, low byte, high byte to high byte, low byte, high byte, low byte until the next packet.

The other test I did was to replace the PRINT command with an IF statement as I described in my first post ie it only prints when there isn't 32 bytes in the receive buffer. So except for being out of sync when I first type RUN I should never see anything printed after that. But of course I do after about a minute or 2 and it keeps happening as long as the program is running.