KwickStepper pin usage using I2C I/O expansion (Rev 3.5)
See http://www.bitbarn.co.uk/kwickstepper/resources.htm for PCF8574A data sheet. KwickStepper from a software deveIoper's viewpoint As seen from the Arduino IDE and Atmega328P (pin number in brackets): SignaI name IDE Pin 328P (pin) PWM I/O Description KS_HOME 2 PD2 (32) n Home switch (shared) KS_EXP_1 3 PD3 (1) Y n/Out Expansion 1 servo 1 KS_EXP_2 4 PD4 (2) n/Out Expansion 2 KS_EXP_3 5 PD5 (9) Y n/Out Expansion 3 KS_STEP_X 6 PD6 (10) Out X motor step KS_STEP_Y 7 PD7 (11) Y Out Y motor step KS_STEP_Z 8 PB0 (12) Out Z motor step KS_EXP_4 9 PB1 (13) Y n/Out Expansion 4 servo 2 KS_SD_ CS 10 PB2 (14) Y Out SD socket CS KS_SD_ MOS 11 PB3 (15) Y n SD socket MOS KS_SD_MSO 12 PB4 (16) Out SD socket MSO KS_SD_CLOCK 13 PB5 (17) Out SD socket SCK clock KS_EXP_5 A0 PC0 (23) n/Out Expansion 5 KS_EXP_6 A1 PC1 (24) n/Out Expansion 6 KS_EXP_7 A2 PC2 (25) n/Out Expansion 7 KS_EXP_8 A3 PC3 (26) n/Out Expansion 8 KS_2C_SDA A4 PC4 (27) n/Out 2C SDA KS_2C_SCL A5 PC5 (28) n/Out 2C SCL Note: signals are arranged so that two expansion lines (1 and 4) may be used for digital /O and PWM. Main board LCD PCF8574 I2C bus I/O expander data bits: address 0x20 The LCD is 16x2 with 5x8 dot characters driven in 4 bit mode. SignaI name Pin Description 2C_LCD_DB7 P0 LCD DB7 2C_LCD_DB6 P1 LCD DB6 2C_LCD_DB5 P2 LCD DB5 2C_LCD_DB4 P3 LCD DB4 2C_LCD_ENABLE P4 LCD Enable 2C_LCD_R/W P5 LCD R/W 2C_LCD_RS P6 LCD RS Unused P7 N/C KwickStepper pin usage 18/11/13 Page 2 of 4 Main board motor PCF8574 I2C bus I/O expander data bits: address 0x21 SignaI name Pin Description 2C_DRECTON_X P0 X motor direction 2C_SLEEP_Y P4 Y motor sleep 2C_DRECTON_Z P2 Z motor direction 2C_SLEEP_X P3 X motor sleep 2C_DRECTON_Y P1 Y motor direction 2C_SLEEP_Z P5 Z motor sleep Unused P6 N/C Unused P7 N/C Note: no PCF8574A is required on the slave board. SignaIs passing to/from the sIave board (Hdr0) Digital power 5V 1 2 Digital ground X motor step 3 4 X motor direction X motor sleep 5 6 Y motor sleep Z motor direction 7 8 Y motor step Z motor sleep 9 10 Y motor direction Z motor sleep 11 12 Home (shared) Motor power 13 14 Motor ground Motor power 15 16 Motor ground SignaIs avaiIabIe on expansion header 1 (Hdr1 - servo 1) (Servo compatibIe) 1 Signal (Expansion 1 PWM) 2 Digital power 5V 3 Digital ground SignaIs avaiIabIe on expansion header 2 (Hdr2 - servo 2) (Servo compatibIe) 1 Signal (Expansion 4 PWM) 2 Digital power 5V 3 Digital ground SignaIs avaiIabIe on expansion header 3 (Hdr3) Digital power 5V 1 2 Digital ground Reset 3 4 Digital ground Expansion 2 5 6 Expansion 3 Expansion 5 7 8 Expansion 6 Expansion 7 9 10 Expansion 8 Motor power 11 12 Motor ground KwickStepper pin usage 18/11/13 Page 3 of 4 SignaIs avaiIabIe on KwickPad header (Hdr4) 1 Digital ground 2 2C SDA 3 2C SCL 4 Digital power 5V SignaIs avaiIabIe on Screw TerminaIs (Conn1) 1 Digital ground 2 Home Switch 3 MOTOR 1B 4 MOTOR 1A 5 MOTOR 2A 6 MOTOR 2B 7 Motor Power nput 8 Motor ground KwickPad keypad PCF8574 I2C bus I/O expander data bits: address 0x22 KwickPad may be connected to KwickStepper using a USB A male to micro B cable. The cable carries Ground, SDA, SCL and 5V signals. The PCF8574A 2C bus /O expander C is located on the KwickPad PCB. SignaI name Pin Description KP_ROW_4 P0 Keypad row 4 KP_ROW_3 P1 Keypad row 3 KP_ROW_2 P2 Keypad row 2 KP_ROW_1 P3 Keypad row 1 KP_COL_4 P4 Keypad column 4 KP_COL_3 P5 Keypad column 3 KP_COL_2 P6 Keypad column 2 KP_COL_1 P7 Keypad column 1 KwickStepper pin usage 18/11/13 Page 4 of 4 Original diagram available from: http://jobs.arduinoexperts.com/wp-content/uploads/2013/03/ARDUNO_V2.png Hdr1 and Hdr3 Pin numbering