3.2 Connections
External hardware connected to the AVR is listed below.
- Color Button Connected to PB0
- Intensity Button Connected to PB1
- Ambient Light Sensor Connected to PA7
- PIR Sensor Connected to PB3
- RGB LED Connected to PC1
In addition, there are internal connections done in the code as described below:
- DAC output to negative input on Analog Comparator 0
- PB3 and LUT0 input 0 through event system
- Analog Comparator (AC) output to LUT0 input 1
- SPI0 SCK to LUT1 input 0
- SPI0 MOSI to LUT1 input 1
- TCA WO2 to LUT1 input 2
The PIR sensor needs to be connected to one of the input pins on LUT0. The I/O Multiplexing and Considerations chapter in the ATtiny1617 data sheet shows that the RESET and the LUT0-IN0 are on the same pin and that the SPI is sharing pins with the other LUT0 inputs. Moving the SPI to the alternate pin location can be done, but it will come into conflict with LUT1 out. To solve this problem, it is possible to use the Event system to route any other free I/O pin to the event input of LUT0.