0% found this document useful (0 votes)
53 views

Getting Started With The AVR

Start book for AVR

Uploaded by

M70AB2
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views

Getting Started With The AVR

Start book for AVR

Uploaded by

M70AB2
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Getting Started with the AVR

(An 18-545 Walkthrough)

2004 Saura h Shar!a" Sean #ie$er" %oAnn #aul

&egal 'ote(
AVR" A)AVR*S# and S)+500 are regi,tered trade!ark, o- At!el .or$oration/ All other 0o!$an1 and $rodu0t na!e, are the $o,,e,,ion o- their re,$e0ti2e owner,/ All $rodu0t, and !aterial, di,0u,,ed in thi, tutorial are u,ed ,olel1 -or edu0ational $ur$o,e,/ Should an1 $rodu0t e !i,re$re,ented or thi, do0u!ent in an1 wa1 e in 2iolation o- trade!ark law" the 0our,e ,ta-- will e !ore than ha$$1 to !ake the a$$ro$riate 0orre0tion, and 0an e 0onta0ted at ee5453e0e/0!u/edu/ )hi, do0u!ent !a1 e -reel1 $roli-erated/

)e4t 5or!atting( .ontent,

*n thi, do0u!ent all -un0tion 0all," -un0tion na!e," $ath, and te4t 0o!!and, are $re,ented in courier/ All other te4t i, in )i!e, 'ew Ro!an/

.ontent,///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////2 What i, the AVR6////////////////////////////////////////////////////////////////////////////////////////////////////////////////7 Wh1 8o * .are6///////////////////////////////////////////////////////////////////////////////////////////////////////////////////7 *nter-a0ing With the AVR////////////////////////////////////////////////////////////////////////////////////////////////////5 9a,i0 G#*: u,e////////////////////////////////////////////////////////////////////////////////////////////////////////////////5 ;AR) Setu$/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////5 )he <an1 Ste$, o- .o!$ilation//////////////////////////////////////////////////////////////////////////////////////////= )utorial 1( Si!$le )er!inal 8e!o//////////////////////////////////////////////////////////////////////////////////////> )utorial 2( SRA< 8e!o///////////////////////////////////////////////////////////////////////////////////////////////////10 :ther .a$a ilitie, o- the at!ega8//////////////////////////////////////////////////////////////////////////////////////12 Re-eren0e,//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////17

What i, the AVR6


)he AVR i, a -a!il1 o- 8- it !i0ro0ontroller,/ *n thi, 0our,e" we will e u,ing the At!el at!ega8 AVR $ro0e,,or/ )hi, $ro0e,,or -eature, 8+9 o- 5&AS?" 1+9 SRA<" and a 2ariet1 o- uilt-in $eri$heral,/ *t ,u$$ort, a $ro$rietar1 8- it AVR *SA -or whi0h there i, G.. ,u$$ort/ )he at!ega8 ha, a !a4i!u! rated $ro0e,,or -re@uen01 o- 1=<?A and i, little endian/ )he at!ega8 lend, it,el- e4tre!el1 well to $rotot1$ing due to it, 8*# -or! -a0tor (in the 2er,ion we u,e) and it, ,i!$le re@uire!ent o- a 4/5V-5/5V $ower ,our0e/

Wh1 8o * .are6
)he AVR allow, 1ou to ra$idl1 de2elo$ 0ode -or a 2er1 low-$ower" low-0o,t !i0ro$ro0e,,or with the ad2antage, o- G.. 0o!$iler ,u$$ort/ )he at!ega8 ha, a de0ent a!ount o- 0o!$utational $ower and ha, e40ellent -le4i ilit1 in the u,e o- it, *: $in,/ )he AVR -a!il1 o- $ro0e,,or, ha, a 2er1 large -ollowing on the *nternet allowing -or ra$id ad2i0e on de2elo$!ent i,,ue,/ *- that i,nBt enough" 1ou are re@uired to u,e thi, $ro0e,,or -or the $ur$o,e, o- thi, 0la,,/ #rogra!!ing the AVR )he AVR $ro0e,,or -a!il1" and in $arti0ular the at!ega8 $ro0e,,or in it, 8*# -or!at" are 2er1 ea,1 to $rogra! through it, *n S1,te! #rogra!!ing (*S#) inter-a0e/ All $rogra!!ing i, done 2ia the A)AVR*S# whi0h 0onne0t, ea,il1 to a .:< $ort on the #. and to a 10 $in header on AVR/ A, a re,ult" $rogra!!ing on the at!ega8 $ro0e,,or i, -a,t and ea,1/ 9e-ore an1 $rogra!!ing 0an take $la0e" we !u,t $ower the AVR and 0onne0t the ;AR) line, on the at!ega8 to the 0o!$uter/ )hi, i, not a, ,i!$le a, it ,ee!," howe2er/ RS272 ,ignal, go etween C12V and D12V and are in2erted (-12V i, a logi0al 1)/ A$$l1ing thi, kind o- 2oltage to the AVR i, 2er1 dangerou,/ 8ealing with thi, $ro le! re@uire, the u,e o- a 2er1 0o!!on 0hi$( the <AE272/ )he <AE272 u,e, 0a$a0itor $u!$, to $er-or! the ne0e,,ar1 le2el ,hi-ting and $ro2ide two re0ei2e and two tran,!it 0hannel, $er 0hi$/ )he AVR i, $rogra!!ed 2ia an inter-a0e etween a 0o!$uterB, ,erial $ort that goe, to $in, on the AVR/ *n thi, ,e0tion" we will ,et u$ thi, inter-a0e/ )he A)AVR*S#B, (the $rogra!!ing inter-a0e) ,erial 0onne0tor !u,t e 0onne0ted to the #. and we !u,t ,etu$ an inter-a0e etween the 10 $in 0onne0tor on the A)AVR*S# and the at!ega8/

)o ea,e thi, ,etu$" we will e,ta li,h a 0on2ention in whi0h the otto! row o- the 10 $in 0onne0tor i, de-ined a, the row 0lo,e,t to the long $art o- the ri on 0a le/ 1
10

2 G Ri

7 8

4 >

5 =

on .a le

;,e the -ollowing ta le to !ake 0onne0tion, etween the AVR $ro0e,,or and the 10 $in header/ AVR Processor Pin 1> (<:S*) G'8 (an1 ,our0e will do) 1 (RFSF)) 1G (S.+) 18 (<*S:) Programmer 10 Pin Header 1 2 7 4 5

:ne thing to note i, that 1ou !u,t atta0h a 10+H re,i,tor ( rown D la0k D orange) to a 5V $ower ,our0e and $in 1 on the AVR $ro0e,,or/ )hi, $ull-u$ re,i,tor i, ne0e,,ar1 on RFSF) ,in0e the $rogra!!er i, not ,trong enough to $ull down an1thing ee-ier and the AVR doe, not ha2e a $ull u$ re,i,tor on thi, $in internall1/ Al,o" $in 10 on the 10 $in 0onne0tor !u,t e 0onne0ted to a 5V $ower ,our0e/ 9e ,ure to do thi, ,te$ a, it i, VFRI *<#:R)A')/ )o egin $rogra!!ing" the $ro0e,,or !u,t ha2e RFSF) and S.+ $in, ,et to 0/ )hen" ,$e0i-i0 #rogra!!ing Fna le ,erial in,tru0tion, !u,t e ,ent to the <:S* $in (!ore detail, in the at!ega8 data ,heet)/ ?owe2er" thi, doe, not ha2e to e done 1 the u,er a, the A)AVR*S# take, 0are o- all o- thi, -un0tionalit1/ 'ow that weB2e ,etu$ the $rogra!!ing inter-a0e" it i, relati2el1 ea,1 to 0o!$ile and download a $rogra!/ 5ind the )er!inal8e!o $rogra! lo0ated at C:\545\demo\code\avr\ and t1$e make/ )hi, will 0reate a -ew -ile, (who,e 0reation and !eaning will e di,0u,,ed later in thi, do0u!ent)/ :- !o,t intere,t to u, i, the TerminalDemo.hex -ile/ )hi, -ile 0ontain, all the in-or!ation ne0e,,ar1 to run the $rogra!/ )o download thi, $rogra! to the AVR" t1$e in STK500.EXE -dATmega8 -e -ifTerminalDemo.hex -pf -vf

Sin0e we are Ju,t te,ting to en,ure that the $rogra!!er i, $ro$erl1 ,etu$" no a0tual out$ut will e ,een/ ?owe2er" i- 1ou re0ei2e an error !e,,age" en,ure that the green light on the A)AVR*S# i, on and ,ta le/ *- thi, i, ok" 0he0k the orientation o- 1our 0a le/

*nter-a0ing With the AVR


Basic GPIO use
<o,t o- *: $in, on the at!ega8 0an e 0on-igured to a0t a, G#*:, or to ,er2e an alternate -un0tion/ <o,t $in, ha2e two alternate -un0tion, and the a2aila le -un0tion, 2ar1 1 $in/ )he 2alue o- the G#*:, i, ,tored in !e!or1 a, a -ew 8- it integer with ea0h it 0orre,$onding to the a$$ro$riate $in/ *n-or!ation a out ,$e0i-i0 $in, 0an e e4tra0ted through it-ha0king (e/g/ to -ind the 2alue o- #ort . $in 4 1ou !ight write ,o!ething like ((PORTC>>4)&1) / A large 2ariet1 o- !a0roB, and a00e,, to $in 0on-iguration in-or!ation i, lo0ated in io!8/h/ *t i, highl1 re0o!!ended that 1ou look through and under,tand the 0ontent, o- thi, -ile/

UART Setup
)hi, ,e0tion de,0ri e, how to ,et u$ the <AE272 0hi$ and 0onne0t it to the AVR to ena le ;AR) tran,!i,,ion, etween the AVR and the #./ &etB, ,etu$ the $ower line, to the 0hi$ -ir,t/ A-ter $la0ing it onto the read oard" $la0e a 5V wire to $in 1= and $la0e G'8 to $in 15 o- the <AE272/ 'e4t" o tain 4 1K5 0a$a0itor,/ .onne0t the negati2e end o- one o- the 0a$a0itor (the one with the ,tri$e) to $in 7 and the $o,iti2e end to $in 1/ With another 0a$a0itor" 0onne0t the negati2e end to $in 5 and $o,iti2e end to $in 4/ .onne0t the 7rd 0a$a0itor, negati2e end to a 5V 0olu!n and the $o,iti2e end to $in 2/ .onne0t the la,t 0a$a0itor, negati2e end to $in = and the $o,iti2e end to a ground 0olu!n/ )he,e 0onne0tion, are ,u!!ariAed in the ta le elow/ Capacitor 1K5 1K5 1K5 1K5 Negative End #in 7 D <AE272 #in 5 D <AE272 5V #in = D <AE272 Positive End #in 1 D <AE272 #in 4 D <AE272 #in 2 D <AE272 G'8

'ow itB, ti!e to 0onne0t the <AE272 to the AVR ;AR) $in header,/ #la0e a 542 $in header onto the oard/ 9e 0are-ul not to $la0e it in 0olu!n, $owered 1 another de2i0e/ <ake the -ollowing 0onne0tion, (u,e the $i0ture o- the $in header -ro! 2.1.2 to guide 1ou)/ 10 pin Header Connection #in 1 #in 7 #in 4 MAX232 Connection G'8 #in 17 (R1*') #in 14 ()1:;))

&a,tl1" we !u,t 0onne0t the <AE272 to the AVR/ )hi, in2ol2e, two ,i!$le 0onne0tion,/ MAX232 Connection #in 12 (R1:;)) #in 11 ()1*') AVR Connection #in 2 (RE8) #in 7 ()E8)

)he <an1 Ste$, o- .o!$ilation


(thi, ,e0tion i, orrowed entirel1 -ro! Sean #ie$erB, e40ellent guide o- the )in1AR<)

G..B, de-ault eha2ior !a,k, !an1 detail, o- the 0o!$ilation $ro0e,, -ro! the a2erage u,er/ A, a re,ult" !o,t $rogra!!er, re!ain un-a!iliar with the eha2ior o- the linker whi0h i, 0ru0ial -or 0ro,,-0o!$ilation/ )o go -ro! ,our0e to inarie," there are a 2ariet1 o- ,te$, in2ol2ed/ )he,e 0an e ,u!!ariAed a,( #re$ro0e,,ing .o!$ilation A,,e! l1 &inking : Je0t )ran,lation #re$ro0e,,ing" 0o!$ilation" and a,,e! l1 -low a, e4$e0ted/ A, i, nor!al" -or ,$eed" 1ou !a1 want to 0reate indi2idual o Je0t -ile, -or ea0h in$ut -ile/ When we get to the linking ,tage" howe2er" thing, e0o!e e40iting/ )o ,tart with" when 1ouBre $rogra!!ing the at!ega8" 1ouBre o$erating without an1 o- the ene-it, o- an :S/ )hi, !ean, that 1ou need to take 0are o- a 2ariet1 o- low-le2el ta,k, that" a, a $rogra!!er" 1ou arenBt t1$i0all1 0on0erned with/ We $ro2ide 1ou with a ,!all a,,e! l1 routine that will $er-or! the !o,t a,i0 initialiAation" ut i- 1ou need to in,tall interru$t handler," 1ou will e -or0ed to !odi-1 thi, 0ode to ,et the a$$ro$riate Ju!$ $oint, and di,tingui,h etween di--erent interru$t ,our0e,/ 5or tho,e o- 1ou who are un-a!iliar with the -un0tion, $er-or!ed 1 the linker (ld)" it re,ol2e, la el, a0ro,, a nu! er o- in$ut -ile," and then !a$, the! to 2ariou, ,eg!ent, o!e!or1/ )here are ,eg!ent, -or 0ode" read-onl1 2aria le," initialiAed glo al 2aria le,"

uninitialiAed glo al 2aria le," and a 2ariet1 o- ,ta0k,/ )o ,o!e e4tent" the,e !a$$ing, are 0ontrolled 1 the !e!or1 la1out o- the at!ega8 (i/e/ 0ode" read-onl1 2aria le," and the initial 2alue, o- initialiAed glo al, need to li2e in the $art or !e!or1 re,er2ed -or 5&AS? wherea, ,$a0e i, re,er2ed -or initialiAed glo al, to e 0o$ied into" -or uninitaliAed 2aria le," and -or ,ta0k, in the the RA</ 5inall1" on0e the linking ha, een $er-or!ed" 1ou need to 0on2ert the out$ut /el- -ile to a / he4 -ile that 0an e loaded dire0tl1 into the $ro0e,,orB, -la,h/ )hi, o$eration i, $er-or!ed 1 the o J0o$1 utilit1/ 9e0au,e o- the nu!erou, ,te$, in2ol2ed" it i, ,trongl1 re0o!!ended that 1ou take one othe $ro2ided <ake-ile, and !odi-1 that to -it 1our need,/ *- 1ou are e4$erien0ed in the dark art, o- 0reating <ake-ile," there i, a lot o- roo! -or i!$ro2e!ent in the $ro2ided -ile and the 0our,e ,ta-- would greatl1 a$$re0iate an1 u,e-ul tweak, to an ad!ittedl1 ugl1" al eit -un0tional" <ake-ile/

)utorial 1( Si!$le )er!inal 8e!o


*n the C:\545\demo0\code\avr\ ,our0e dire0tor1" -ind and o$en the -ile, TerminalDemo.c, TermincalDriver.c, TerminalDriver.h and makefile/ &etB, ,tart with the )er!inal8ri2er/h -ile( )hi, -ile in0lude, !an1 ter!inal ,0reen 0ontrolling -un0tion, that 1ou !a1 -ind u,e-ul/ Iou !a1 want to $a1 ,$e0ial attention to the,e line,( Line !ermina"#river.$% 'inc"(de )avr*io.$+ void !erm,-nitia"ise % void !erm,.end (nsigned c$ar data % (nsigned c$ar !erm,/et % E&p"anation *n0lude, 2ariou, ar0hite0turall1 de$endent de-ine,/ 5un0tion that ,et, u$ ;AR) 0o!!uni0ation, on the AVR with the a$$ro$riate aud rate/ 5un0tion to ,end one 0har a0ro,, the ;AR)/ 5un0tion to retrie2e one 0har -ro! the ;AR)/ )hi, -un0tion i, lo0king/

'e4t" letB, look at the )er!inal8e!o/0 -ile( )hi, -ile holdB, the !ain $rogra!/ Iou !a1 want to $a1 ,$e0ial attention to the,e line,( Line !ermina"#emo.c% 'inc"(de )stdio.$+ 0-LE 1ser2 ser34devopen !erm,.end5 !erm,/et5 0%2 E&p"anation Standard *: li rar1 .reate a ,trea! $ointer to e u,ed 1 2ariou, *: -un0tion,/ 5un0tion that e,ta li,he, that all *: -un0tion, ,hould u,e the ;AR) dri2er a, their $ri!iti2e in$ut out$ut -un0tion,/ Al,o a,,ign, the ,trea!/ E&p"anation )hi, ,$e0i-ie, the na!e o- the de2i0e we are u,ing/ 8o not 0hange thi,/ )he -or!at u,ed 1 the S)+500 to download the $rogra! onto the AVR/ )ARGF) ,$e0i-ie, the -ile that 0ontain, !ain/ SR. !u,t in0lude the target and an1 other . -ile 1ou wi,h to 0o!$ile/

&a,tl1" letB, look at the !ake-ile( Line Ma6e4i"e% ' MC7 name MC7 3 atmega8 ' 9(tp(t 4ormat. can :e srec5 i$e&5 :inar;% 09RMA! 3 i$e& ' !arget 4i"e name <it$o(t e&tension%. !AR/E! 3 !ermina"#emo ' List C so(rce 4i"es $ere. C dependencies are a(tomatica""; generated.% .RC 3 = !AR/E!%.c ' -4 t$ere is more t$an one so(rce 4i"e .RC >3 !ermina"#river.c

'ote that a 0o!$lete e4$lanation -or the line, a o2e 0an e -ound in the AVR re-eren0e !anual and on the AVR-&*9. we $age (htt$(LLwww/nongnu/orgLa2r-li 0Lu,er!anualLinde4/ht!l)/ 9a,i0all1" thi, $rogra! ,et, u$ the ;AR) routine, )er!MSend and )er!MGet a, the a,i0 ato!i0 -un0tion, to e u,ed 1 $rint-" $ut0" get0" et0/ *t then $rint, out N?ello WorldO onto a ter!inal ,0reen and then e0ho, whate2er 0hara0ter, 1ou enter into the ter!inal a0k to 1ou/ Sin0e there are dedi0ated *: $ort, re,er2ed -or the ;AR)" no ,$e0ial $ort 0on-iguration goe, on in thi, $rogra!/ )he onl1 0on-iguration i, 2ia fdevopen to ,etu$ the ,0reen -un0tion,/ 9a,i0 in-or!ation on the how the ;AR) work, 0an e -ound in the at!ega8 data ,heet/ 9e-ore downloading the $rogra! to the AVR" o$en )era )er!/ .on-igure )era )er! to u,e the $ort not o00u$ied 1 the A)AVR*S# and ,et it to a aud rate o- 2400" no $arit1" one ,to$ it and no -low 0ontrol/

'ow that we know how the $rogra! work," letB, te,t it out/ Re-er to the a o2e ,e0tion, a, to how to 0o!$ile the $rogra! and download it to the AVR/ :n0e the $rogra! i, downloaded" 1ou ,hould ,ee N?ello WorldO $rinted out and e a le e0ho 0hara0ter, to the ter!inal/ At thi, $oint 1ou ,hould e $re$ared -or a ,lightl1 !ore a! itiou, $roJe0t/

)utorial 2( SRA< 8e!o


)hi, ,e0tion de,0ri e, how 1ou will 0onne0t 72+9 o- e4ternal SRA< to the AVR $ro0e,,or/ )hi, will e a00o!$li,hed 1 u,ing the AVR $ro0e,,or uilt-in in$utLout$ut $ort,/ So!e a0kground a out the $ort, and -un0tion, i, -ir,t gi2en/ )hen the 0onne0tion, 1ou need to !ake are de,0ri ed along with idea, -or te,ting/ 'ote" thi, $art o8e!o 0 i, ,e$arate -ro! the re,t o- 8e!o 0/ A, ,oon a, 1ou 0o!$lete thi, ,e0tion" $lea,e ha2e one o- the )AB, 0he0k 1ou o-- ,o that 1ou 0an 0ontinue with the re,t o- the 8e!o 0/ AVR Processor Ports )he AVR o--er, two !ethod, to 0o!!uni0ate with it, G#*:B,/ :ne !ethod o--er, a ,e$arate *: addre,, ,$a0e that 0an onl1 e addre,,ed with ,$e0i-i0 *: in,tru0tion, (in" out" et0/)/ )he other !ethod" whi0h 1ou !a1 e !ore -a!iliar with" i, !e!or1-!a$$ed *: whi0h !a$, the entire *: addre,, ,$a0e onto the regular $h1,i0al addre,, ,$a0e o- the AVR" allowing $ortB, to e read -ro! and written to u,ing ,i!$le .-,t1le $ointer,/ 9oth -or!at, are de,0ri ed here and oth -or!at, are ,u$$orted 1 the 2er,ion o- G.. we are u,ing -or thi, 0our,e/ 9e-ore ,etting u$ in$ut and out$ut 0o!!and," we !u,t in0lude the io/h -ile in our $rogra!,/ )hi, -ile ,i!$l1 in0lude, the real *: header -ile -or the ,1,te! 1ou are u,ing/ *n our 0a,e" ,in0e we are u,ing the at!ega8" io/h in0lude, the -ile io!8/h/ Re2iew thi, -ile ,o 1ou know it, 0ontent,/ With e2er1 a2aila le $ort 0o!e, 7 8- it !e!or1-!a$$ed *: regi,ter,/ )he,e regi,ter, ,er2e the -ollowing $ur$o,e( Register #*'4 88R4 #:R)4 P(rpose A0tual $h1,i0al 0onne0tion to $in/ ;,e thi, regi,ter -or readingPP F,ta li,h the dire0tion o- data/ 1 -or out$ut" 0 -or in$ut/ *- 88R i, ,et to 1" thi, i, the out$ut data/ *- 88R i, ,et to 0" thi, indi0ate, -loat or $ull-u$

)he intera0tion etween 2ariou, ,etting, o- #:R)4 and 88R4 are ,hown elow( 88R it Q 1 :ut$ut ?igh :ut$ut &ow 88R it Q 0 *n$ut #ull-;$ *n$ut 5loating

#ort it Q 1 #ort it Q 0

Sa!$le 0ode to read -ro! and write to #:R). -ollow,/ Rin0lude Sio/hT int !ain(2oid) U #*'. Q 04AAV 88R. Q 04AAV LL9it $attern o- 10101010" ,etting e2er1 other it a, in$ut LL<i!i0 the $attern o- #*'. to turn on the $ull-u$ regi,ter,/

LL)wo wa1, to read data 2olatile int readV read Q #*'.V LL9e 0are-ul to read onl1 tho,e it, whi0h are in$ut, read Q in (#*'.)V LLSa!e a, a o2e LL)wo wa1, to write 1B, to all o- the out$ut $ort, #:R). Q 04AAV out (#:R)." 04AA)V return 0V W )hu," 0o!!uni0ation with the AR< 0an e -a,hioned 2ia u,age o- the a o2e 0o!!and,/ 'ote that 1our 0o!!uni0ation, $roto0ol, will !o,t likel1 ha2e to $oll 0ertain it, o- the 0ntl line,/ )hi, 0an e a00o!$li,hed through while loo$, or through ,$e0ial !a0roB, in the io!8/h/ 'ote al,o that it i, $ro a l1 in 1our e,t intere,t to write a -ew !a0ro, o- 1our own to e4$edite 0ertain re$eated 0ode and to a2oid little ug, that !a1 re,ult -ro! a00identall1 writing to a wrong $ort/ Connecting t$e .RAM 5ir,t" $la0e the SRA< 0hi$ a o2e or elow the AVR !i0ro0ontroller (-or ea,e o- wiring)/ Re-er to the SRA< data,heet a, an aid -or the re,t o- thi, ,e0tion/ )he ta le elow ,how, the re0o!!ended 0onne0tion, to 0onne0t the SRA< to AVR/ 'ote" that we are onl1 u,ing the -ir,t G addre,, it, whi0h li!it, our SRA< to e 4+ due to re,tri0ted $in andwidth on the AVR/ Al,o" we dual u,e the AVR $rogra!!er line, -or the ,a!e rea,on,/ AVR Connection 5V (V00) on read oard Ground on read oard #85 #8= #8> #.0-#.5 #82-#84 Ground on read oard #90-#9> .RAM Connection V00 V,, WF :F .F A0-A5 A=-A8 AG-A14 *:0-*:8

.o4t<are to Comm(nicate <it$ t$e .RAM We $ro2ide 1ou with ,o!e ,o-tware/ &ook it o2erP <ake and u$load the ,ra!te,t/0/ )he outlook ,hould look a, -ollow,(
Hello World Starting SRAM Tests erase completed successfully AA write/read completed successfully 55 read/write completed successfully SRAM successfully tested

:ther .a$a ilitie, o- the at!ega8


)he at!ega8 ha, ,o !an1 alternate -un0tion, a2aila le that it would e an a!aAingl1 ti!e 0on,u!ing ta,k to 0reate ,u$$ort -or all o- the!/ )he 0hi$ ha, ,e2eral #W< out$ut," two internal ti!er," 0a$ture 0o!$are $ort," and a real-ti!e 0lo0k/ )he e,t wa1 to learn a out the,e -eature, i, to read the !anual/ )he do0u!entation -or thi, 0hi$ i, $arti0ularl1 thorough and well written and in0lude, !an1 e4a!$le 0ode lo0k, to @ui0kl1 integrate and te,t -un0tionalit1 within 1our $rogra!,/

Re-eren0e,
)he at!ega8 8ata Sheet( htt$(LLwww/at!el/0o!Ld1nLre,our0e,L$rodMdo0u!ent,Ldo0248=/$d)he AVR *SA Re-eren0e <anual( htt$(LLwww/at!el/0o!Ld1nLre,our0e,L$rodMdo0u!ent,Ldo0085=/$d)he <AE272 8ata Sheet( htt$(LL$d-,er2/!a4i!-i0/0o!LenLd,L<AE202F-<AE241F/$dSolderle,, 9read oard walkthrough( Solderle,, 9read oarding -or 5un and #ro-it/do0 Getting Started with the )in1AR< walkthrough( getting ,tarted with the )in1AR</do0

You might also like