<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://w.electrodragon.com/w/index.php?action=history&amp;feed=atom&amp;title=Category%3AAVR_SDK</id>
	<title>Category:AVR SDK - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://w.electrodragon.com/w/index.php?action=history&amp;feed=atom&amp;title=Category%3AAVR_SDK"/>
	<link rel="alternate" type="text/html" href="https://w.electrodragon.com/w/index.php?title=Category:AVR_SDK&amp;action=history"/>
	<updated>2026-07-21T23:12:36Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.37.2</generator>
	<entry>
		<id>https://w.electrodragon.com/w/index.php?title=Category:AVR_SDK&amp;diff=31777&amp;oldid=prev</id>
		<title>Chao at 09:19, 27 July 2021</title>
		<link rel="alternate" type="text/html" href="https://w.electrodragon.com/w/index.php?title=Category:AVR_SDK&amp;diff=31777&amp;oldid=prev"/>
		<updated>2021-07-27T09:19:29Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== ToolChain ==&lt;br /&gt;
* [[AVR Programmer]]&lt;br /&gt;
* [[Arduino]] Dev Board&lt;br /&gt;
* [[AVR Dev Board]]&lt;br /&gt;
=== Flash Tool ===&lt;br /&gt;
* [[Avrdude]]&lt;br /&gt;
* [[ProgISP]]&lt;br /&gt;
* [http://russemotto.com/xloader/ Xloader] - a simple tool to upload hex file&lt;br /&gt;
=== Complier ===&lt;br /&gt;
&lt;br /&gt;
* [http://www.atmel.com/Images/AStudio61net.exe AVR Studio 6.1]&lt;br /&gt;
&lt;br /&gt;
* Winavr [http://sourceforge.net/projects/winavr/ WinAVR]: Install the programmed, and test the AVRDUDE like below, run the cmd.exe in start menu.&lt;br /&gt;
&lt;br /&gt;
* [[AVR-GCC]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Programmer ==&lt;br /&gt;
&lt;br /&gt;
* [[ProgISP]]  Very Powerful and useful burning tool, same as AVR fight, eXtreme Burner, etc, these tools are also a kind of Avrdude GUI tools, provide a windows interface instead of avrdude command line.Click the RD to read the chip, you can check the wiring by doing so.&lt;br /&gt;
* [[:File:AVR_fighter.zip|AVR_fighter]]&lt;br /&gt;
&lt;br /&gt;
== Fuse Set ==&lt;br /&gt;
You know about flash, eeprom and RAM as parts of the chip. What I did not mention is that there are also 3 bytes of permanent (by permanent I mean that they stick around after power goes out, but that you can change them as many times as you'd like) storage called the fuses. The fuses determine how the chip will act, whether it has a bootloader, what speed and voltage it likes to run at, etc. Note that despite being called 'fuses' they are re-settable and dont have anything to do with protection from overpowering (like the fuses in a home).&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Avr_fuse_pro_mini_3v3_8m.png | fuse setup for arduino pro mini 3v3 8M&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Programing ==&lt;br /&gt;
You could grab the demo code from [[File:Had_AVRtut_2-master.zip|here]], and programming the hex file into your chip. This code is for atmega 168, you should have the postive pin of led to the pin 2 of atmega 168 and negative to a resistor (180 or 330 Ohm), and then go to GND.&amp;lt;br /&amp;gt;&lt;br /&gt;
You should see the LED blinking once the hex programmed.&amp;lt;br /&amp;gt;&lt;br /&gt;
== Memory Map ==&lt;br /&gt;
The memory map of a microcontroller is a diagram which gives the size, type and layout of the memories that are available in the microcontroller. The information use to construct the memory map is extracted from the datasheet of the microcontroller.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The diagram below gives the memory map for the ATMega8515 AVR 8-bit Microcontroller from Atmel. The ATMega8515 microcontroller contains three(3) blocks of memory: Program Memory, EEPROM Memory and Data Memory.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Data Memory Contains:'''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* 32 8-bits General Purpose&lt;br /&gt;
* 64 8-bits Input/Output Registers&lt;br /&gt;
* 512 8-bits SRAM space&lt;br /&gt;
'''Program Memory Contains:'''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* 8K byte Flash Memory&lt;br /&gt;
* Organized as 4K-16bits space&lt;br /&gt;
'''EEPROM Memory Contains:'''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* 512 8-bits EEPROM space&lt;br /&gt;
&lt;br /&gt;
[[File:Memory_Map_Small.jpg|300px]]&lt;br /&gt;
&lt;br /&gt;
== Demo Starting Code ==&lt;br /&gt;
=== snippet 1 ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C&amp;quot;&amp;gt;&lt;br /&gt;
#ifndef F_CPU&lt;br /&gt;
#define F_CPU 16000000UL // 16 MHz clock speed&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;avr/io.h&amp;gt;&lt;br /&gt;
#include &amp;lt;util/delay.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int main(void)&lt;br /&gt;
{&lt;br /&gt;
  DDRC = 0xFF; //Nakes PORTC as Output&lt;br /&gt;
  while(1) //infinite loop&lt;br /&gt;
  {&lt;br /&gt;
    PORTC = 0xFF; //Turns ON All LEDs&lt;br /&gt;
    _delay_ms(1000); //1 second delay&lt;br /&gt;
    PORTC= 0x00; //Turns OFF All LEDs&lt;br /&gt;
    _delay_ms(1000); //1 second delay&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=== snippet 2 ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
#include &amp;lt;avr/io.h&amp;gt;&lt;br /&gt;
#include &amp;lt;avr/interrupt.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
int main(void)&lt;br /&gt;
{&lt;br /&gt;
 &lt;br /&gt;
  //Setup the clock&lt;br /&gt;
  cli();            //Disable global interrupts&lt;br /&gt;
  TCCR1B |= 1&amp;lt;&amp;lt;CS11 | 1&amp;lt;&amp;lt;CS10;  //Divide by 64&lt;br /&gt;
  OCR1A = 15624;        //Count 15624 cycles for 1 second interrupt&lt;br /&gt;
  TCCR1B |= 1&amp;lt;&amp;lt;WGM12;     //Put Timer/Counter1 in CTC mode&lt;br /&gt;
  TIMSK1 |= 1&amp;lt;&amp;lt;OCIE1A;        //enable timer compare interrupt&lt;br /&gt;
  sei();            //Enable global interrupts&lt;br /&gt;
 &lt;br /&gt;
  //Setup the I/O for the LED&lt;br /&gt;
 &lt;br /&gt;
  DDRD |= (1&amp;lt;&amp;lt;0);     //Set PortD Pin0 as an output&lt;br /&gt;
  PORTD |= (1&amp;lt;&amp;lt;0);        //Set PortD Pin0 high to turn on LED&lt;br /&gt;
 &lt;br /&gt;
  while(1) { }          //Loop forever, interrupts do the rest&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
ISR(TIMER1_COMPA_vect)      //Interrupt Service Routine&lt;br /&gt;
{&lt;br /&gt;
  PORTD ^= (1&amp;lt;&amp;lt;0);        //Use xor to toggle the LED&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Official Demo Code ==&lt;br /&gt;
* https://start.atmel.com/#examples&lt;br /&gt;
* https://start.atmel.com/#examples/AVR128DA48CuriosityNano&lt;br /&gt;
&lt;br /&gt;
[[category: AVR]]&lt;/div&gt;</summary>
		<author><name>Chao</name></author>
	</entry>
</feed>