will be read-only starting December 31st, 2018. For more info pleae look at this Forum Post

Oak Micros om328p Arduino Compatible


The om328p is a second generation Oak Micros device, based on the Atmel ATmega328p (datasheet), and is Arduino Duemilanove compatible. A key design feature of the om328p is that the ATmega328p is packaged on a compact carrier board that is socketable using a 28-pin 600mil DIL style package. A 0.1" pin spacing allows the device to be on breadboards and in other thru-hole applications.

The om328p has 14 digital input/output pins (of which 6 can be used as PWM outputs), 8 analog inputs (2 more than the Duemilanove), a 16 MHz crystal oscillator, and a USB connection. It contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it with a AC-to-DC adapter or battery to get started. The pin layout is the same as other Stamp style layouts with (TX, RX, ATN, GND) on one side and (Vin, GND, Reset, 5V) on the other.

The Oak Micros om328p is similar to an Arduino Nano but has the following advantages:

  • Smaller (1.4" x 0.7"),
  • Uses the ATmega328p that has twice the flash, RAM, and EEPROM capability,
  • Built on a two-sided PCB with surface mounted chips on one side making it easier to reproduce,
  • Uses thinner round pins for easier insertion into breadboards and sockets,
  • Less expensive.

The Oak Micros om328p with Arduino bootloader has a very complete User Guide and Reference and is shipped with a "hello world" style demo sketch that blinks the 3 on-board LEDs. It is supported via a zip file that contains the source to the demo sketch and the schematic in Cadsoft EAGLE format.

Schematic and Design

EAGLE Schematic: See the om328p Arduino support files.

The EAGLE board layout is available by contacting Oak Micros. It is supplied with a non-commercial license that allows individual use. The two-sided board meets the requirements for the Spark Fun BatchPCB process (i.e. minimum 8 mil track/spacing and 20 mil holes). If you have strong SMD soldering skills then you can either order a board from BatchPCB or directly from Oak Micros.


MicrocontrollerAtmel ATmega328
Operating Voltage (logic level)5 V
Input Voltage (recommended)7-12 V
Input Voltage (limits)7-18 V
Digital I/O Pins14 (of which 6 provide PWM output)
Analog Input Pins8
DC Current per I/O Pin40 mA
Flash Memory32 KB (of which 2KB is used by bootloader)
Clock Speed16 MHz
Dimensions1.4" x 0.7" (36mm x 18mm)


  • Automatic reset during program download
  • Power OK red LED
  • Yellow active high LED on SCK (D13)
  • Green and red active low LEDs on (D9 and D11)
  • Green (TX), red (RX) LEDs for USB communications
  • Auto sensing/switching power input
  • Small mini-B USB for programming and serial monitor
  • Standard 0.1" spacing DIP (breadboard friendly)


The om328p can be powered via the mini-B USB connection, 7-18V unregulated external power supply (pin 28), or 5V regulated external power supply (pin 25). The power source is automatically selected to the highest voltage source and the red LED indicates that power is available.

The simplest method of powering the device is to connect a USB cable from a PC to the USB mini-B receptacle on the device. It is recommended that a powered USB hub is used if the device is plugged into a circuit that requires more than 100mA and that the maximum current is limited to 250mA. The device uses approximately 30mA of this capacity with all the pins in the input state. A low voltage drop schottky diode is used to protect the USB port from an external supply. Depending on the current used, the supply voltage using USB power is between 4.65V and 4.85V. Note that the USB port only provides up to 100mA until the USB negotiation is complete. If your external circuit requires more than 100mA, it may not work correctly and you should use one of the other power options described below.

It is also possible to apply a voltage source of between 7 and 18 Volts DC to pins 27 and 28 where pin 27 is ground. This DC voltage source can be an unregulated AC adapter (wall wart) or a battery such a 9V cell. The on-board filter capacitors and regulator convert the input voltage to 5V. This 5V output is also available on pin 25. The on-ï·“board regulator has limited capacity for heat dissipation so the input voltage and current should not be too high; a range of 7 to 12 Volts is preferred with a maximum current of 250mA.

For stand-alone use, most users will benefit from powering the devices from an externally regulated source between 3.6V and 5V connected to pins 25 and 27. The output of the external regulator can also be used to power additional external circuitry up to the capacity of the regulator. Depending on the power dissipated by the regulator, it may need to be mounted on a heat sink to prevent it from getting too hot.


The ATmega328 on the om328p has 32 KB of flash memory for storing code (of which 2 KB is used for the bootloader). It has 2 KB of SRAM and 1KB of EEPROM (which can be read and written with the EEPROM library).

Input and Output

Each of the 14 digital pins on the om328p can be used as an input or output, using pinMode(), digitalWrite(), and digitalRead() functions. They operate at 5 volts. Each pin can provide or receive a maximum of 40 mA and has an internal pull-up resistor (disconnected by default) of 20-50 kOhms.

In addition, some digital pins have specialized functions:

  • Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data. These pins are connected to the corresponding pins of the FTDI USB-to-TTL Serial chip.
  • External Interrupts: 2 and 3. These pins can be configured to trigger an interrupt on a low value, a rising or falling edge, or a change in value. See the attachInterrupt() function for details.
  • PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analogWrite() function.
  • SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication, which, although provided by the underlying hardware, is not currently included in the Arduino language.
  • Yellow LED: 13. There is a built-in LED connected to digital pin 13. When the pin is HIGH value, the LED is on, when the pin is LOW, it's off.
  • Green LED: 9. There is a built-in LED connected to digital pin 9. When the pin is LOW value, the LED is on, when the pin is HIGH, it's off.
  • Red LED: 11. There is a built-in LED connected to digital pin 11 When the pin is LOW value, the LED is on, when the pin is HIGH, it's off.

The om328p has 8 analog inputs, each of which provide 10 bits of resolution (i.e. 1024 different values). By default they measure from ground to 5 volts, though is it possible to change the upper end of their range using the analogReference() function with the INTERNAL parameter. The om328p does not support external voltage references.

In addition some analog pins have specialized functionality:

  • I2C: 4 (SDA) and 5 (SCL). Support I2C (TWI) communication using the Wire library (documentation on the Wiring website).

See also the Oak Micros mapping between om328p pins and ATmega328 ports.


The om328p has a number of facilities for communicating with a computer, another Arduino, or other microcontrollers. The ATmega328 provide UART TTL (5V) serial communication, which is available on digital pins 0 (RX) and 1 (TX). An FTDI FT232RL on the board channels this serial communication over USB and the FTDI drivers (included with the Arduino software) provide a virtual com port to software on the computer. The Arduino software includes a serial monitor which allows simple textual data to be sent to and from the Arduino board. The RX and TX LEDs on the board will flash when data is being transmitted via the FTDI chip and USB connection to the computer (but not for serial communication on pins 0 and 1).

A SoftwareSerial library allows for serial communication on any of the om328p digital pins.

The ATmega328 also support I2C (TWI) and SPI communication. The Arduino software includes a Wire library to simplify use of the I2C bus; see the Wire documentation for details. To use the SPI communication, please see the ATmega328 datasheet.


The om328p can be programmed with the Arduino software (download) by selecting the 'Duemilanove w/ ATmega328' device from the Tools > Board menu. For details, see the reference and tutorials. Alternatively you can creating a custom board - see chapter 4 in the om328p User Guide and Reference.

The ATmega328 on the om328p comes preburned with a bootloader that allows you to upload new code to it without the use of an external hardware programmer. It communicates using the original STK500 protocol (reference, C header files).

You can also bypass the bootloader and program the ATmega328 using ICSP (In-Circuit Serial Programming); see these instructions for details. An ICSP programmer can be connected to the om328p using the pins shown in section 5.8 of the User Guide and Reference.

Automatic (Software) Reset

Rather then requiring a physical press of the reset button before an upload, the om328p is designed in a way that allows it to be reset by software running on a connected computer. One of the hardware flow control lines (DTR) of the FT232RL is connected to the reset line of the ATmega328 via a 100 nanofarad capacitor and pre-biased transistor. When this line is toggled, the reset line drops long enough to reset the chip. The Arduino software uses this capability to allow you to upload code by simply pressing the upload button in the Arduino environment. This means that the bootloader can have a shorter timeout, as the toggling of DTR can be well-coordinated with the start of the upload.

This setup has other implications. When the om328p is connected to either a computer running Mac OS X or Linux, it resets each time a connection is made to it from software (via USB). For the following half-second or so, the bootloader is running on the om328p. While it is programmed to ignore malformed data (i.e. anything besides an upload of new code), it will intercept the first few bytes of data sent to the board after a connection is opened. If a sketch running on the board receives one-time configuration or other data when it first starts, make sure that the software with which it communicates waits a second after opening the connection and before sending this data.

Physical Characteristics

The maximum length and width of the om328p PCB are 1.4 and 0.7 inches respectively (36mm x 18mm). The mini-B USB connector does not extend beyond these measurements. Twenty-eight pins allow the device to be plugged into a standard 28-pin DIL 600 mil socket or a breadboard.

Purchasing an Oak Micros om328p

The om328p Arduino compatible is available from the Oak Micros shop for $34.95. A suitable mini-B USB cable is also available for an additional $2.95.