Go Down

Topic: Going to production, make Nano -atmega328p program, how to do it? (Read 181 times) previous topic - next topic

Vindhyachal_Takniki

1. I have a arduino nano board & made a small project on it. Its running succesfully.
2. Now i want to go to program 100 more MCU and make own board which is customized and has MCU on it?
3. How can i program MCU alone on my customized board. I dont need any FTDI ic or usb port on my board.

4. Also I dont need external crystal? How I can do change in arduino programming so that Atmega uses its internal oscillator only.

pylon

Quote
3. How can i program MCU alone on my customized board. I dont need any FTDI ic or usb port on my board.
Usually by providing an ICSP port on the board or pre-programming the CPU before soldering (not feasible for a micro series as your's).

Quote
4. Also I dont need external crystal? How I can do change in arduino programming so that Atmega uses its internal oscillator only.
You might have to add a custom board to the IDE configuration. But you have to calculate the fuses correctly for that. Is the internal oscillator precise enough for your task? Also keep in mind that the internal oscillator runs only up to 8MHz at maximum (so half the speed of a standard Arduino).

CrossRoads

328P in SMD package are programmable ahead of time, just need a socket like this
https://www.mouser.com/ProductDetail/Microchip-Technology-Atmel/ATSTK600-RC72?qs=TZi4OKKi7fXRjksKi0WOaQ%3D%3D&gclid=EAIaIQobChMI25LutuKT4QIVyI-zCh0LfQrIEAQYASABEgIq__D_BwE

No doubt a place like Digikey.com has these built up as a programming adapter and can pre-program them for you.
Better method is to have the ICSP pins accessible on the board somewhere so you can program and/or reprogram after assembly.

If you had one of these, you could also program on board. You hold this down on top of the chip, it has 6 little spring-pins that contact power, gnd, reset, sck, miso, mosi. The other end connects to the cable from your programmer.  I wired up a little 10-pin to 6-pin adapter.
https://hobbyking.com/en_us/atmel-atmega-socket-firmware-flashing-tool.html

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

pert

4. Also I dont need external crystal? How I can do change in arduino programming so that Atmega uses its internal oscillator only.
For development work, you'll want to add a board definition to the Arduino IDE for the internal oscillator:


In addition to burning the bootloader, Burn Bootloader sets the configuration fuses on the microcontroller, which is necessary to change the clock source.

After doing this, remember to always use the board with the Tools > Board > ATmega328 and Tools > Clock > 8 MHz Internal. You will no longer be able to use the board with Tools > Board > Arduino Nano selected.

Once you get to production of your 100 units, you will want to stop using the Arduino IDE and instead use the avrdude tool used by the Arduino IDE for Burn Bootloader and uploads. That ways you can set the configuration fuses and upload the pre-compiled firmware all in a single command, which is much faster and more efficient than using the Arduino IDE. We can provide assistance with that process as well if you need it.

freaklabs

You can also define your own board in the boards.txt file. You also need to fill out the fuse settings according to your configuration. If you're okay with not fully exact timing, then you can use the internal RC oscillator to run the Arduino. It also runs at 8MHz so if you want to run at 16 Mhz, you will need an external crystal.

Regarding production programming, if its for 100, you can still program them by hand using a cheap ICSP programmer like the USBASP. They are quite fast. If you want full production or if you are doing batches of 100 and its taking too long to program, then you can get a batch IC programmer or a socketed programmer and pre-program the chips. But for production, since you will still need to do production test on your test rig, manufacturers usually program the IC while on the test rig and with the test program. That way, you add the bootloader and you can immediately jump into the test.
FreakLabs
Wireless Technology for the environment, wildlife, and agriculture
https://freaklabs.org
https://hackerfarm.jp
Twitter: @freaklabs

Vindhyachal_Takniki

this will try & see :https://www.arduino.cc/en/Tutorial/ArduinoToBreadboard

Go Up