MichaelMeissner
Senior Member+
I was updating the text table I have to keep track of what pins do what for the Arduino Uno and Teensy 3.0 (I also have digispark, but so far, I haven't actually done anything with the spark). I added notes for the Uno that using the tone library will disable PWM on pins 3 and 11, and using the servo library will disable PWM on pins 9 and 10. In looking at the Teensy 3.0 library links, I did find not any such restrictions. I assume that due to the fact that Arm has very different interrupts than the AVR, that tone/servo don't cause PWM to stop working on any pins on Teensy 3.0. Is this correct?
Here is the table in case it would be helpful to other people:
Here is the table in case it would be helpful to other people:
Code:
// Standard output pin assignments
//
// Arduino Uno Teensy 3.0 Digispark
// =========== ========== =========
// A/D | PWM | I2C/SPI | Other A/D | PWM | Serial | I2C/SPI | Other A/D | PWM | I2C | Other
// ====+=====+==========+======= === +=====+=========+==========+====== ====+=====+=====+======
// Pin 0: D | --- | -- | RX D | --- | RX/RX1 | -- | Touch D | Yes | SDA | --
// Pin 1: D | --- | -- | TX D | --- | TX/TX1 | -- | Touch D | Yes | --- | LED, *3
// Pin 2: D | --- | -- | Int2 D | --- | -- | alt CS0 | --- AD | --- | SCK | --
// Pin 3: D | *1 | -- | Int3 D | Yes | -- | -- | --- AD | --- | --- | USB+, *4
// Pin 4: D | --- | -- | -- D | --- | -- | -- | --- AD | Yes | --- | USB-
// Pin 5: D | Yes | -- | -- D | Yes | Alt Tx1 | -- | --- AD | --- | --- | --
// Pin 6: D | Yes | -- | BRx, *5 D | Yes | -- | alt CS1 | ---
// Pin 7: D | --- | -- | BTx, *5 D | --- | RX3 | alt MOSI | ---
// Pin 8: D | --- | -- | -- D | --- | TX3 | alt MISO | ---
// Pin 9: D | *2 | -- | -- D | Yes | RX2 | SPI CS1 | --
// Pin 10: D | *2 | SPI SS | -- D | Yes | TX2 | SPI CS0 | --
// Pin 11: D | *1 | SPI MOSI | -- D | Yes | -- | SPI MOSI | --
// Pin 12: D | Yes | SPI MISI | -- D | Yes | -- | SPI MISI | --
// Pin 13: D | --- | SPI SCK | LED D | --- | -- | SPI SCK | LED
// Pin A0/14: AD | --- | -- | -- AD | --- | -- | alt SCK | --
// Pin A1/15: AD | --- | -- | -- AD | --- | -- | SPI CS4 | Touch
// Pin A2/16: AD | --- | -- | -- AD | --- | -- | alt SCL | Touch
// Pin A3/17: AD | --- | -- | -- AD | --- | -- | alt SDA | Touch
// Pin A4/18: AD | --- | I2C SDA | -- AD | --- | -- | I2C SDA | Touch
// Pin A5/19: AD | --- | I2C SCL | -- AD | --- | -- | I2C SCL | Touch
// PIn A6/20: AD | Yes | -- | SPI CS2 | --
// Pin A7/21: AD | Yes | alt RX1 | SPI CS3 | --
// Pin A8/22: AD | Yes | -- | alt CS3 | Touch
// Pin A9/23: AD | Yes | -- | alt CS2 | Touch
// *1 On the Uno, the Tone library will interfere with analogWrite (PWM) on pins 3 & 11.
//
// *2 On the Uno, the Servo library disables analogWrite (PWM) on pins 9 & 10 whether or
// not there is a servo on those pins
//
// *3 Digispark pin 1 has a weak input resistor
//
// *4 Digispark pin 3 has a 1.5 kΩ pull-up resistor attached to it which is
// required for when P3 and P4 are used for USB communication (including
// programming). Your design may need to take into account that you'd have to
// overpower this to pull this pin low.
//
// *5 The Uno bluetooth shield uses pins 6 (receive) and 7 (transmit) by default.
// It can use pins 0 and 1 if jumpered to do so.