Xadow IO pin mapping

Introduction

Single reference page for all pin information including:-
  • How to use each pin in your Arduino code
  • Xadow FFC to Atmega32u4 pin mapping
  • pins that have interrupts and timers
  • the 2 serial ports, IIc and ISP
  • additional on board IO, that might be hacked
The tables provide different views of the data and are especially useful when you are planning which modules to use and which IO pins for direct use!

Xadow FFC IO bus and matching Arduino and Atmega information and example Arduino code.

**Xadow FFC pins****Arduino****Atmega32u4 pins**
**Name****IO function****Alternate use****#****IO Pin****code example(s)****Name (**interrupts in red**)****#****Notes**
P1Digital PinISP SCK1**15**PinMode(15, OUTPUT); digitalWrite(15, HIGH);PB1**(PCINT1**/SCLK)9ISP SMD header pads also on rear of Xado Main board
P2Digital PinISP MOSI2**16**PinMode(16, OUTPUT); digitalWrite(16, HIGH);PB2(PDI/**PCINT2**/MOSI)10
P3Digital PinISP MISO3**14**PinMode(14, OUTPUT); digitalWrite(14, HIGH);PB3(PDO/**PCINT3**/MISO)11
P4Analogue PinDigital pin!4**A5**analogWrite(A5, 128); pinMode(A5, OUTPUT); digitalWrite(A5, HIGH);PF0(ADC0)41Arduino analogue pins can also be used as digital pins!
P5Digital PinIIC SCL9**3**PinMode(3, OUTPUT); digitalWrite(3, HIGH);PD0(OC0B/SCL/**INT0**)18
P6Digital PinIIC SDA10**2**PinMode(2, OUTPUT); digitalWrite(2, HIGH);PD1 (SDA/**INT1**)19
P7Digital PinSerial Rxd11**0**PinMode(0, OUTPUT); digitalWrite(0, HIGH);PD2(RXD/**INT2**)20See Xadow BLE/GPS examples for these serial pin usage info. NOT same serial port uploading code–see Red/Green LED below.
P8Digital PinSerial Txd12**1**PinMode(1, OUTPUT); digitalWrite(1, HIGH);PD3(TXD/**INT3**)21

Some MORE Xadow IO pins - only on the Main module, NOT on the FFC bus!

**Xadow pins****Arduino****Atmega32u4 pins**
**Name****IO function****Alternate use****#****IO Pin****code example(s)****Name (**interrupts in red**)****#****Notes**
Red LEDRx-**17**PinMode(17, OUTPUT); digitalWrite(17, HIGH);PB0(SS/**PCINT0**)8Serial port uploading code
Green LEDTx-**11**PinMode(11, OUTPUT); digitalWrite(11, HIGH);PB7(**PCINT7**/OC0A/OC1C/!RTS)12
Wake-**10**Have not yet connected and validated this!PB^/A10/D1030On board switch – you need super soldering skills to access this!
Note: Reset switch is connected to Atmega32u4 Reset pin 13 via a diode – so no access to the 32u4 IO pin AT THE RESET SWITCH!

The BIG Table of Xadow modules and the IO bus pin use for each module.

Why such a big complicated table? Well it brings together all of the IO information in one place, but more importantly it lets you see which IO pins are still available once you have selected several Xadow modules! Also the schematic has different FFC pin numbers to the rest of the wiki documentation!
Notes:-
  1. Remember that IIC devices are daisy chained – that is they can connect in parallel, so you can have more than one IIC device connected to the same pins!
  2. Need more IO pins? You may be able to use ONE pin for several different uses, the same way the vibration motor and buzzer are sharing one pin, or in some situations you can use the same pin for different purposes at DIFFERENT TIMES. For example you might set a pin as output to trigger an ultrasonic sensor, then change the pin to input to detect when the signal is received!
  3. Most IIC modules {except the Main Board module, LED, RTC}, ALSO have IIC breakout pins.
So items in purple in the IIC SCL & IIC SDA columns do NOT also have breakout pins!
  1. Additional details highlighted in yellow in center of table document the ADDITIONAL** breakout pins on each Xadow module!
  2. ? = Don’t know, or not yet verified!
SCK
MOSI
MISO
A5
3
2
1
0
**Arduino Pin name**
**Interrupts in red-------->**PB1**(PCINT1**/SCLK)PB2(PDI/**PCINT2**/MOSI)PB3(PDO/**PCINT3**/MISO)PF0(ADC0)PD0(OC0B/SCL/INT0)PD1(SDA/**INT1**)PD2(RXD/**INT2**)PD3(TXD/**INT3**)Atmega32u4 pin Name
**IIC = I2C**
910114118192021Atmega32u4 pin#
P1, 1P2, 2P3, 3P4, 4P5, 9P6, 10P7, 11P8,12FFC pin Name, #
**Xadow Modules ****Module Control Mode & Address**
Digital Pin
Digital Pin
Digital Pin
**Analog or **Digital Pin
**IIC SCL**
**IIC SDA**
**Serial Rxd**
**Serial Txd**
**Xadow Pin function**
3-Axis Accelerometer
IIC 0x53
SCKMOSIMISO
A5
SCL
SDA
RxdTxD
BaroMeter
IIC 0x77
SCKMOSIMISO
A5
SCL
SDA
RxdTxD
BLE Slave
Serial
RX/TX
Plus pads specific to BLE on rear
Breakout
None!
SCKMOSIMISO
A5
SCL
SDA
RxdTxD+ Grove I2C & Serial sockets
LED Controller
IIC 0x04
SCL
SDA
OLED
IIC 0x3C
SCL
SDA
Vibration Motor
Digital Signal
H
H
_**Disconnect module BEFORE using ISP**_
RTC
IIC 0x68
SCL
SDA
rear pad connect INTB – Int0???
Buzzer
Digital Signal
H
?
?
H
?
?
?
?
_**Disconnect module BEFORE using ISP**_
Digital Compass
IIC 0x1E
?
?
?
?
?
?
?
?
Motor
TBD
?
?
?
?
?
?
?
?
GPS
Serial
?
?
?
?
?
?
RX/TX
Storage
IIC 0x50 & 0x51
?
?
?
?
?
?
?
?
**Main Board**
?IIC master =0x00?
ISP – SCKISP MOSIISP MISO
SCL
SDA
All via SMD pads on rear.

Help us make it better

Thank you for choosing Seeed. A couple of months ago we initiated a project to improve our documentation system. What you are looking at now is the first edition of the new documentation system. Comparing to the old one, here is the progresses that we made:
  • Replaced the old documentation system with a new one that was developed from Mkdocs, a more widely used and cooler tool to develop documentation system.
  • Integrated the documentation system with our official website, now you can go to Bazaar and other section like Forum and Community more conveniently.
  • Reviewed and rewrote documents for hundreds of products for the system’s first edition, and will continue migrate documents from old wiki to the new one.
An easy-to-use instruction is as important as the product itself. We are expecting this new system will improve your experience when using Seeed’s products. However since this is the first edition, there are still many things need to improve, if you have any suggestions or findings, you are most welcome to submit the amended version as our contributor or give us suggestions in the survey below, Please don’t forget to leave your email address so that we can reply.
Happy hacking