Thursday, September 4, 2014

CHEAP STANDALONE ARDUINO #14

This tutorial shows how to use arduino or atmega 328 IC with very least external peripheral or no peripheral at all. You just need to supply the 5 volts to it and its running the program in it.
First components required are
a) ATMEGA 328P
b) AVR programmer (any may be arduino as isp )

First plug the ATMEGA on breadboard.


Connect the MOSI,MISO,CLK and RESET pin of the ISP to the MOSI(17),MISO(18),CLK(19) and RST(1) of the chip on board.  And supply the voltage to pins 7 8 and 22.
I am using MEGA as ISP so CLK(52) goes to 19 pin, MOSI (50) goes to MISO(18) , MISO(51) goes to MOSI(17) and RST (53) goes to RST(1) of the chip on board .

After go to C:\arduinoxxxx\hardware\arduino\avr\boards.txt 
and open it using some editing software like notepad, wordpad or notepad++ then append these lines at the end
##############################################################

atmega328bb.name=ATmega328 on a breadboard (8 MHz internal clock)

atmega328bb.upload.protocol=arduino
atmega328bb.upload.maximum_size=30720
atmega328bb.upload.speed=19200
atmega328bb.upload.tool=avrdude

atmega328bb.bootloader.tool=avrdude
atmega328bb.bootloader.low_fuses=0xE2
atmega328bb.bootloader.high_fuses=0xDA
atmega328bb.bootloader.extended_fuses=0x05
atmega328bb.bootloader.file=atmega/ATmegaBOOT_168_atmega328_pro_8MHz.hex
atmega328bb.bootloader.unlock_bits=0x3F
atmega328bb.bootloader.lock_bits=0x0F

atmega328bb.build.mcu=atmega328p
atmega328bb.build.f_cpu=8000000L
atmega328bb.build.core=arduino
atmega328bb.build.variant=standard


Now plug in the avr isp programmer and open arduino environment. Now a new line will be available 


Choose the ATmega328 on breadboard(8Mhz internal clock). 
Now again browse to "C:\arduino-xxx\hardware\arduino\avr\bootloaders\atmega"
Open the folder and paste this hex file in it.https://drive.google.com/file/d/0Bx0yz8JxaXcAU3pra0o5eTZMY1k/edit?usp=sharing

Now plugging the isp burner and choose the correct programmer in programmer menu.
Then hit burn bootloader. This may take a while and can see the conformation message "bootloader upload successful" in the arduino screen. 
Then we are done. Now just give your controller the juice it need and its ready to go. Its running on 8MHz internal crystal and also no reset pull up is required.Its better to give decoupling in power in better practice.






1 comment: