I’m starting to work on the overall functionality of my project as in communication between different modules etc.
One of these boards will send information to the Mini via a TTL level serial connection. There will only be 5 characters sent at a time.
Now I understand that the COMS on the mini are interrupt driven and I am looking for some code examples that will enable the Mini to do other tasks yet monitor the Comms in the background.
When comms are recieved then the Mini can check the information and either use it or dicard it.
There are many ways I could do this but I am trying to find the best way that works in with the Mini phliosophy.
I can either
1, Have a thread that watches the Comms - checking for any incoming characters and then process them. If there is a correct sequence then a global flag is set casing the main routine to perform another task.
- When a Comms event occurs the main thread jumps to a checker and processes it, then returns back to the main thread.
Any advice on this be most appreciated. I’m not looking for someone to write the code for me but I am looking for idea’s on how best to design applications on the NETMF