The I/O Map
Be aware the EC1 is a 3.3Volt device. So as a general rule, please ensure this voltage is never exceeded on any pin except those that are explicitly marked as being 5V tolerant. Remember all the pins are naked, so be careful about static electricity and always use an appropriate drive circuit. For example, never connect a relay directly to a pin.
The table below show the functionality assigned to each of the EC1 pins.
SPLat Program Number | SPLat Program Number | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Other | Serial | Digital | Analogue | 5V Tolerant | CPU Pin | Board Pin |
Board Pin | CPU Pin | 5V Tolerant | Analogue | Digital | Serial | Other | ||||
In | Out | In | Out | Out | In | Out | In | ||||||||||
0 | A0 | 0 | 0V | Ground | |||||||||||||
1 | A1 | 1 | Vbat | RTC Battery | |||||||||||||
2 | A2 | 2 | 30 | C13 | 0 | Button | |||||||||||
0 | A3 | 3 | 29 | B9 | Yes | 0 | Green LED | ||||||||||
1 | A4 | 4 | 28 | B8 | Yes | 1 | Red LED | ||||||||||
2 | A5 | 5 | 27 | B7 | Yes | 7 | OBQC | ||||||||||
2 | A6 | 6 | 26 | B6 | Yes | 6 | OBQC | ||||||||||
3 | B0 | 7 | 25 | B5 | Yes | 5 | |||||||||||
4 | B1 | 8 | 24 | B4 | Yes | Xwire | |||||||||||
5 | B2 | 9 | 23 | A15 | Yes | 4 | |||||||||||
6 | E8 | 10 | 22 | F7 | 3 | ||||||||||||
7 | E9 | 11 | 21 | F6 | Yes | 2 | |||||||||||
8 | Yes | B14 | 12 | 20 | A8 | Yes | 1 | ||||||||||
9 | Yes | B15 | 13 | +5V | 5V | ||||||||||||
3.3V | +3V3 | +3V3 | 3.3V | ||||||||||||||
5V | +5V | 0V | Ground | ||||||||||||||
Receive | 252 | Yes | A10 | 14 | R | CPU Reset | |||||||||||
Transmit | 252 | Yes | A9 | 15 | 19 | B3 | Debug | ||||||||||
Ground | 0V | 18 | A14 | Debug | |||||||||||||
10 | D8 | 16 | 17 | A13 | Debug |
Download the I/O map file from here. The I/O Map for the EC1 board can be used directly in your application. You may either:
- copy and paste into your own .spt file
- use the # include directive to include the file
- include it in a build file
Using the file is easy. To read from an input simply say "InputK iPin21". To turn an output on, simply say "On oRedLED".