Introduction
Very simple Slot-2 extension gadget, allows different user peripherals to be connected to the NDS.
Compatible with both NDS and NDSL, also useable with GBA if GBA is booted from SMS or XBOO cable.
Note that it is not possible to boot a GBA from the gadget, it does not appear as ROM device.
Possible applications
Serial Uart, I2C master, SPI master, GPIO port controlling external devices, etc.
Details
Features
- Slot-2 Device, fits GBA rom cart plastic
- User programmable Flash microcontroller
- User I/O Pads (6 total)
- 6 Digital I/O
- 4 Analog inputs
- Gyro sensor (optional)
Note: this device does not appear as GBA ROM cartridge and it is not possible to boot from it in GBA mode.
This is fully selfcontained device, there is no extra cable or programmer needed to reprogram the microcontroller, as the MCU on board is preprogrammed with small bootloader that allows NDS to update the MCU firmware.
Ext port Pinout
Sipsik(TM) Compatible pin mapping:
Nr |
Name |
ATmega Function(s) |
1 |
GND |
GND/AGND |
2 |
X0 |
PD1 TXD |
3 |
VCC 3.3V |
VCC/AVCC |
4 |
X1 |
PD0 RXD |
5 |
X2 |
PC5 ADC5 SCL PD2 INT0 |
6 |
X3 |
PC4 ADC4 SDA PD3 INT1 |
7 |
X4 |
PC3 ADC3 PD4 T0 XCK |
8 |
X5 |
PC2 ADC2 |
X0 is connected to AVR PD1/TXD Pin and can be used as Digital I/O or UART TXD (Transmitter output).
X1 is connected to AVR PD0/RXD Pin and can be used as Digital I/O or UART RXD (Receiver input).
X2 is connected to AVR Pins PC5 and PD2, and can be used as Digital I/O or Analog input. This pin comes SCL when using AVR I2C module.
X3 is connected to AVR Pins PC4 and PD3, and can be used as Digital I/O or Analog input. This pin comes SDA when using AVR I2C module.
X4 is connected to AVR Pins PC3 and PD4, and can be used as Digital I/O or Analog input. This pin can also be used as T0 Input to the Timer0 or XCK (external clock for the UART).
X5 is connected to AVR Pin PC2 and can be used as Digital I/O or Analog input.
All Ext port pins X0 to X5 can have a pullup resistor enabled.
X2, X3, X4 are connected to 2 AVR Pins to maximize the ext port function sharing. This also allows 2 pullups to be used on those pins if stronger pullup value is desired.
BIOS
Features
Upon reset the BIOS does following:
- Set Stack pointer to top of RAM
- Make IRQ Pin Output Low
- Init SPI for the NDS slot-2 interface
- Init ADC for continuous read Ch#7 (on board Gyro sensor)
- Enter communication loop waiting commands from GBA/NDS
Low Level Function Reference
- geek_SetAddress(u16 addr); // Set address for other functions
- u8 geek_ReadFlashNext(); // Read MCU internal Flash and increment address
- u8 geek_ReadEepromNext(); // Read MCU internal EEPROM and increment address
- u8 geek_ReadRamNext(); // Read MCU RAM or I/O Register and increment address
- u8 geek_ReadRam(); // Read MCU RAM or I/O Register
- u8 geek_ReadAdc(); // Read A/D Converter last conversion
- geek_WriteFlashPage(); // Write a Flash page from RAM
- geek_WriteEepromNext(u8 data); // Write to MCU internal EEPROM and increment address
- geek_WriteRamNext(u8 data); // Write to MCU RAM or I/O and increment address
- geek_WriteRam(u8 data); // Write to MCU RAM or I/O
- geek_Exec(); // Execute a user function at address
|