-
I have a arduino nano board & made a small project on it. Its running succesfully.
-
Now i want to go to program 100 more MCU and make own board which is customized and has MCU on it?
-
How can i program MCU alone on my customized board. I dont need any FTDI ic or usb port on my board.
-
Also I dont need external crystal? How I can do change in arduino programming so that Atmega uses its internal oscillator only.
- 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).
- 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).
328P in SMD package are programmable ahead of time, just need a socket like this
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.
Vindhyachal_Takniki:
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:
- Install MiniCore: GitHub - MCUdude/MiniCore: Arduino hardware package for ATmega8, ATmega48, ATmega88, ATmega168, ATmega328 and ATmega328PB
- Tools > Board > ATmega328. This assumes you have an ATmega328P on the Nano. If it's an ATmega168, then select that board instead.
- Tools > Clock > 8 MHz Internal
- Connect an ISP programmer to your ATmega328P. If you don't own an ISP programmer, you can use a spare Arduino board as an "Arduino as ISP: https://www.arduino.cc/en/Tutorial/ArduinoISP
- Tools > Programmer > select the appropriate programmer
- Tools > Burn Bootloader
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.
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.
this will try & see :https://www.arduino.cc/en/Tutorial/ArduinoToBreadboard