I can't get any code on the A Star 328PB 5V 16MHz

Alright, so i have actually gone around this forum trying see if any of the existent topics can help but to no avail.

I have followed the getting started guide all the way until I arrived at running the simple blink code but I get errors.

Just a heads up that the I configured the AVR programmer v2 to 5V before connecting it to the 328PB.
On the programmer, the green led is solid and the red and both yellow leds are blinking sequentially which i believe is a good sign but only the power(blue led) is lit on the 328PB
so… guess my board hasn’t arrived preprogrammed with the blink code but that’s perfect.

Alright, I have 2 ports that shows up when my programmer is connected.
I tried playing around with both of them but to a total dead end.
It looks like the programmer doesn’t recognize the board or… something’s wrong with the programmer ???

I proceeded to guideline at 5. The A-Star 328PB Serial Bootloader.
I tried verifying if the bootloader is present but i guess not, there was no life coming from the board except its solid blue led
As a last resort, I tried loading the bootloader which if I’m correct, I should only use the ISP 6-pins TTL headers on both devices but there was no life from the 328PB, not even the blue led.

I want to know what’s going on ??

Hello.

It looks like you actually are using the Pololu USB AVR Programmer v2.1, not the Pololu USB AVR Programmer v2.

You mentioned you tried verifying that the bootloader is present on your A-Star 328PB. If the bootloader is present, you should see the yellow user LED blink quickly three times after pressing the reset button on the A-Star. Are you saying none of the LEDs turn on after pressing the reset button? Can you try again and confirm?

The red LED indicates an error; the LEDs’ behavior indicate that the programmer’s regulator mode is set to 5V, but the power on the target’s VCC line is not within the acceptable range. You can find this information under the “LED feedback” section of the Pololu USB AVR Programmer v2 User’s Guide. Can you measure the A-Star’s VCC line with a multimeter so that we can verify the A-Star is getting sufficient power and is not browning out?

- Amanda

Hi Amanda,
Thanks for the reply, highly appreciated.
Ok, so I have tried what you suggested and guess what ?
The 328PB is actually working fine.
I powered it up using using only 5V applied to Vcc and Gnd
and the yellow led lit up and started to blink. I pressed the reset button and it blinked 3 times, rapidly.

I then removed the 5V and reconnected the programmer the Pololu USB AVR Programmer v2.1 then measured the voltage at Vcc and it showed roughly 2.9V.
It stayed below 3V

I measured the voltage coming from the Pololu USB AVR Programmer v2.1 directly
and i also got 2.9V thus Am i using the wrong programmer ?
Should i have purchased the Pololu USB AVR Programmer v2 instead ?? :worried:

With the AVR Programmer v2.1 plugged directly into your computer, can you run the programmer’s configuration utility, set the VCC output to 5V (if you have not done so already), and click the “Apply Settings” button to see if that changes anything? If not can you post a screen shot of the configuration utility window?

- Amanda

Hi miss Amanda S,
issue resolved.
After I have taking the time to verify the various options in the pololu programmer app which i assume would be the configuration utility, I noticed the VCC output was set to disabled then i thought this might the cause of all the problem and indeed it was.

Thank you for your help.
three questions, please…

  1. I noticed that on the schematics of the 328P 5V 16MHz there are no pull-up resistors on i2c pins
    Is this correct ? because that’s one of the reasons why i purchased it.
    I wanted a uController that i could add pull-ups resistors myself.

  2. After every successful code upload, i get this message:

avrdude: warning at /Users/woot/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.

I believe it’s nothing serious and it’s totally fine right ??

  1. Resonators or crystal clocks which is better and precise ?

Thanks again,
warm regards
Evan

I’m glad to hear the issue is resolved; thanks for letting us know.

Yes, you are correct; there are no external pull-up resistors on the I2C lines on the A-Star 328PB boards, and the warning you are seeing from AVRDUDE is harmless. You can find more details in this post.

As for your last question, in general crystals are usually more precise than ceramic resonators. Are you asking about specific products of ours?

- Amanda

Well not necessarily but suppose, say, I required a 16MHz “crystal” clock for this atmel 328P uController, anything crystal you’d recommend ??

Thanks,
Evan

We don’t have any specific recommendations, but if you have a high-volume application, we might be able to make a customized version for you. Please contact us via email to discuss a custom version if this is the case.

- Amanda