-
Notifications
You must be signed in to change notification settings - Fork 0
Hardware Guide
This guide describes the SuperKey's hardware.
The general layout of the current prototype hardware is shown below:
The SuperKey uses an ATmega1284P microcontroller, currently produced by Microchip Technology. The datasheet for the ATmega1284P is available at this link. The microcontroller uses a dual inline package (DIP) configuration, since this is the easiest type of integrated circuit for hobbyists to work with.
The microcontroller has the following resources:
- 128 kilobytes Flash memory (program data)
- 4 kilobytes EEPROM memory (non-volatile storage)
- 16 kilobytes static RAM
- 32 GPIO lines
- 4 hardware timers / counters
- 2 USARTs
- I2C interface
- SPI interface
- 8-channel, 10-bit ADC
The pinout for the ATmega1284P is shown below:
The current pin assignments are shown in the table below. Pins which are not listed are currently unassigned.
| Pin | Function | Description | Notes |
|---|---|---|---|
| 6 | MOSI |
SPI Controller Out | Only used for programming |
| 7 | MISO |
SPI Controller In | Only used for programming |
| 8 | SCK |
SPI Clock | Only used for programming |
| 9 | RESET |
Reset Device | |
| 10 | VCC |
Power | |
| 11 | GND |
Ground | |
| 12 | XTAL2 |
Crystal Oscillator Input 2 | |
| 13 | XTAL1 |
Crystal Oscillator Input 1 | |
| 14 | RXD0 |
Interface Port UART RX | |
| 15 | TXD0 |
Interface Port UART TX | |
| 16 | RXD1 |
Debug Port UART RX | |
| 17 | TXD1 |
Debug Port UART TX | |
| 19 | OC1A |
Buzzer Output | |
| 20 | PD6 |
Key LED | Active high |
| 21 | PD7 |
Status LED | Active high |
| 30 | AVCC |
ADC Power | ADC is currently unused |
| 31 | GND |
Ground | |
| 32 | AREF |
ADC Reference Voltage | ADC is currently unused |
| 33 | PA7 |
Output TRS Ring | |
| 34 | PA6 |
Output TRS Tip | |
| 35 | PA5 |
Input TRS 2 Ring | |
| 36 | PA4 |
Input TRS 2 Tip | |
| 37 | PA3 |
Input TRS 1 Ring | |
| 38 | PA2 |
Input TRS 1 Tip | |
| 39 | PA1 |
Input TRS 0 Ring | |
| 40 | PA0 |
Input TRS 0 Tip |
The device uses a crystal oscillator with a frequency of 16 MHz as its primary clock inputs. This is connected to the
XTAL1 and XTAL2 pins as shown in the schematic. The capacitors are 22 pF.
The microcontroller fuse configuration was calculated using this site. The fuses are set for the following options:
- External Crystal Oscillator
- Frequency 8.0+ MHz
- Start-up time 16K clocks + 0 ms
- Enable SPI programming
- Enable JTAG
- Enable brown-out detection at 2.7 V
This leads to the following fuse bytes:
- Low:
0xDF - High:
0x99 - Extended:
0xFD
The fuses can be programmed with the following avrdude command:
avrdude -c avrispmkii -P usb -p m1284p -U lfuse:w:0xdf:m -U hfuse:w:0x99:m -U efuse:w:0xfd:m