Professional Documents
Culture Documents
re%oteFcodeG6:@H - data$
te%-eratureG5:@H
(H%)Lite S!aves - 01( Contro!!er
Modi"ications:
&
'nvisi.le cursor4
&
,usto% cursor re-ositioning C "or
clearFscreen12 "unction4
&
Modi"!ing screen tiles and color te3t4
c!ear#screen23 function
&
>hen the 76
th
A+,'' character is dis-la!ed -I cursor
re-ositioned to initial -osition 1@$@24
&
#he vga %e%or! )ill .e re)ritten )ith e%-t!
characters4
&
,ursor re-ositioning a"ter dis-la!ing again the 76
th
character4
8oid 9lear"s9reen():
prin1f(;<9;/*=)#
for(i=!#i<8#i>>)
prin1f(;
;)#
prin1f(;<9;/*=)#
?
Software Design
#he so"t)are co%-onent is )ritten in A<+' , and ARM
Asse%.l!.
#he -ro(ect itsel" contains 9 "iles:
&
,M@-D+.h C contains the -eri-heral %e%or! %a- 4
&
retarget.c C contains the i%-le%entation o" "unctions
used to dis-la! the te3t4
&
c%@dsas%.s C contains instructions )hich handle the
interru-t vector4
&
M!Progra%.c - contains the code used "or %enu dis-la!
and control algorith%s4
Interrupt Contro!!er 243
&
<V', 1 <ested Vector 'nterru-t ,ontroller 2
)hich is tightl! cou-led )ith -rocessor core4
&
7B -rioriti;ed interru-ts su--orted4
Interrupt Contro!!er 2&3
,orte3 M@ Design +tart su--orts seven e3ce-tion
t!-es:
&
Reset C Processor reset in-ut is asserted4
&
*ard/ault e3ce-tion C can .e an! t!-e o" "ault
occurred 1e.g. .us "ault or unde"ined instruction24
&
<M' C <on-Maska.le 'nterru-t occurred4
&
'RJ C 'RJ 'nterru-ts occurred4
&
Pend+V C +o"t)are 0enerated interru-t4
&
+V,all C e3ecution o" a +V, instruction4
&
+!s#ick C internal s!ste% ti%er caused interru-t4
0ector Ta'!e
&
#he vector ta.le contains the *andler vector
addresses and initial value o" the Main +tack
Pointer 1M+P2. 'n the case o" an e3ce-tion the
core )ill read the vector handler address "or the
e3ce-tion "ro% the vector ta.le and .ranches to
the handler.
Interrupt Hand!ing
& 'n our -ro(ect design )e use the 'RJ received "ro% the re%ote
control .! -ressing the O<KO// .utton 1 '<P#+F'RJ 24
& se"ul to initiali;e and turn onKo"" the control s!ste%4
& 'n the Vector #a.le its handler has address @39:4
& >e have to )rite a handler and an '+R 1interru-t service routine2 in
, "or this interru-t line4
Assembly :
&np01"Handler 4R@C
EA4@RT &np01"Handler
&B4@RT &(45T"&SR
45SH :R!/LR?
CL &(45T"&SR
4@4 :R!/4C?
E(,4
C :
8oid &(45T"&SR():D?
Heating (!gorithm
&
#hree +tates: