The functions available from the imp001’s pins
|5||TX||SCLK||Yes||Yes||Yes||For Pin 7|
|8||TX||SCL||MOSI||Yes||Yes||For Pin 5 or 9|
|9||RX||SDA||MISO||Yes||Yes||For Pin 2|
All of the imp001’s pins are tri-stated (floating) by default, ie. on power on, after chip reset, or after deep sleep.
In GPIO mode pins may source or sink up to 4mA.
Pins 1 and 2 have higher coupling than other pin pairs; if one pin is used for high-speed signalling, it is recommended that the other not be used for analog sampling.
Pin 6 is reserved for the ID chip and may not be used for any other purpose.
The wakeup pin, pin 1, can be used to wake the imp001 from a deep sleep, but only if the pin is configured with this capability before the imp001 goes into deep sleep. To configure the pin for this role, use the following code:
Once the imp001 is in deep sleep — typically with a server.sleepfor() or server.sleepuntil call — setting pin 1 to logic high will wake the device. However, Squirrel is started afresh so the registered callback request will be lost. The callback function will be called if the imp001 is already awake when the pin is triggered.
The imp001 wakes when the pin is high, not on the rising edge. The external device responsible for signalling the wakeup pin should subsequently drive the pin low; the imp001 cannot return to sleep if the wakeup pin is high. An internal pull-down is automatically enabled when wakeup is configured.
All of the imp001’s pins are tristated (floating) by default, ie. on power on, after chip reset, or after deep sleep.