Introducing Pro Trinket Created by lady ada Last updated on 2018-01-11 09:10:40 PM UTC
Guide Contents Guide Contents Overview Guided Tour Pinouts Power Pins GPIO Pins 2 3 8 10 11 11 Logic Level The Digital Only GPIO Pins The Analog/Digital GPIO Pins The Analog only pins 11 12 13 14 Other Pins FTDI Breakout Windows Driver Installation Manual Driver Installation Using the USB Bootloader About the bootloader Pro Trinket USB Drivers for Windows Special Notes on using Pro Trinket with Linux How to start the USB bootloader Using FTDI Cables Select the correct Board in IDE Connect FTDI Friend or
Overview Trinket's got a big sister in town - the Pro Trinket! Pro Trinket combines everything you love about Trinket with the familiarity of the core Arduino chip, the ATmega328. It's like an Arduino Pro Mini with more pins and USB tossed in. © Adafruit Industries https://learn.adafruit.
Trinket's a year old now, and while its been great to see tons of tiny projects, sometimes you just need more pins, more FLASH, and more RAM. That's why we designed Pro Trinket, with 18 GPIO, 2 extra analog inputs, 28K of flash, and 2K of RAM. Like the Trinket, it has onboard USB bootloading support - we opted for a MicroUSB jack this time. We also added Optiboot support, so you can either program your Pro Trinket over USB or with a FTDI cable just like the Pro Mini and friends.
The Pro Trinket PCB measures only 1.5" x 0.7" x 0.2" (without headers) but packs the same capability as an Arduino UNO. So it's great once you've finished up a prototype on an official Arduino UNO and want to make the project smaller. The Pro Trinket 5V uses the Atmega328P chip, which is the same core chip in the Arduino UNO/Duemilanove/Mini/etc. at the same speed and voltage. So you'll be happy to hear that not only is Pro Trinket programmable using the © Adafruit Industries https://learn.adafruit.
Arduino IDE as you already set up, but 99% of Arduino projects will work out of the box! Here's some things you may have to consider when adapting Arduino sketches: Pins #2 and #7 are not available (they are exclusively for USB) The onboard 5V regulator can provide 150mA output, not 800mA out You cannot plug shields directly into the Pro Trinket SoftwareSerial will not work on the 3V Pro Trinket without changes. See this FAQ. There is no Serial-to-USB chip onboard.
Reset button for entering the bootloader or restarting the program. Works with 99% of existing Arduino sketches (anything that doesn't use more than 28K, and doesn't require pins #2 and #7) Mounting holes! Yeah! © Adafruit Industries https://learn.adafruit.
Guided Tour Let me take you on a tour of your Trinket! Each trinket is assembled here at Adafruit and comes chock-full of good design to make it a joy to use. Micro-B USB connector - We went with the ultra-common micro-B USB connector for power and/or USB bootloading. We use a special half SMT/half thru hole connector with extra big pads so the connector is very strong. It's also a proper USB connector, so you can use any length cable.
string, etc. On the bottom there's a spot for a 2-pin JST-PH connector. this is optional and can be soldered on by hand. It will let you use a lipoly or AAA battery pack or a JST cable for other power input. It's connected to the GND and VBAT pins © Adafruit Industries https://learn.adafruit.
Pinouts There are two versions of the Pro Trinket: 3V and 5V. They are almost identical but there are slight differences in the pinouts: one has a 3V output pin in the top right, the other has a 5V output pin instead © Adafruit Industries https://learn.adafruit.
Power Pins We'll start with the top pins BAT+, GND, USB+, and 3V or 5V BAT+ is the Battery + Input pin. If you want to power the Pro Trinket from a battery or power adapter or solar panel or any other kind of power source, connect the + (positive) pin here! You can connect up to 16V DC. If you have a 3V Pro Trinket, you'll want at least 3.5V input to get a good 3.3V output. If you have a 5V Pro Trinket, 5.5V or higher is suggested. This input is reverse-polarity protected.
The Digital Only GPIO Pins RX - also known as Digital #0, this is the hardware serial input pin. This is used when programming with an FTDI cable but is available when using the native USB to program TX - also known as Digital #1, this is the hardware serial output pin. This is used when programming with an FTDI cable but is available when using the native USB to program Digital 3 - Also known as external interrupt #1.
The Analog/Digital GPIO Pins Analog 0 - also known as Digital 14, this pin can be a digital I/O pin or an analog input pin Analog 1 - also known as Digital 15, this pin can be a digital I/O pin or an analog input pin Analog 2 - also known as Digital 16, this pin can be a digital I/O pin or an analog input pin Analog 3 - also known as Digital 17, this pin can be a digital I/O pin or an analog input pin Analog 4 - also known as Digital 18, this pin can be a digital I/O pin or an analog input pin.
The Analog only pins The two pins that sit sort-of inside the body of the Pro Trinket, A6 and A7, are analog input only pins. They're kind of an 'extra' that you get with the Pro Trinket. These pins cannot be used for LEDs, buttons, servos, etc. They're only for analogRead() usage! If you're used to using an Arduino Uno, you may notice that pins #2 and #7 are not available. That's because we use those two pins for the USB bootloader. They are not available for use and are not broken out.
Other Pins Aref - this is the optional analog reference pin for the analog converter, to be used when you want the 'top' of the analog converter to be different than 3V or 5V. Connect this to your desired reference voltage (between 0 and the Pro Trinket voltage) and use analogReference(EXTERNAL) RST - This is the Reset pin for the Pro Trinket. Connecting this to ground momentarily resets the Trinket and also starts up the bootloader. © Adafruit Industries https://learn.adafruit.
FTDI Breakout At the bottom is 6 pins in a row that we call the FTDI header. You can use these pins to program the Pro Trinket with an FTDI cable or FTDI Friend. You can also use it for serial debugging. GND - (Black BLK wire on FTDI Cable) same as the power ground pins GND - ditto 5V - same as the VBUS pin RX - same as the RX pin TX - same as the TX pin RST - (Green GRN wire on FTDI Cable) there's a 0.
© Adafruit Industries https://learn.adafruit.
Windows Driver Installation Mac and Linux do not require drivers, only Windows folks need to do this step Before you plug in your board, you'll need to possibly install a driver! Click below to download our Driver Installer. Download Latest Adafruit Windows Driver Installer https://adafru.it/A0N Download and run the installer.
On Windows 7, by default, we install a single driver for most of Adafruit's boards, including the Feather 32u4, the Feather M0, Feather M0, Express, Circuit Playground, Circuit Playground Express, Gemma M0, Trinket M0, Metro M0 Express. On Windows 10 that driver is not necessary (it's built in to Windows) and it will not be listed. The Trinket / Pro Trinket / Gemma / USBtinyISP drivers are also installed by default.
And point windows to the Drivers folder when it asks for the driver location © Adafruit Industries https://learn.adafruit.
Using the USB Bootloader About the bootloader A bootloader is a tiny piece of software residing on the microcontroller that that helps load your own code into the remaining space. One of the challenges with the Pro Trinket is that we wanted to have a built-in USB bootloader, but the ATmega328 doesn't have built-in USB hardware! So instead, Frank (our awesome engineer with mad USB chops) created a USB bootloader that combines the elegance of V-USB with the well-supported and tested nature of the USBtinyISP.
Special Notes on using Pro Trinket with Linux Pro Trinket is not supported on Linux operating system at this time - try Mac OS or Windows! However, you can try the following - it does work for some computers Linux is fairly picky about who can poke and prod at the USB port. You can always run avrdude or Arduino IDE as root, which will make sure you have the proper permissions. If you want to be super-cool you can add a udev rule which will let any user (who is not root) connect to the USBtiny driver.
© Adafruit Industries https://learn.adafruit.
Using FTDI Cables For beginners, we suggest using an FTDI cable for programming and debugging, especially if you aren't simply porting an existing Arduino project to Pro Trinket. Much like many Arduino-compatibles, there's a header for connecting a 'classic' FTDI cable or FTDI friend. © Adafruit Industries https://learn.adafruit.
The bootloader on Pro Trinket is dual USB & FTDI "optiboot" so you can use either the USB port or the FTDI breakout to upload. However, only the FTDI port allows you to use Serial debugging. So it's a bit of a tradeoff - USB is inexpensive, built-in but requires a button press to start & there's no debugging, FTDI requires an extra cable but has auto-reset and debug console.
Don't forget you'll need to install FTDI VCP drivers, available from FTDI chip. Then select the COM port from the Tools menu as well, to upload! © Adafruit Industries https://learn.adafruit.
Of course, you can use the FTDI cable for debugging not just programming! To use the FTDI cable to debug programs, add the standard Serial.begin(baudrate); line as you would with an UNO and Serial.print or Serial.println as you expect! Then select Tools / Serial monitor after loading your program. The Trinket will re-start when you launch the monitor so you can see your data right from the start; be patient while the Trinket finishes starting. © Adafruit Industries https://learn.adafruit.
Setting up Arduino IDE Chances are, you picked up a Trinket because it is programmable with the Arduino IDE.
Next go into the Tools -> Programmer menu and select the USBtinyISP programmer. Plug in the Trinket, make sure you see the green LED lit (power good) and the red LED pulsing. Press the button if the red LED is not pulsing, to get into bootloader mode. Click the Upload button (or select File->Upload) © Adafruit Industries https://learn.adafruit.
If everything goes smoothly you should see the following (no red error messages) and of course, the red LED on the trinket will blink on/off once a second Something Went Wrong! If you get the error message avrdude: Error: Could not find USBtiny device (0x1781/0xc9f) That means the bootloader wasn't active. Make sure to press the button on the Trinket to activate the bootloader before clicking the Upload button.
Also, don't forget to install the Windows driver if you're using windows! © Adafruit Industries https://learn.adafruit.
Hints for Arduino-compatibility The Pro Trinket uses the Atmega328P chip, which is the same core chip in the Arduino UNO/Duemilanove/Mini/etc. It's the 'classic' Arduino chip! So you'll be happy to hear that not only is Pro Trinket programmable using the Arduino IDE as you already set up, but 99% of Arduino projects will work out of the box! The Pro Trinket 5V runs at 16MHz, just like the Uno.
Re-programming Bootloader If you'd like to reprogram the bootloader on your Pro Trinket, or update the bootloader to not have the Optiboot-loopon-RX bug, download this zip of two Arduino sketches These are only tested on an UNO! For non-UNOs you'll need to swap pins 11, 12, 13 for the hardware SPI pins but we haven't tested it at all, so UNO only please. protrinketbootloaders_2015_06_09.zip https://adafru.
© Adafruit Industries https://learn.adafruit.
F.A.Q. I'm trying to use Software Serial on the Pro Trinket 3V and getting compiler errors If you're running an older version of the IDE, there may not be support for 12MHz software serial. Find your Arduino installation folder (if you're using a Mac you may need to explore the package) and locate the libraries/SoftwareSerial folder and open up SoftwareSerial.h inside.
Downloads Datasheets & Files Datasheet of ATmega328 Microcontroller EagleCAD PCB files for both Pro Trinkets Fritzing objects in the Adafruit Fritzing library 3V Declaration of Conformity 3V EMC Test Report 3V Statement of Verification 3V FCC Test Report 3V IC Test Report 5V Declaration of Conformity 5V EMC Test Report 5V Statement of Verification 5V FCC Test Report 5V IC Test Report Source code Original code for the Pro Trinket bootloader on github We do not offer any support for this code, it is released
Pro Trinket 3V @ 12MHz Fabrication print, dimensions in inches (same for both 3V and 5V) © Adafruit Industries https://learn.adafruit.
© Adafruit Industries Last Updated: 2018-01-11 09:10:39 PM UTC Page 38 of 38