KontroLIR Pin Outs: Difference between revisions
m (→GPIO Mapping) |
|||
(21 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
'''''[[KontroLIR - Arduino compatible IR remote control|> KontroLIR Home]]''''' | |||
== KontroLIR Pin Out Serial Interface == | == KontroLIR Pin Out Serial Interface == | ||
[[File:KontroLIR Serial Interface.jpg|frameless|Serial interface pinout]] | [[File:KontroLIR Serial Interface.jpg|frameless|Serial interface pinout (looking from keypad up)]] | ||
The header pins for the Serial I/F interface are laid out as follows: | The header pins for the Serial I/F interface are laid out as follows: | ||
Line 6: | Line 8: | ||
# '''TXD''' Connects to TXD on the adapter (Connected to TXD0 on the ATmega328PB) | # '''TXD''' Connects to TXD on the adapter (Connected to TXD0 on the ATmega328PB) | ||
# '''RXD''' Connects to RXD on the adapter (Connected to RXD0 on the ATmega328PB) | # '''RXD''' Connects to RXD on the adapter (Connected to RXD0 on the ATmega328PB) | ||
# '''VCC''' +ve supply power 5V (will also work with a 3V3 supply @ 8MHz or 4MHz) | # '''VCC''' +ve supply power 5V (will also work with a 3V3 supply @ 8MHz or 4MHz) '''DO NOT''' supply power here when batteries are installed! | ||
# '''RTS''' Used to reset the MCU during Firmware upload | # '''RTS''' Used to reset the MCU during Firmware upload (connect RTS or DTR signal here when uploading firmware with Arduino IDE) | ||
# '''DBG''' Unpopulated by default. Can be used as a debug pin, if necessary. Also connected to the LED. | # '''DBG''' Unpopulated by default. Can be used as a debug pin, if necessary. Also connected to the LED. | ||
''Note 1: The image is looking from the keypad up. Looking | ''Note 1: The image is looking from the keypad up. Looking through the battery compartment, the order will be mirrored.'' | ||
''Note 2: On my FTDI Serial USB adapter: RTS=>DTR; RXD=>Tx;TXD=>Rx; GND=>GND; VCC=>5V.'' | ''Note 2: On my FTDI Serial USB adapter: RTS=>DTR; RXD=>Tx;TXD=>Rx; GND=>GND; VCC=>5V.'' | ||
''Note 3: These pins are accessible via the battery compartment.'' | ''Note 3: When selecting a SerialUSB adapter, please ensure that VCC is 5V and the 3 signal pins are all 5V.'' | ||
''Note 4: These pins are accessible via the battery compartment.'' | |||
''Note 5: <u>'''IMPORTANT''' - remove the batteries before connecting your SerialUSB adapter to KontroLIR</u>.'' | |||
''Note 6: If you encounter problems using your own adapter, you may need to swap the Rx & Tx wires at one end only.'' | |||
The image below shows an example of wiring your SerialUSB Adapter to KontroLIR, long with the SerialUSB Interface pin-out (viewed from the rear & looking at the empty battery compartment.. | |||
[[File:KIR_SerialUSB_wiring.png|SerialUSB Interface pinout]] | |||
== KontroLIR Pin Out ICSP == | == KontroLIR Pin Out ICSP == | ||
[[File:KontroLIR ICSP Header.jpg|frameless| | [[File:KontroLIR ICSP Header.jpg|frameless|ICSP interface pinout]] | ||
The header pins for the AVR ICSP interface are laid out as follows: | The header pins for the AVR ICSP interface are laid out as follows: | ||
Line 31: | Line 43: | ||
== Misc == | == Misc == | ||
There are | There are additional headers available for advanced users, as follows: | ||
* 2-pin through hole I2C interface (SDA,SCL) | * 2-pin through hole I2C interface (SDA,SCL) | ||
* 4-pin SMD I2C interface (SDA,SCL,VCC,GND) | * 4-pin SMD I2C interface (SDA,SCL,VCC,GND) | ||
Line 44: | Line 56: | ||
== GPIO Mapping == | == GPIO Pin and Button Mapping == | ||
Detailed GPIO mapping can be examined in the file: KIR_header.h | Detailed GPIO mapping can be examined in the file: KIR_header.h | ||
Remote button IDs are pre-calculated from the ROW/COL indices. | Remote button IDs are pre-calculated from the ROW/COL indices. | ||
Every pin used is pre-defined along with a collection of useful pre-compiler macros, intended for | Every pin used is pre-defined along with a collection of useful pre-compiler macros, intended for ease of use. | ||
The contents should be relatively straight forward to follow, for those familiar with the Arduino and IRremote ecosystems. | The contents should be relatively straight forward to follow, for those familiar with the Arduino and IRremote ecosystems. | ||
''' | The image below shows the mapping between MCU pins, Arduino pins and function used in KontroLIR. | ||
[[File:KontrolIR_Pin_Map.jpg|frameless|KontroLIR Pin Mapping]] | |||
The image below shows the button ID and Row/Col mapping used in KontroLIR. | |||
[[File:KontrolIR_Button_Map.jpg|frameless|KontroLIR Button Mapping]] | |||
'''''[[KontroLIR - Arduino compatible IR remote control|> KontroLIR Home]]''''' |
Latest revision as of 07:46, 11 December 2019
KontroLIR Pin Out Serial Interface
The header pins for the Serial I/F interface are laid out as follows:
- GND -ve supply power Ground / 0V
- TXD Connects to TXD on the adapter (Connected to TXD0 on the ATmega328PB)
- RXD Connects to RXD on the adapter (Connected to RXD0 on the ATmega328PB)
- VCC +ve supply power 5V (will also work with a 3V3 supply @ 8MHz or 4MHz) DO NOT supply power here when batteries are installed!
- RTS Used to reset the MCU during Firmware upload (connect RTS or DTR signal here when uploading firmware with Arduino IDE)
- DBG Unpopulated by default. Can be used as a debug pin, if necessary. Also connected to the LED.
Note 1: The image is looking from the keypad up. Looking through the battery compartment, the order will be mirrored.
Note 2: On my FTDI Serial USB adapter: RTS=>DTR; RXD=>Tx;TXD=>Rx; GND=>GND; VCC=>5V.
Note 3: When selecting a SerialUSB adapter, please ensure that VCC is 5V and the 3 signal pins are all 5V.
Note 4: These pins are accessible via the battery compartment.
Note 5: IMPORTANT - remove the batteries before connecting your SerialUSB adapter to KontroLIR.
Note 6: If you encounter problems using your own adapter, you may need to swap the Rx & Tx wires at one end only.
The image below shows an example of wiring your SerialUSB Adapter to KontroLIR, long with the SerialUSB Interface pin-out (viewed from the rear & looking at the empty battery compartment..
KontroLIR Pin Out ICSP
The header pins for the AVR ICSP interface are laid out as follows:
- GND -ve supply power Ground / 0V
- MISO Standard ICSP pin for use with avrdude & USBASP, Atmel ICE programmer or equivalent
- RESET Standard ICSP pin for use with avrdude & USBASP, Atmel ICE programmer or equivalent
- SCK Standard ICSP pin for use with avrdude & USBASP, Atmel ICE programmer or equivalent
- MOSI Standard ICSP pin for use with avrdude & USBASP, Atmel ICE programmer or equivalent
- VCC +ve supply power 5V
Note 1: To access these pins you must first remove the batteries and then 'carefully' open the enclosure.
Misc
There are additional headers available for advanced users, as follows:
- 2-pin through hole I2C interface (SDA,SCL)
- 4-pin SMD I2C interface (SDA,SCL,VCC,GND)
- If IR receivers are not installed, then the footprints are available, along with the associated GPIO pins.
- If the I2C EEPROM is not installed, then the SOIC-8 footprint is available, along with the associated GPIO pins.
Spare GPIOs
Advanced users, may further expand KontroLIR, using the following GPIOs, if available.
- The LED pin may be reused for other purposes, if desired. (1 GPIO)
- If the IR receivers are not installed, the 2 signal pins & power supply pin may be reused. (3 GPIOs)
- If the I2C EEPROM is not used then the SDA & SCL pins & power supply pin may be reused. (3 GPIOs)
GPIO Pin and Button Mapping
Detailed GPIO mapping can be examined in the file: KIR_header.h Remote button IDs are pre-calculated from the ROW/COL indices. Every pin used is pre-defined along with a collection of useful pre-compiler macros, intended for ease of use. The contents should be relatively straight forward to follow, for those familiar with the Arduino and IRremote ecosystems.
The image below shows the mapping between MCU pins, Arduino pins and function used in KontroLIR.
The image below shows the button ID and Row/Col mapping used in KontroLIR.