carlschneider Senior Member
 Joined: 04/08/2023 Location: South AfricaPosts: 158 |
| Posted: 12:40am 27 Aug 2023 |
|
|
|
Hi Volhout
Some queries, if I may, to gain insight and expand my knowledge.
The WebMite manual v3 indicates that the MMBasic must assign the pin to the PIO with SetPin GPnn, PIO. I notice this has not been done in the example and does not appear to affect the operation of the program.
In the manual Read GPIO a,b,c,d indicates that c, the number of 32 bit words to read has a range 1..4 and I see you use 5 to include the latest reading.
In the normal usage of this method the very first 2 readings need to be discarded apparently. I assume this is due to the cleared FIFO register being filled as the PIO populates the FIFO with readings after the PIO start instruction.
My understanding is that there are 4 state machines per PIO and these operate independently; thus one could develop a further 3 state machines to do something else on PIO0?
Could you possibly provide the PIO menomics which yield the program contained in the array. I would like to understand what you did to get the period. I have tried to reverse engineer the a%() code but my depth of knowledge is lacking. The last time I did any menomic programming and state machines was in 1982 and rusty doesn't describe the holes in my memory on the subjects.
I have run the PIO code on a PicoW and now need to migrate it to the Pico WH and see how it lives with the rest of the code :)
I really appreciate your assistance, thanks again. |