Pololu Robotics & Electronics
Menu
My account Comments or questions? About Pololu Contact Ordering information Distributors

Pololu Forum

Error Programming A-Star 328PB Micro

I’m using Sparkfun’s AVR Programmer to program my new A-Star 328PB Micro using the Arduino IDE. I got the board into the IDE by following the instructions, but after selecting the right board and setting the Programmer to “USBtinyISP” and going Sketch>Upload using Programmer I get an error saying “the selected serial port does not exist or your board is not connected”. I know it’s hooked up right as the onboard LED is blinking with the standard 'Blink; program each chip ships with. I don’t see anything under “Port” in the IDE, but I’m given to understand that isn’t needed. I’m on a Macbook Pro (15", 2018) Max OS Mojave (v10.14.5).

Arduino: 1.8.9 (Mac OS X), Board: "Pololu A-Star 328PB, 5V, 16MHz"

/Applications/Arduino.app/Contents/Java/arduino-builder -dump-prefs -logger=machine -hardware /Applications/Arduino.app/Contents/Java/hardware -hardware /Users/rwaddell/Library/Arduino15/packages -tools /Applications/Arduino.app/Contents/Java/tools-builder -tools /Applications/Arduino.app/Contents/Java/hardware/tools/avr -tools /Users/rwaddell/Library/Arduino15/packages -built-in-libraries /Applications/Arduino.app/Contents/Java/libraries -libraries /Users/rwaddell/Dropbox/Arduino Projects/libraries -fqbn=pololu-a-star:avr:a-star328PB:version=16mhz -ide-version=10809 -build-path /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_29774 -warnings=none -build-cache /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_cache_601182 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.arduinoOTA-1.2.1.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.avrdude.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.avrdude-6.3.0-arduino14.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.avr-gcc.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.avr-gcc-5.4.0-atmel3.6.1-arduino2.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -verbose /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_modified_sketch_806/Blink.ino
/Applications/Arduino.app/Contents/Java/arduino-builder -compile -logger=machine -hardware /Applications/Arduino.app/Contents/Java/hardware -hardware /Users/rwaddell/Library/Arduino15/packages -tools /Applications/Arduino.app/Contents/Java/tools-builder -tools /Applications/Arduino.app/Contents/Java/hardware/tools/avr -tools /Users/rwaddell/Library/Arduino15/packages -built-in-libraries /Applications/Arduino.app/Contents/Java/libraries -libraries /Users/rwaddell/Dropbox/Arduino Projects/libraries -fqbn=pololu-a-star:avr:a-star328PB:version=16mhz -ide-version=10809 -build-path /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_29774 -warnings=none -build-cache /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_cache_601182 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.arduinoOTA-1.2.1.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.avrdude.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.avrdude-6.3.0-arduino14.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.avr-gcc.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.avr-gcc-5.4.0-atmel3.6.1-arduino2.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -verbose /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_modified_sketch_806/Blink.ino
Using board 'a-star328PB' from platform in folder: /Users/rwaddell/Library/Arduino15/packages/pololu-a-star/hardware/avr/4.0.2
Using core 'arduino' from platform in folder: /Applications/Arduino.app/Contents/Java/hardware/arduino/avr
Detecting libraries used...
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10809 -DARDUINO_AVR_A_STAR_328PB -DARDUINO_ARCH_AVR -include /Users/rwaddell/Library/Arduino15/packages/pololu-a-star/hardware/avr/4.0.2/variants/a-star328pb/io_328pb.h -I/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino -I/Users/rwaddell/Library/Arduino15/packages/pololu-a-star/hardware/avr/4.0.2/variants/a-star328pb /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_29774/sketch/Blink.ino.cpp -o /dev/null
Generating function prototypes...
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10809 -DARDUINO_AVR_A_STAR_328PB -DARDUINO_ARCH_AVR -include /Users/rwaddell/Library/Arduino15/packages/pololu-a-star/hardware/avr/4.0.2/variants/a-star328pb/io_328pb.h -I/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino -I/Users/rwaddell/Library/Arduino15/packages/pololu-a-star/hardware/avr/4.0.2/variants/a-star328pb /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_29774/sketch/Blink.ino.cpp -o /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_29774/preproc/ctags_target_for_gcc_minus_e.cpp
/Applications/Arduino.app/Contents/Java/tools-builder/ctags/5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_29774/preproc/ctags_target_for_gcc_minus_e.cpp
Compiling sketch...
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10809 -DARDUINO_AVR_A_STAR_328PB -DARDUINO_ARCH_AVR -include /Users/rwaddell/Library/Arduino15/packages/pololu-a-star/hardware/avr/4.0.2/variants/a-star328pb/io_328pb.h -I/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino -I/Users/rwaddell/Library/Arduino15/packages/pololu-a-star/hardware/avr/4.0.2/variants/a-star328pb /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_29774/sketch/Blink.ino.cpp -o /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_29774/sketch/Blink.ino.cpp.o
Compiling libraries...
Compiling core...
Using previously compiled file: /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_29774/core/new_vectors_328pb.cpp.o
Using precompiled core: /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_cache_601182/core/core_pololu-a-star_avr_a-star328PB_version_16mhz_51f02b7210b938436b779d1c032618e1.a
Linking everything together...
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-gcc -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_29774/Blink.ino.elf /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_29774/sketch/Blink.ino.cpp.o /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_29774/core/new_vectors_328pb.cpp.o /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_29774/../arduino_cache_601182/core/core_pololu-a-star_avr_a-star328PB_version_16mhz_51f02b7210b938436b779d1c032618e1.a -L/var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_29774 -lm
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-objcopy -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_29774/Blink.ino.elf /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_29774/Blink.ino.eep
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-objcopy -O ihex -R .eeprom /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_29774/Blink.ino.elf /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_29774/Blink.ino.hex
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-size -A /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_29774/Blink.ino.elf
Sketch uses 1180 bytes (3%) of program storage space. Maximum is 32256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude -C/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf -v -patmega328p -cusbtiny -Uflash:w:/var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_29774/Blink.ino.hex:i 

avrdude: Version 6.3-20171130
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf"
         User configuration file is "/Users/rwaddell/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : usb
         Using Programmer              : usbtiny
avrdude: Error: Could not find USBtiny device (0x1781/0xc9f)

avrdude done.  Thank you.

the selected serial port 
 does not exist or your board is not connected

Hello.

The error message you are getting indicates that the Arduino IDE cannot connect to your AVR programmer. We are not really familiar with Sparkfun’s Pocket AVR Programmer, so you might try contacting Sparkfun directly for further assistance.

It sounds like you might be using your AVR programmer to supply power to the A-Star 328PB board while programming it. If that is the case, can you try powering the A-Star 328PB separately and see if that changes anything?

- Amanda

I’m able to program it successfully directly through the Arduino IDE if I use the TTL serial programming header (selecting the appropriate port, board + AVRISP mkII in the IDE).

If I leave the TTL serial programming header connected (so the board has power) and then try Sparkfun’s AVR Programmer (appropriate board + USBtinyISP + Sketch > Upload using Programmer) I now get this error:

Arduino: 1.8.9 (Mac OS X), Board: “Pololu A-Star 328PB, 5V, 16MHz”

/Applications/Arduino.app/Contents/Java/arduino-builder -dump-prefs -logger=machine -hardware /Applications/Arduino.app/Contents/Java/hardware -hardware /Users/rwaddell/Library/Arduino15/packages -tools /Applications/Arduino.app/Contents/Java/tools-builder -tools /Applications/Arduino.app/Contents/Java/hardware/tools/avr -tools /Users/rwaddell/Library/Arduino15/packages -built-in-libraries /Applications/Arduino.app/Contents/Java/libraries -libraries /Users/rwaddell/Dropbox/Arduino Projects/libraries -fqbn=pololu-a-star:avr:a-star328PB:version=16mhz -vid-pid=0403_6001 -ide-version=10809 -build-path /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_749521 -warnings=none -build-cache /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_cache_40763 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.avrdude-6.3.0-arduino14.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.avr-gcc.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.avr-gcc-5.4.0-atmel3.6.1-arduino2.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.arduinoOTA.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.arduinoOTA-1.2.1.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -verbose /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_modified_sketch_355480/Blink.ino
/Applications/Arduino.app/Contents/Java/arduino-builder -compile -logger=machine -hardware /Applications/Arduino.app/Contents/Java/hardware -hardware /Users/rwaddell/Library/Arduino15/packages -tools /Applications/Arduino.app/Contents/Java/tools-builder -tools /Applications/Arduino.app/Contents/Java/hardware/tools/avr -tools /Users/rwaddell/Library/Arduino15/packages -built-in-libraries /Applications/Arduino.app/Contents/Java/libraries -libraries /Users/rwaddell/Dropbox/Arduino Projects/libraries -fqbn=pololu-a-star:avr:a-star328PB:version=16mhz -vid-pid=0403_6001 -ide-version=10809 -build-path /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_749521 -warnings=none -build-cache /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_cache_40763 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.avrdude-6.3.0-arduino14.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.avr-gcc.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.avr-gcc-5.4.0-atmel3.6.1-arduino2.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.arduinoOTA.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.arduinoOTA-1.2.1.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -verbose /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_modified_sketch_355480/Blink.ino
Using board ‘a-star328PB’ from platform in folder: /Users/rwaddell/Library/Arduino15/packages/pololu-a-star/hardware/avr/4.0.2
Using core ‘arduino’ from platform in folder: /Applications/Arduino.app/Contents/Java/hardware/arduino/avr
Detecting libraries used…
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10809 -DARDUINO_AVR_A_STAR_328PB -DARDUINO_ARCH_AVR -include /Users/rwaddell/Library/Arduino15/packages/pololu-a-star/hardware/avr/4.0.2/variants/a-star328pb/io_328pb.h -I/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino -I/Users/rwaddell/Library/Arduino15/packages/pololu-a-star/hardware/avr/4.0.2/variants/a-star328pb /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_749521/sketch/Blink.ino.cpp -o /dev/null
Generating function prototypes…
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10809 -DARDUINO_AVR_A_STAR_328PB -DARDUINO_ARCH_AVR -include /Users/rwaddell/Library/Arduino15/packages/pololu-a-star/hardware/avr/4.0.2/variants/a-star328pb/io_328pb.h -I/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino -I/Users/rwaddell/Library/Arduino15/packages/pololu-a-star/hardware/avr/4.0.2/variants/a-star328pb /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_749521/sketch/Blink.ino.cpp -o /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_749521/preproc/ctags_target_for_gcc_minus_e.cpp
/Applications/Arduino.app/Contents/Java/tools-builder/ctags/5.8-arduino11/ctags -u --language-force=c++ -f - --c+±kinds=svpf --fields=KSTtzns --line-directives /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_749521/preproc/ctags_target_for_gcc_minus_e.cpp
Compiling sketch…
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10809 -DARDUINO_AVR_A_STAR_328PB -DARDUINO_ARCH_AVR -include /Users/rwaddell/Library/Arduino15/packages/pololu-a-star/hardware/avr/4.0.2/variants/a-star328pb/io_328pb.h -I/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino -I/Users/rwaddell/Library/Arduino15/packages/pololu-a-star/hardware/avr/4.0.2/variants/a-star328pb /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_749521/sketch/Blink.ino.cpp -o /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_749521/sketch/Blink.ino.cpp.o
Compiling libraries…
Compiling core…
Using previously compiled file: /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_749521/core/new_vectors_328pb.cpp.o
Using precompiled core: /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_cache_40763/core/core_pololu-a-star_avr_a-star328PB_version_16mhz_51f02b7210b938436b779d1c032618e1.a
Linking everything together…
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-gcc -w -Os -g -flto -fuse-linker-plugin -Wl,–gc-sections -mmcu=atmega328p -o /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_749521/Blink.ino.elf /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_749521/sketch/Blink.ino.cpp.o /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_749521/core/new_vectors_328pb.cpp.o /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_749521/…/arduino_cache_40763/core/core_pololu-a-star_avr_a-star328PB_version_16mhz_51f02b7210b938436b779d1c032618e1.a -L/var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_749521 -lm
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-objcopy -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_749521/Blink.ino.elf /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_749521/Blink.ino.eep
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-objcopy -O ihex -R .eeprom /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_749521/Blink.ino.elf /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_749521/Blink.ino.hex
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-size -A /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_749521/Blink.ino.elf
Sketch uses 1158 bytes (3%) of program storage space. Maximum is 32256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude -C/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf -v -patmega328p -cusbtiny -Uflash:w:/var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_749521/Blink.ino.hex:i

avrdude: Version 6.3-20171130
Copyright © 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright © 2007-2014 Joerg Wunsch

     System wide configuration file is "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf"
     User configuration file is "/Users/rwaddell/.avrduderc"
     User configuration file does not exist or is not a regular file, skipping

     Using Port                    : usb
     Using Programmer              : usbtiny

avrdude: usbdev_open(): Found USBtinyISP, bus:device: 020:014
AVR Part : ATmega328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :

                              Block Poll               Page                       Polled
       Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
       ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
       eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
       flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
       lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
       hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
       efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
       lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
       calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
       signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

     Programmer Type : USBtiny
     Description     : USBtiny simple USB programmer, https://learn.adafruit.com/usbtinyisp

avrdude: programmer operation not supported

avrdude: Using SCK period of 10 usec
avrdude: AVR device initialized and ready to accept instructions

An error occurred while uploading the sketch
Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9516 (probably m328pb)
avrdude: Expected signature for ATmega328P is 1E 95 0F
Double check chip, or use -F to override this check.

avrdude done. Thank you.

Same thing If I disconnect the TTL serial programming header and switch on power to the A-Star via the AVR Programmer.

I just noticed the AVRDUDE command in your build output is configured for programming an ATmega328P, not an ATmega328PB. If you do not already know, you cannot use any of the default programmers listed under the Tools > Programmer menu of the Arduino IDE to program the A-Star 328PB, since the software toolchain used with these programmers do not recognize the ATmega328PB. This is stated under the “Upload Using Programmer” part of the “ATmega328PB support in the Arduino IDE” section of the A-Star 328PB User’s Guide.

Someone on the forum had a similar issue with trying to program the A-Star 328PB using an AVRISP mkII programmer; you can follow our instructions here. For you, the correct programmers.txt file to edit would be in /Users/rwaddell/Library/Arduino15/packages/pololu-a-star/hardware/avr/4.0.2/, and you should add the following lines to that file:

usbtinyispfor328PB.name=USBtinyIsp for 328PB
usbtinyispfor328PB.communication=usb
usbtinyispfor328PB.protocol=usbtiny
usbtinyispfor328PB.program.protocol=usbtiny
usbtinyispfor328PB.program.tool=avrdudecustom
usbtinyispfor328PB.program.extra_params=

- Amanda

I followed your instructions (and restarted the Arduino IDE) but still get an error:

Arduino: 1.8.9 (Mac OS X), Board: “Pololu A-Star 328PB, 5V, 16MHz”

/Applications/Arduino.app/Contents/Java/arduino-builder -dump-prefs -logger=machine -hardware /Applications/Arduino.app/Contents/Java/hardware -hardware /Users/rwaddell/Library/Arduino15/packages -tools /Applications/Arduino.app/Contents/Java/tools-builder -tools /Applications/Arduino.app/Contents/Java/hardware/tools/avr -tools /Users/rwaddell/Library/Arduino15/packages -built-in-libraries /Applications/Arduino.app/Contents/Java/libraries -libraries /Users/rwaddell/Dropbox/Arduino Projects/libraries -fqbn=pololu-a-star:avr:a-star328PB:version=16mhz -ide-version=10809 -build-path /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_530139 -warnings=none -build-cache /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_cache_773163 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.avrdude-6.3.0-arduino14.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.avr-gcc.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.avr-gcc-5.4.0-atmel3.6.1-arduino2.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.arduinoOTA.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.arduinoOTA-1.2.1.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -verbose /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_modified_sketch_704903/Blink.ino
/Applications/Arduino.app/Contents/Java/arduino-builder -compile -logger=machine -hardware /Applications/Arduino.app/Contents/Java/hardware -hardware /Users/rwaddell/Library/Arduino15/packages -tools /Applications/Arduino.app/Contents/Java/tools-builder -tools /Applications/Arduino.app/Contents/Java/hardware/tools/avr -tools /Users/rwaddell/Library/Arduino15/packages -built-in-libraries /Applications/Arduino.app/Contents/Java/libraries -libraries /Users/rwaddell/Dropbox/Arduino Projects/libraries -fqbn=pololu-a-star:avr:a-star328PB:version=16mhz -ide-version=10809 -build-path /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_530139 -warnings=none -build-cache /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_cache_773163 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.avrdude-6.3.0-arduino14.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.avr-gcc.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.avr-gcc-5.4.0-atmel3.6.1-arduino2.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.arduinoOTA.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.arduinoOTA-1.2.1.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -verbose /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_modified_sketch_704903/Blink.ino
Using board ‘a-star328PB’ from platform in folder: /Users/rwaddell/Library/Arduino15/packages/pololu-a-star/hardware/avr/4.0.2
Using core ‘arduino’ from platform in folder: /Applications/Arduino.app/Contents/Java/hardware/arduino/avr
Detecting libraries used…
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10809 -DARDUINO_AVR_A_STAR_328PB -DARDUINO_ARCH_AVR -include /Users/rwaddell/Library/Arduino15/packages/pololu-a-star/hardware/avr/4.0.2/variants/a-star328pb/io_328pb.h -I/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino -I/Users/rwaddell/Library/Arduino15/packages/pololu-a-star/hardware/avr/4.0.2/variants/a-star328pb /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_530139/sketch/Blink.ino.cpp -o /dev/null
Generating function prototypes…
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10809 -DARDUINO_AVR_A_STAR_328PB -DARDUINO_ARCH_AVR -include /Users/rwaddell/Library/Arduino15/packages/pololu-a-star/hardware/avr/4.0.2/variants/a-star328pb/io_328pb.h -I/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino -I/Users/rwaddell/Library/Arduino15/packages/pololu-a-star/hardware/avr/4.0.2/variants/a-star328pb /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_530139/sketch/Blink.ino.cpp -o /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_530139/preproc/ctags_target_for_gcc_minus_e.cpp
/Applications/Arduino.app/Contents/Java/tools-builder/ctags/5.8-arduino11/ctags -u --language-force=c++ -f - --c+±kinds=svpf --fields=KSTtzns --line-directives /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_530139/preproc/ctags_target_for_gcc_minus_e.cpp
Compiling sketch…
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10809 -DARDUINO_AVR_A_STAR_328PB -DARDUINO_ARCH_AVR -include /Users/rwaddell/Library/Arduino15/packages/pololu-a-star/hardware/avr/4.0.2/variants/a-star328pb/io_328pb.h -I/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino -I/Users/rwaddell/Library/Arduino15/packages/pololu-a-star/hardware/avr/4.0.2/variants/a-star328pb /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_530139/sketch/Blink.ino.cpp -o /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_530139/sketch/Blink.ino.cpp.o
Compiling libraries…
Compiling core…
Using previously compiled file: /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_530139/core/new_vectors_328pb.cpp.o
Using precompiled core: /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_cache_773163/core/core_pololu-a-star_avr_a-star328PB_version_16mhz_51f02b7210b938436b779d1c032618e1.a
Linking everything together…
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-gcc -w -Os -g -flto -fuse-linker-plugin -Wl,–gc-sections -mmcu=atmega328p -o /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_530139/Blink.ino.elf /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_530139/sketch/Blink.ino.cpp.o /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_530139/core/new_vectors_328pb.cpp.o /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_530139/…/arduino_cache_773163/core/core_pololu-a-star_avr_a-star328PB_version_16mhz_51f02b7210b938436b779d1c032618e1.a -L/var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_530139 -lm
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-objcopy -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_530139/Blink.ino.elf /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_530139/Blink.ino.eep
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-objcopy -O ihex -R .eeprom /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_530139/Blink.ino.elf /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_530139/Blink.ino.hex
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-size -A /var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_530139/Blink.ino.elf
Sketch uses 1180 bytes (3%) of program storage space. Maximum is 32256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude -C/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf -v -patmega328p -cusbtiny -Uflash:w:/var/folders/nb/2356s9gj6y714v9fzf4hck080000gn/T/arduino_build_530139/Blink.ino.hex:i

avrdude: Version 6.3-20171130
Copyright © 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright © 2007-2014 Joerg Wunsch

     System wide configuration file is "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf"
     User configuration file is "/Users/rwaddell/.avrduderc"
     User configuration file does not exist or is not a regular file, skipping

     Using Port                    : usb
     Using Programmer              : usbtiny

avrdude: usbdev_open(): Found USBtinyISP, bus:device: 020:004
AVR Part : ATmega328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :

                              Block Poll               Page                       Polled
       Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
       ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
       eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
       flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
       lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
       hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
       efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
       lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
       calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
       signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

     Programmer Type : USBtiny
     Description     : USBtiny simple USB programmer, https://learn.adafruit.com/usbtinyisp

avrdude: programmer operation not supported

avrdude: Using SCK period of 10 usec
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x000000 (retrying)

An error occurred while uploading the sketch
Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.

avrdude done. Thank you.

Do I need to add “-P{serial.port}” to the last line of your text?

No; you do not need to add -P{serial.port} to usbtinyispfor328PB.program.extra_params= since your programmer does not require a serial port to be specified.

It looks like your AVRDUDE command is still configured to program the ATmega328P. You should double-check that you added and saved the changes to the correct programmers.txt file, close all IDE windows to restart the Arduino IDE, and select the new “USBtinyIsp for 328PB” entry in the Programmers menu before attempting to upload a sketch.

- Amanda

Genius! I missed seeing the part where I needed to choose the newly listed programmer, but now it works!

Of course, programming the chip this way overwrites the bootloader, which means until you re-load it you can’t re-program the board. Unfortunately, I can’t burn the bootloader as I get this error:

Arduino: 1.8.9 (Mac OS X), Board: “Pololu A-Star 328PB, 5V, 16MHz”

/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude -C/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf -C+/Users/rwaddell/Library/Arduino15/packages/pololu-a-star/hardware/avr/4.0.2/extra_avrdude.conf -v -patmega328pb -cusbtiny -B 5 -e -Ulock:w:0xFF:m -Uefuse:w:0xF4:m -Uhfuse:w:0xDE:m -Ulfuse:w:0xFF:m

avrdude: Version 6.3-20171130
Copyright © 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright © 2007-2014 Joerg Wunsch

     System wide configuration file is "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf"
     User configuration file is "/Users/rwaddell/.avrduderc"
     User configuration file does not exist or is not a regular file, skipping
     Additional configuration file is "/Users/rwaddell/Library/Arduino15/packages/pololu-a-star/hardware/avr/4.0.2/extra_avrdude.conf"

avrdude: warning at /Users/rwaddell/Library/Arduino15/packages/pololu-a-star/hardware/avr/4.0.2/extra_avrdude.conf:1: part m328pb overwrites previous definition /Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf:8597.

     Using Port                    : usb
     Using Programmer              : usbtiny
     Setting bit clk period        : 5.0

avrdude: usbdev_open(): Found USBtinyISP, bus:device: 020:005
AVR Part : ATmega328PB
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :

                              Block Poll               Page                       Polled
       Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
       ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
       eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
       flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
       lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
       hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
       efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
       lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
       calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
       signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

     Programmer Type : USBtiny
     Description     : USBtiny simple USB programmer, https://learn.adafruit.com/usbtinyisp

avrdude: programmer operation not supported

avrdude: Setting SCK period to 5 usec
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x000000 (retrying)

Error while burning bootloader.
Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.

avrdude done. Thank you.

If I use the reset button on the board then I am able to upload new code as needed (Sketch > Upload using Programmer, reset, Sketch > Upload using Programmer, repeat).

Also, using the reset button I can burn the bootloader although I see this message:

avrdude: verifying …
avrdude: WARNING: invalid value for unused bits in fuse “lock”, should be set to 1 according to datasheet
This behaviour is deprecated and will result in an error in future version
You probably want to use 0x0f instead of 0xcf (double check with your datasheet first).
avrdude: 1 bytes of lock verified

So, I think I’m unblocked. Everything works as long as I remember the reset button.

Thanks for all your help, Amanda!