Datasheet

TMC2041 DATASHEET (Rev. 1.02 / 2017-MAY-16) 21
www.trinamic.com
5.4 Addressing Multiple Slaves
ADDRESSING ONE OR TWO SLAVES
If only one or two TMC2041 are addressed by a master using a single UART interface, a hardware
address selection can be done by setting the NEXTADDR pins to different levels.
ADDRESSING UP TO 255 SLAVES
A different approach can address any number of devices by using the input NEXTADDR as a selection
pin. Addressing up to 255 units is possible.
Master CPU
(µC with UART,
software
switches TXD to
hi-Z for
receiving)
TMC2041
#1
NEXTADDR
CSN/IO0
SWIOP
SWION
TMC2041
#2
NEXTADDR
SWIOP
SWION
+V
IO
CSN/IO0
TMC2041
#3
NEXTADDR
SWIOP
SWION
+V
IO
TXD
R
IDLE
+V
IO
R
IDLE
forces stop bit level in idle conditions,
3k3 is sufficient with 14 slaves
RXD
10k 10k
address 0, IO0 is high-Z address 1 address 1
program to address 254 & set IO0 low address 0, IO0 is high-Z address 1
address 254 program to address 253 & set IO0 low address 0
address 254 address 253 program to address 252 & set IO0 low
Addressing phase 1:
Addressing phase 2:
Addressing phase 3:
Addressing phase 4:
EXAMPLE FOR ADDRESSING UP TO 255 TMC2041
Addressing phase X: continue procedure
Figure 5.1 Addressing multiple TMC2041 via single wire interface using chaining
Proceed as follows:
- Tie the NEXTADDR pin of your first TMC2041 to GND.
- Interconnect one of the general purpose IO-pins of the first TMC2041 to the next drivers
NEXTADDR pin using an additional pull-up resistor. Connect further drivers in the same
fashion.
- Now, the first driver responds to address 0. Following drivers are set to address 1.
- Program the first driver to its dedicated slave address. Note: once a driver is initialized with
its slave address, its general purpose output, which is tied to the next drivers NEXTADDR has
to be programmed as output and set to 0.
- Now, the second driver is accessible and can get its slave address. Further units can be
programmed to their slave addresses sequentially.