A-Star 328PB with USB AVR Programmer v2.1 in Arduino IDE - no serial monitor

Having trouble getting A-Star 328PB with Pololu USB AVR Programmer v2.1 working in Arduino 1.8.19 under Win7.
COM14 is the programming port.
COM15 is the TTL serial port.

With ISP cable, Arduino IDE “Port: COM14”, “Tools->Programmer->STK500”, “Sketch->Upload using Programmer” - it works FINE.
I can program and run my own test sketch LED blink program - but there is no serial monitor output. Using Teraterm or Putty at either COM port, nothing is happening.

   Serial.begin(115200); // open the serial port at 115.2K
   Serial.println("* * * * 328PB Test * * * *");

Realized it can’t work because the programmer is emulating the STK500 and the 6-pin ISP cable does not support asynchronous serial, there is no connection to PD0/PD1 as well.

So I changed and instead connected the Pololu USB AVR Programmer v2.1 to the A-Star 328PB TTL serial programming header.

Now I can’t program it and still can’t serial data, regardless of port or settings.
I’m a bit confused how this is supposed to be set up.
Is the A-star 328PB bootloader Arduino IDE compatible and I would use “Sketch->Upload” and to which port?
I’ve tried the permutations and no luck.
Example: Serial TTL Header, “Port: COM14”, “Tools->Programmer->{not relevant?}”, “Sketch->Upload” {not upload using programmer}
Using Port : COM14
Using Programmer : arduino
Overriding Baud Rate : 115200
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xcd

Programmer gives green and two yellow LEDs, “results from last programming: no error”.

I’m stuck here.

Hello.

I am sorry to hear you are having problems programming your A-Star 328PB Micro. Which specific version of that board are you using? Can you double check that you’re selecting the correct version in the Tools drop-down menu of the Arduino IDE?

Please note that if you are using the 3.3V, 8MHz version, you will need to lower your baud rate to something like 57600 bps for the serial data to work properly (the ATmega328PB’s USART cannot accurately use a 115200 bps baud rate when running at 8 MHz).

Brandon

Thank you for you assistance. I have A-Star 328PB 5V 16MHz.
After further experimenting, this is what I find. Connecting the Pololu USB AVR Programmer v2.1 using BOTH ports - ISP and TTL-Serial, I am able to program using the Arduino IDE as STK500 COM14, and use TeraTerm to see serial on COM15. The Arduino Serial Monitor is locked to COM14 and sees nothing.
If I select COM15 (TTL Serial) the Arduino Serial Monitor works but of course I cannot program the board. I get this back:

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

         System wide configuration file is "C:\Users\EM\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

         Using Port                    : COM15
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x2d
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x2d
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x2d
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x2d
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x2d
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x2d
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x2d
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x2d
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x2d
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x2d
avrdude done.  Thank you.
An error occurred while uploading the sketch

So I cannot program the 328PB via the TTL Serial within the Arduino IDE, or maybe any method.

If you successfully programmed it over the ISP interface, then the serial bootloader that the board comes shipped with has been wiped out. Could you try following the instructions under the “Burning the bootloader” heading of “The A-Star 328PB Serial Bootloader” section of the A-Star 328PB user’s guide, before trying to program it through serial again?

Brandon

Pressing the RESET button on the 328PB gave no yellow LED flashes- which the bootloader normally does.
So I reprogrammed the bootloader using AVRISPMKII I have with AVRDUDE and it now works in the Arduino IDE- serial programming, Serial Monitor as well :slight_smile:

I would ask you mention this issue in 4.4 “Upload Using Programmer” that it scuttles the bootloader.
Note the 328PB has additional Lock Bits that can protect a bootloader from self-overwrite, might be worth digging into someday and utiilizing.

I had great difficulty verifying/finding the fuse settings. 328PB: hfuse 0xDE, lfuse 0xFF, efuse 0xF4
You seem to have Boards.txt located C:\Users\EM\AppData\Local\Arduino15\packages\pololu-a-star\hardware\avr\5.1.0 but there’s (old) one at C:\Program Files (x86)\Arduino\hardware\arduino\avr
So 5. last sentence could point to where boards.text is actually located, which one it is.
Could you please add fuse settings in the repo README.MD I think it should be there.