With this Feather we're getting a little nostalgic for the ATmega328P - the classic 'Arduino' chip - with this Adafruit Feather 328P running a 3.3V and 8 MHz. Feather is the new development board from Adafruit, and like it's namesake it is thin, light, and lets you fly! We designed Feather to be a new standard for portable microcontroller cores. We have other boards in the Feather family, check'em out here.

At the Feather 328P's heart is at ATmega328P clocked at 8 MHz and at 3.3V logic, a chip setup we've had tons of experience with as it's the same as the Pro Mini and similar to the Adafruit Metro 328. This chip has 32K of flash and 2K of RAM, and we paired it with a SiLabs CP2104 to give it USB-to-Serial program & debug capability built in. Works great when you want to keep your classic Arduino code compatibility, but want to use one of our dozens of FeatherWings

To make it easy to use for portable projects, we added a connector for any of our 3.7V Lithium polymer batteries and built in battery charging. You don't need a battery, it will run just fine straight from the micro USB connector. But, if you do have a battery, you can take it on the go, then plug in the USB to recharge. The Feather will automatically switch over to USB power when its available. We also tied the battery thru a divider to an analog pin, so you can measure and monitor the battery voltage to detect when you need a recharge.

Here's some handy specs!

  • Measures 2.0" x 0.9" x 0.28" (51mm x 23mm x 8mm) without headers soldered in
  • Light as a (large?) feather - 4.8 grams
  • ATmega328p @ 8MHz with 3.3V logic/power
  • 3.3V regulator with 500mA peak current output
  • USB serial converter (CP2104) for USB bootloading and serial port debugging
  • You also get tons of pins - 19 GPIO pins + 2 analog-in-only pins
  • Hardware I2C, hardware SPI support. For UART devices, should use SoftwareSerial
  • 6 x PWM pins
  • 8 x analog inputs (two are shared with I2C)
  • Built in 100mA lipoly charger with charging status indicator LED
  • Pin #13 red LED for general purpose blinking
  • Power/enable pin
  • 4 mounting holes
  • Reset button

The Feather 328P has some extra space left over, so we give you a tiny little prototyping area. If you just need to attach a button or sensor, you may be able to skip out on a breadboard and wire it directly on there. 

Comes fully assembled and tested, with a USB bootloader that lets you quickly use it with the Arduino IDE. We also toss in some header so you can solder it in and plug into a solderless breadboard. Lipoly battery and USB cable not included (but we do have lots of options in the shop if you'd like!)

The Feather 328P is chock-full of microcontroller goodness. There's also a lot of pins and ports. We'll take you a tour of them now!

PDF of above pinout image available here.

Power Pins

  • GND - this is the common ground for all power and logic
  • BAT - this is the positive voltage to/from the JST jack for the optional Lipoly battery
  • USB - this is the positive voltage to/from the micro USB jack if connected
  • EN - this is the 3.3V regulator's enable pin. It's pulled up, so connect to ground to disable the 3.3V regulator
  • 3V - this is the output from the 3.3V regulator, it can supply 500mA peak

Logic pins

This is the general purpose I/O pin set for the microcontroller. All logic is 3.3V

Serial Pins

These pins are the only hardware Serial pins, you shouldn't connect to them unless you absolutely have to - they're shared with the onboard USB-Serial chip!

  • RX / #0 - GPIO #0, also receive (input) pin for Serial - Used for debug and bootloading, do not use these unless you're positive you mean to!
  • TX / #1 - GPIO #1, also transmit (output) pin for Serial - Used for debug and bootloading, do not use these unless you're positive you mean to!

I2C Pins

  • SDA A4 - Analog #4, also the I2C (Wire) data pin. There's no pull up on this pin by default so when using with I2C, you may need a 2.2K-10K pullup.
  • SCL A5 - Analog #5, also the I2C (Wire) clock pin. There's no pull up on this pin by default so when using with I2C, you may need a 2.2K-10K pullup.

SPI Pins

These are the hardware SPI pins, you can use them as everyday GPIO pins but recommend keeping them free as they are best used for hardware SPI connections for high speed. Also used to reprogram the chip with an AVR programmer if you need.

  • SCK / #13 - SPI Clock and GPIO #13, can do PWM output and is connected to the red LED next to the USB jack
  • MOSI / #11 - SPI Microcontroller Out Serial In and GPIO #11, can also do PWM output
  • MISO / #12 - SPI Microcontroller In Serial Out and GPIO #12

General Purpose I/O Pins

  • #2 - GPIO #2, also Interrupt #0
  • #3 - GPIO #3, can also do PWM output and act as Interrupt #1
  • #4 - GPIO #4
  • #5 - GPIO #5, can also do PWM output
  • #6 - GPIO #6, can also do PWM output
  • #7 - GPIO #7
  • #9 - GPIO #9, can do PWM output
  • #10 - GPIO #10, can do PWM output

Analog Inputs

  • A0 thru A3 - These are each analog input as well as digital I/O pins.
  • A6 - This is a special analog input only pin! You cannot use it for digital in/out! This analog input is connected to a voltage divider for the lipoly battery so be aware that this pin naturally 'sits' at around 2VDC due to the resistor divider
  • A7 - This is a special analog input only pin! You cannot use it for digital in/out!

Other Pins!

  • RST - this is the Reset pin, tie to ground to manually reset the AVR, as well as launch the bootloader manually
  • ARef - the analog reference pin. Normally the reference voltage is the same as the chip logic voltage (3.3V) but if you need an alternative analog reference, connect it to this pin and select the external AREF in your firmware. Can't go higher than 3.3V!

We ship Feathers fully tested but without headers attached - this gives you the most flexibility on choosing how to use and configure your Feather

Header Options!

Before you go gung-ho on soldering, there's a few options to consider!

The first option is soldering in plain male headers, this lets you plug in the Feather into a solderless breadboard

Another option is to go with socket female headers. This won't let you plug the Feather into a breadboard but it will let you attach featherwings very easily

A few Feather boards require access to top-side components like buttons or connectors, making stacking impractical. Sometimes you can stack in the opposite order—FeatherWing underneath—or, if both Feather and Wing require top-side access, place the boards side-by-side with a FeatherWing Doubler or Tripler.

We also  have 'slim' versions of the female headers, that are a little shorter and give a more compact shape

Finally, there's the "Stacking Header" option. This one is sort of the best-of-both-worlds. You get the ability to plug into a solderless breadboard and plug a featherwing on top. But its a little bulky

Soldering in Plain Headers

Prepare the header strip:

Cut the strip to length if necessary. It will be easier to solder if you insert it into a breadboard - long pins down

Add the breakout board:

Place the breakout board over the pins so that the short pins poke through the breakout pads

And Solder!

Be sure to solder all pins for reliable electrical contact.

(For tips on soldering, be sure to check out our Guide to Excellent Soldering).

Solder the other strip as well.

You're done! Check your solder joints visually and continue onto the next steps

Soldering on Female Header

Tape In Place

For sockets you'll want to tape them in place so when you flip over the board they don't fall out

Flip & Tack Solder

After flipping over, solder one or two points on each strip, to 'tack' the header in place

And Solder!

Be sure to solder all pins for reliable electrical contact.

(For tips on soldering, be sure to check out our Guide to Excellent Soldering).

You're done! Check your solder joints visually and continue onto the next steps

Battery + USB Power

We wanted to make our Feather boards easy to power both when connected to a computer as well as via battery.

There's two ways to power a Feather:

  1. You can connect with a USB cable (just plug into the jack) and the Feather will regulate the 5V USB down to 3.3V.
  2. You can also connect a 4.2/3.7V Lithium Polymer (LiPo/LiPoly) or Lithium Ion (LiIon) battery to the JST jack. This will let the Feather run on a rechargeable battery.

When the USB power is powered, it will automatically switch over to USB for power, as well as start charging the battery (if attached). This happens 'hot-swap' style so you can always keep the LiPoly connected as a 'backup' power that will only get used when USB power is lost.

The JST connector polarity is matched to Adafruit LiPoly batteries. Using wrong polarity batteries can destroy your Feather. Many customers try to save money by purchasing Lipoly batteries from Amazon only to find that they plug them in and the Feather is destroyed!

The above shows the Micro USB jack (left), LiPoly JST jack (top left), as well as the 3.3V regulator (to the right of the JST) and changeover diode + FET (just below the JST jack) and the LiPoly charging circuitry (below the regulator).

There's also a CHG LED next to the USB jack, which will light up while the battery is charging. This LED might also flicker if the battery is not connected, it's normal.

The charge LED is automatically driven by the LiPoly charger circuit. It will try to detect a battery and is expecting one to be attached. If there isn't one it may flicker once in a while when you use power because it's trying to charge a (non-existent) battery. It's not harmful, and its totally normal!

Power Supplies

You have a lot of power supply options here! We bring out the BAT pin, which is tied to the LiPoly JST connector, as well as USB which is the +5V from USB if connected. We also have the 3V pin which has the output from the 3.3V regulator. We use a 500mA peak regulator. While you can get 500mA from it, you can't do it continuously from 5V as it will overheat the regulator.

It's fine for, say, powering an ESP8266 WiFi chip or XBee radio though, since the current draw is 'spiky' & sporadic.

Measuring Battery

If you're running off of a battery, chances are you wanna know what the voltage is at! That way you can tell when the battery needs recharging. LiPoly batteries are 'maxed out' at 4.2V and stick around 3.7V for much of the battery life, then slowly sink down to 3.2V or so before the protection circuitry cuts it off. By measuring the voltage you can quickly tell when you're heading below 3.7V.

To make this easy we stuck a double-100K resistor divider on the BAT pin, and connected it to A6. You can read this pin's voltage, then double it, to get the battery voltage.

#define VBATPIN A6
   
float measuredvbat = analogRead(VBATPIN);
measuredvbat *= 2;    // we divided by 2, so multiply back
measuredvbat *= 3.3;  // Multiply by 3.3V, our reference voltage
measuredvbat /= 1024; // convert to voltage
Serial.print("VBat: " ); Serial.println(measuredvbat);

This voltage will 'float' at 4.2V when no battery is plugged in, due to the lipoly charger output, so its not a good way to detect if a battery is plugged in or not (there is no simple way to detect if a battery is plugged in).

ENable pin

If you'd like to turn off the 3.3V regulator, you can do that with the EN(able) pin. Simply tie this pin to Ground and it will disable the 3V regulator. The BAT and USB pins will still be powered.

Alternative Power Options

The two primary ways for powering a feather are a 3.7/4.2V LiPo battery plugged into the JST port or a USB power cable.

If you need other ways to power the Feather, here's what we recommend:

Here's what you cannot do:

  • Do not use alkaline or NiMH batteries and connect to the battery port - this will destroy the LiPoly charger and there's no way to disable the charger
  • Do not use 7.4V RC batteries on the battery port - this will destroy the board

The Feather is not designed for external power supplies - this is a design decision to make the board compact and low cost. It is not recommended, but technically possible:

  • Connect an external 3.3V power supply to the 3V and GND pins. Not recommended, this may cause unexpected behavior and the EN pin will no longer work. Also this doesn't provide power on BAT or USB and some Feathers/Wings use those pins for high current usages. You may end up damaging your Feather.
  • Connect an external 5V power supply to the USB and GND pins. Not recommended, this may cause unexpected behavior when plugging in the USB port because you will be back-powering the USB port, which could confuse or damage your computer.

Installing USB Serial Drivers

The USB plug is how you will need to program and debug your code. We use it to both power your project and also provide the USB serial interface. On the Feather 328P we use the SiLabs CP2104 chip, and you'll need to install drivers if you are using Mac or Windows. Linux comes with both drivers already.

Windows users can try plugging the board in, Windows update will probably install drivers for you. If the device is not recognized, simply download and install the Adafruit Windows Driver package below. When you run it, make sure to click that you want to install the SiLabs CP210x chip drivers too!

If you are running Mac OS X , please use the SiLabs drivers here

Once drivers are installed and you've rebooted, you will have a Serial COM port.

Using the Arduino IDE

The Adafruit Feather 328P is an 'Arduino Compatible' - that means that when using the Arduino IDE or other Arduino-friendly development environments, you can simply treat the Feather like an Arduino Pro Mini 3.3V, 8MHz device.

There's two ways you can get your Feather 328P going within Arduino IDE.

The Easy way requires no extra steps, and will work with any version of Arduino IDE - but the menu doesn't say Feather 328P and maybe you're picky and like the Menu to appear right

The Advanced way requires more steps, but the menu will say Feather 328P when you upload code

The Easy Way

Lets start with the Easy Way.

If you have not yet installed Arduino IDE - visit arduino.cc and Download the Latest Version of the Desktop IDE

Open up the Arduino IDE

Open up Examples -> Basics -> Blink

From the Tools menu, select Tools -> Boards -> Arduino Pro or Pro Mini

From the Tools menu, select Tools -> Processor -> ATmega328P (3.3V, 8MHz)

Then from Tools select the Port to be the serial port of the Feather. See above for how to find your COM/Serial port!

Advanced Arduino IDE Setup

If you don't want to have to remember to select Pro Mini you can add the Adafruit AVR package to your IDE, which will make a Feather 328P menu item appear.

  1. Add the Adafruit Board Support Package (BSP) to Arduino by following these steps here
  2. Install the Adafruit BSP for AVRs by following these steps here
  3. You can now select Adafruit Feather 328P

This guide was first published on Jan 24, 2018. It was last updated on Jul 27, 2022.