I want to sync the operations of several stepper motor drivers connected to multiple independent µC; one µC to stepper driver. The concept is this: All drivers should wait until all µCs have sent the commands before executing.
I want each µC to try and pull the line low, but only when the last µC pulls the line low all drivers should execute. For my research what is the technical term for that.
(argh, this is so vauge).
@ Mr. John Smith -
Sounds like you need a few CMOS AND/NAND gates to drive the final stage?
Sorry if I am off-base on my reply.
1 Like
It is very similar to DOMINANT and RECESSIVE bits in CAN bus.
Try this for size.
Using 2 IO lines, one is output and one is input. On the output use a driver transistor (NPN) that when driven, pulls the transistor output LOW. All of the transistor outputs are connected together with 1 pull up resistor and to each microcontroller input. With all transistors off the input is HIGH, with 1 or more on, the input is LOW.
Now, when your master is ready to send a command, it sets the transistor to on and all inputs will go LOW. Each device sees this and sets its own transistor to the low state. When the master sends out the message, it releases the transistor driver and because all of the others are still active it will see its own input as a LOW. As each device receives the message and sets up the driver, it releases its transistor driver and monitors the input, which will still be LOW as long as one of the devices has not released its transistor. When the last one has done so, it will release the transistor driver and now all the INPUTS go HIGH because of the pullup resistor and all of your devices can sync on this HIGH.
The master setting the transistor indicates to the slaves that a new message is about to be sent and get ready to sync if the message requires a sync.
I hope this makes sense? It sounds complicated but in reality it is very simple.
Still rereading that response to understand. Don’t worry I’ll get it.