Using Arduino boards for electronic circuits are easier to implement, but is very much costlier. Also any damage to the board will result in high economic loss. To avoid this, after uploading the programme, we will seperate the ATmega microcontroller from the Arduino board and then will put on the circuit. While putting the ATmega microcontroller programmed using arduino on another circuit, some facts have to be noted.
1. A Crystal Oscillator of 16 MHz should be connected across the XTAL1 and XTAL2 of the microcontroller.
2. Constant 5V power supply from 7805 Regulator IC.
Step 1. Upload the below given program to blink an LED to the microcontroller using Arduino Board.
int led = 13;
void setup() {
pinMode(led, OUTPUT);
}
void loop() {
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
Step 2.
Create a circuit as shown in the figure given below. When the power supply is given, LED will start blinking.
ATmega168 / 328 pin mapping can be obtained from the following image.
1. A Crystal Oscillator of 16 MHz should be connected across the XTAL1 and XTAL2 of the microcontroller.
2. Constant 5V power supply from 7805 Regulator IC.
Step 1. Upload the below given program to blink an LED to the microcontroller using Arduino Board.
int led = 13;
void setup() {
pinMode(led, OUTPUT);
}
void loop() {
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
Step 2.
Create a circuit as shown in the figure given below. When the power supply is given, LED will start blinking.
ATmega168 / 328 pin mapping can be obtained from the following image.
I had atmega328 for one of my projects and I used an online community to get the code but there was something missing in the code. Thankfully you have posted the correct code and now its working fine.
ReplyDeleteThank you for your post, I look for such article along time. And do you want to leave the virtual worth yourself? If you want, let go to the game sims 4 mods. Click link to participate game.
ReplyDelete