Daniel Kotschate 72c2be64ef Merge branch 'develop' of d3v0.de:TinyMotorSlave into develop 2 years ago
circuit Adding board. 2 years ago
code Adding (partly) support for two additional motors. 2 years ago
.gitignore Adding gitignore. 2 years ago
README.md fixing markdown syntax. 2 years ago

README.md

TinyMotorSlave

For some reasons (controlling the drive stage of a robot) and want to outsource the functionality into a dedicated slave. With the support of a tiny lib (provided by Martin Junghans (jtronics.de)) which implements a TWI slave by using the universal serial interface (USI) on Atmel's AtTiny family, a small TWI slave for controlling two/four motors was born.

Parameters / registers

Parametername Address Description
CHANNELA_SETVAL 0x30 setting channel A dutycycle (8 Bit)
CHANNELA_GETVAL 0x31 get channel A dutyclcle (8 Bit)
CHANNELB_SETVAL 0x32 setting channel B dutyclcle (8 Bit)
CHANNELB_GETVAL 0x33 get channel B dutyclcle (8 Bit)
CHANNELC_SETVAL 0x34 setting channel C dutyclcle (8 Bit)
CHANNELC_GETVAL 0x35 get channel C dutyclcle (8 Bit)
CHANNELD_SETVAL 0x36 setting channel D dutyclcle (8 Bit)
CHANNELD_GETVAL 0x37 get channel D dutyclcle (8 Bit)
ENCA_GETVAL 0x38 get value encoder A
ENCB_GETVAL 0x39 get value encoder B
ENC_RESET 0x40 reset encoder values
PRESCALEAB_SET 0x41 setting prescaler channel A and B
PRESCALEAB_GET 0x42 get prescaler channel A and B
PRESCALECD_SET 0x43 setting prescaler channel C and D
PRESCALECD_GET 0x44 get prescaler channel C and D
DIRA_SETVAL 0x45 set direction for motor on channel A
DIRA_GETVAL 0x46 get direction for motor on channel A
DIRB_SETVAL 0x47 set direction for motor on channel B
DIRB_GETVAL 0x48 get direction for motor on channel B
DIRA_TOGGLE 0x49 toggle direction on channel A
DIRB_TOGGLE 0x50 toggle direction on channel B
SAVE_EEPROM 0x51 save current settings to EEPROM