I am trying to run the blinky sketch an ATMEGA328P using 3.3V using internal oscillator at 8MHz. This is to eliminate the need of voltage regulator(s) and high voltage batteries. I will be testing this on an UNO Rev 3 and later implement it on an ATMEGA328PB for PCBs prototype. May think of production too.
Is this even possible? If yes then how?
Can I implement the same if it were for mass production?
Apologies if this sounds similar to topics already existing. I was unable to find tailored advice, signposting too is highly appreciated.
That may be a bit tricky, there is a method described here
other option can be to use a 8MHz crystal and use the settings for the mini or pro-mini , burn the bootloader and use those settings and upload with a USB to TTL.
yes you can, but you will need to add a connection for ICSP pins to the PCB. You will always have to upload the code manually to the MCU, i do not know of a company that will do that for you in manufacturing.
Thanks for pointing this out. Assuming I am able to crack the process, I was planning on using Microchip Programming Services to order pre-programmed microprocessors. Not sure if I can create a program (sketch) with a custom bootloader inside it ? If yes, then I could make it work!
You wouldn't actually need one i think, but that is a different matter.
Easy enough to work out. Write the sketch, export the binary, and upload the binary via the ICSP onto a blank MCU.
Thanks again for your advice. I found some elaboration on what you meant by programming with ICSP and not needing a bootloader as it is intended to program the application memory through serial programming.
Although a pre-programmed chip with everything in it would be ideal, it sounds worth having a ICSP port on the PCB.
I am new to this but I suspect I can change the clock frequency to 8MHz for use at 3.3V in my sketch, and I need to burn the bootloader to adjust the brown out detector (BOD) accordingly. Is that correct? Thanks.
If your code is 100 percent complete and correct and will never need to change and the chips are put into service in a product where it they are unlikely to see the light of day again, let alone be subjected to reprogramming then…
it would be worth to having an ICSP port on the PCB.
You can get away with as little real estate as an area meant to be used with pogo pins. Cost practically zero, small price to pay.
Thanks, that sounds great. I was wondering if I can set the fuses for BOD can be set via ICSP port? I want to do this because I think the typical BOD set at 2.7V would cause issues for use with 2 AA batteries (3V).
This tutorial sets BOD via the Command Prompt application.
I tried setting the fuses after burning the 'Arduino Pro or Pro Mini', '3.3V, 8 MHz' bootloader on my chip but the chip is now throwing me the device signature error. Please see my full explanation here.
I want to find what I did wrong so that I don't repeat this mistake. Thanks in advance.