
This project is a i2c slave for write only (address: 0x8E) with 3 control registers (0x00 - 0x02) and 8 data registers (0x08 - 0x0F).
Register configuration: CTRL0 register:
CTRL0[4-7], CTRL1[0-7] and CTRL2[0-7] set a compare value for the 1MHz counter (LSB: CTRL0[4], MSB CTRL2[7])
Description: The saved byte inside the 11 registers can be changed via i2c.
When CTRL0[0] is HIGH, the Direct Troughput Mode is enabled. This means, that the 8 input pins are directly mapped to the output pins. It also blocks the Stepper from operation
When CTRL0[0] is LOW, the Direct Trouput Mode is dissabled
When CTRL0[1] is HIGH, the Stepper is enabled when CTRL0[0] is LOW.
When CTRL0[1] is LOW, the Stepper gets reset to step0
step0 activates nothing
step1 to step8 enable the output of data1 to data8. Only one output can be turned on at a time.
step0 follows after step8
With the reigsters CTRL0[4-7], CTRL1[0-7] and CTRL2[0-7] a compare value for a counter can be defined. The internal clock operates with 1MHz. When the compare value is reached, the counter resets and the stepper moves one step forward.
an i2c master is mandatory to test this project
| # | Input | Output | Bidirectional |
|---|---|---|---|
| 0 | data in 0 | data out 0 | SDA |
| 1 | data in 1 | data out 1 | SCL |
| 2 | data in 2 | data out 2 | |
| 3 | data in 3 | data out 3 | |
| 4 | data in 4 | data out 4 | |
| 5 | data in 5 | data out 5 | |
| 6 | data in 6 | data out 6 | |
| 7 | data in 7 | data out 7 |