Advertisement

Pololu A-Star 328PB User's Guide
Pololu A-Star 328PB User's
1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Contacting Pololu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3. A-Star 328PB Micro pinout and components . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
4. Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.1. Connecting power . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.2. Connecting to the serial interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.3. Programming using the Arduino IDE . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.4. ATmega328PB support in the Arduino IDE . . . . . . . . . . . . . . . . . . . . . . . . 22
5. The A-Star 328PB Serial Bootloader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
https://www.pololu.com/docs/0J74/all
Guide
© 2001-2018 Pololu Corporation
Page 1 of 25

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the A-Star 328PB and is the answer not in the manual?

Questions and answers

Summary of Contents for Pololu Corporation A-Star 328PB

  • Page 1: Table Of Contents

    4.4. ATmega328PB support in the Arduino IDE ......22 5. The A-Star 328PB Serial Bootloader ....... 24 https://www.pololu.com/docs/0J74/all...
  • Page 2: Overview

    The A-Star 328PB Micro breaks out 19 general-purpose I/O lines along two rows of pins, including seven usable as PWM outputs and eight usable as analog inputs; another five GPIO pins (including two usable as PWM outputs) can be accessed along the bottom edge of the board.
  • Page 3 MHz resonator appears to function without problems, but for any critical applications you should confirm for yourself that this product is appropriate. Either a USB-to-serial adapter or an AVR in-system programmer (ISP) is required to program the A-Star 328PB Micro from a computer. We recommend our USB AVR Programmer v2.1 , which can be used as both, and [https://www.pololu.com/product/3172]...
  • Page 4 Pololu A-Star 328PB User’s Guide © 2001–2018 Pololu Corporation ◦ 3.8 V to 15 V (3.3 V versions) or 5.5 V to 15 V (5 V versions) on BAT+ ◦ USB-to-serial adapter can supply power to VCCIN on the serial header •...
  • Page 5 Pololu A-Star 328PB User’s Guide © 2001–2018 Pololu Corporation The A-Star 328PB Micro is a part of our larger A-Star family [https://www.pololu.com/category/149/a-star- , all of whose members are programmable-controllers] based on AVR microcontrollers and are preloaded with Arduino-compatible bootloaders. The table below...
  • Page 6 Pololu A-Star 328PB User’s Guide © 2001–2018 Pololu Corporation A-Star 32U4 Mini A-Star 32U4 A-Star 32U4 Robot Prime LV Controller LV A-Star 328PB A-Star 32U4 A-Star 32U4 Mini Micro Micro A-Star 32U4 A-Star 32U4 Robot Prime SV Controller SV A-Star 32U4 Mini...
  • Page 7: Contacting Pololu

    Pololu A-Star 328PB User’s Guide © 2001–2018 Pololu Corporation 2. Contacting Pololu We would be delighted to hear from you about any of your projects and about your experience with the A-Star 328PB. You can contact us directly or post on our forum [https://www.pololu.com/contact]...
  • Page 8: A-Star 328Pb Micro Pinout And Components

    (50k dxf) [https://www.pololu.com/file/0J1460/ac05a-drill.dxf] The pinout diagram identifies the I/O and power pins on the A-Star 328PB Micro, and is shown below. The A-Star 328PB is based on the ATmega328PB AVR microcontroller from Atmel (now part of Microchip), and most pins on the board are directly connected to the microcontroller. The A* circuit board has printed indicators that you can use to quickly identify each pin’s capabilities: pins labeled...
  • Page 9 3.3 V 12 MHz Yellow Connectors The A-Star 328PB includes a 6-pin header along its top edge that can be used for TTL serial programming with the preloaded Arduino-compatible bootloader. The serial interface is compatible with our USB AVR Programmer v2.1 and commonly available [https://www.pololu.com/product/3172]...
  • Page 10 Programmer v2.1. Power The main power input for the A-Star 328PB Micro is the BAT+ pin, which is reverse-protected and can accept power sources up to 15 V. Reverse-protected power can be supplied to other devices by using the VIN pin as an output. The VIN voltage feeds into a 100 mA low-dropout (LDO) regulator to provide a regulated 3.3 V or 5 V logic supply called VCC.
  • Page 11 VCCIN and BAT+ at the same time, but we do not recommend connecting multiple power sources when the board is powered through VIN instead of BAT+, as the switching circuit does not prevent current from flowing into or out of VCCIN in that situation. 3. A-Star 328PB Micro pinout and components Page 11 of 25...
  • Page 12: Getting Started

    You should also see the yellow user LED blinking once every two seconds. The default program that we ship on the A-Star 328PB blinks the LED, but this program will be erased when you program the board for the first time, so if your board has been programmed before then you might not see the LED blinking.
  • Page 13 Programmer v2.1 can be configured to operate at either 3.3 V or 5 V, so it is suitable for both 3.3 V and 5 V A-Stars. The VCCIN pin is an alternative power input that you can use to power the A-Star 328PB. Many USB- to-serial adapter cables provide power on this pin, and the Pololu USB AVR Programmer v2.1 can be configured to optionally provide either 3.3 V or 5 V power on this pin.
  • Page 14: Programming Using The Arduino Ide

    Pololu A-Star 328PB User’s Guide © 2001–2018 Pololu Corporation A-Star 328PB Micro connected to the serial pins of a Pololu USB AVR Programmer v2.1. 4.3. Programming using the Arduino IDE The A-Star 328PB ships with a preloaded Arduino- compatible TTL serial bootloader (which uses 0.5 KB of flash memory, leaving 31.5 KB available for the user...
  • Page 15 Pololu A-Star 328PB User’s Guide © 2001–2018 Pololu Corporation 1. Download the Arduino IDE from the Arduino Download page [http://arduino.cc/en/Main/ , install it, and start it. These steps were tested with the Arduino IDE 1.8.5, so we Software] recommend using version 1.8.5 or later.
  • Page 16 8. After the installation finishes, click the “Close” button to close the Boards Manager dialog. 9. In the Tools > Board menu, select the “Pololu A-Star 328PB” entry. If you do not see the A- Star entries in the Board menu, try scrolling the menu with the arrows at the top and bottom, and try restarting the Arduino IDE.
  • Page 17 © 2001–2018 Pololu Corporation Selecting the Pololu A-Star 328PB in the Boards menu. 10. After you select the A-Star 328PB, the Tools > Version menu should appear. In this menu, select the entry that corresponds to your board. 4. Getting Started...
  • Page 18 Pololu A-Star 328PB User’s Guide © 2001–2018 Pololu Corporation Selecting the right version of the A-Star 328PB in the Version menu. 11. In the Tools > Port menu, select the port for your serial adapter. If you are using the Pololu USB AVR Programmer v2, you should select its TTL port.
  • Page 19 Pololu A-Star 328PB User’s Guide © 2001–2018 Pololu Corporation Selecting the Blink example in the Arduino IDE. 13. Press the “Upload” button to compile the sketch and upload it to the device. If everything goes correctly, you will see the message “Done uploading” appear near the bottom of the window.
  • Page 20 14. If you uploaded the Blink sketch, then the yellow LED should be blinking once every two seconds. However, we ship the A-Star 328PB with that same example already programmed onto it, so you might not be convinced that anything has changed. Try changing the delay values in the sketch to something else and uploading again to see if you can change the speed of the LED.
  • Page 21 Section • Look at the A-Star 328PB’s user LED after clicking the upload button. If you see it blink quickly three times and then turn off for at least a second, it most likely means that your serial adapter was able to reset the board and start the bootloader.
  • Page 22: Atmega328Pb Support In The Arduino Ide

    Pro [https://www.pololu.com/product/2191] Mini), existing programs and libraries written for a standard Arduino can be used on the A-Star 328PB without any changes (except to account for clock speed differences when necessary). However, our Arduino IDE add-on includes support for the new features on the ATmega328PB, making them easier to use from the Arduino environment and allowing the A-Star 328PB to be an upgrade from ATmega328P-based boards.
  • Page 23 Programmer command in the Sketch menu. If you want to program the A-Star 328PB with this method, you will not be able to use the default programmers listed under the Tools > Programmer menu, since the software toolchain used with these programmers does not recognize the ATmega328PB.
  • Page 24: The A-Star 328Pb Serial Bootloader

    Pololu A-Star 328PB User’s Guide © 2001–2018 Pololu Corporation 5. The A-Star 328PB Serial Bootloader The A-Star 328PB comes with a TTL serial bootloader that you can use to upload programs to the board, as described in Section 4.3. This section documents some technical details of the bootloader for advanced users who want to better understand how it works, and it describes how to check if the bootloader is present and how to reload the bootloader if it has been overwritten by ISP programming.
  • Page 25 A-Star repository [https://github.com/ bootloaders/optiboot , and you can look in to find our recommended fuse and lock bit values. pololu/a-star] boards.txt 5. The A-Star 328PB Serial Bootloader Page 25 of 25...

Table of Contents