Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : Best way to sync "Timer" on multi-dropped PicoMites.
Author | Message | ||||
PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 857 |
Not wanting a "well what are you trying to achieve" response, just wondering which MMBasic approach would get the closest to Timer=0 for multiple PicoMites, sharing the same RX signal. My first thought was to broadcast an instruction to go into a bitbang receive state and wait for a signal because that input would be getting all the attention.....blocking, right? Edited 2024-08-10 01:56 by PhenixRising |
||||
CaptainBoing Guru Joined: 07/09/2016 Location: United KingdomPosts: 2075 |
I developed a protocol for a star network with single master and multiple slaves (hundreds possible) using radio with HC-12s as a core requrement to my snooker hall table control. There is no reason it shouldn't work with multi-drop - the medium for communication has no bearing on the protocol. The requirement was for DateTime synchronization so it depends on the level of granularity you want, this may not suit you if you are synchronizing timers to the mili-second. each slave has an address and only talks when the master initiates the conversation. One task from the master was to periodically broadcast time packets. The master is address 000 and broadcast is 999. It is even encrypted so snooping is not trivial you an read my write-up on that here Edited 2024-08-10 02:08 by CaptainBoing |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6781 |
Hardwire a common clock line. One drives it from a PWM and all of them trigger on it using a counter interrupt, which is a hardware one I believe. As soon as you go serial you introduce the possibility of delays. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 857 |
Thanks chaps Both of those already considered and either would suffice for the application. I just get a bit pedantic about this stuff and shoot for the best possible solution, even if it's overkill. @Mick The way it reads to me is that; although we have interrupt priorities, they are all subject to having to wait between MMbasic commands. We don't have a push/pop deal. Thinking that the cat's meow would be a PIO solution that either zeroed MMBasic's Timer or had its own µSec timer. 32bits would be fine. As stated, overkill for the application but I have no life so I keep thinking about this stuff Edit: Ah, Mick, only just picked-up on the counter interrupt. Edited 2024-08-10 03:04 by PhenixRising |
||||
Print this page |