Vous êtes sur la page 1sur 4

Real-Time Embedded Processor Systems ACOE343 Experiment #4

Computer En ineerin !epartment

Real-Time Embedded Processor Systems "ACOE343# Experiment #4 $nter%acin &it' A!C and !AC

Student(s )ame* Semester* +all ,--. !ate*

Assessment: Assessment Point /et'odolo y Presentation and discussion o% results Participation Assessment Points Grade Comments* Weight Grade

Real-Time Embedded Processor Systems ACOE343 Experiment #4 Experiment #4: Conventions: T'e T'e
symbol indicates an operation t'at must be done in 'ard&are e0 0 pressin button or s&itc'1 ma2in a connection on t'e board1 a 3umper etc0 symbol indicates an operation t'at must be done in so%t&are e0 0 a command t'at must be entered1 a &indo& t'at must be opened etc0 a

$nter%acin &it' !AC and A!C

Objectives:
To use t'e 4itCO)-565 e7aluation board and t'e .-56 microcontroller to inter%ace &it' A!C0 PAR A

Proced!re: "#
8rite a pro ram %or t'at &ill re%lect on t'e 9E!s t'e amplitude o% t'e A!C input0 +or minimum input 7olta e all 9E!s s'ould be o%%1 &'ile %or maximum input 7olta e all 9E!s s'ould be on0

$ig!re "# 9E! se:uence

$ig!re %# .-56 source code %or 9E! se:uence o% +i ure 6 ,0 Connect your ;ost-PC "CO/6 or CO/,# to t'e !<=-soc2et P6 on t'e 2itCO)-565C usin a serial cable0 30 open0 Ensure t'at t'e red <oot->umper S,- &'ic' is located next to t'e !<=-plu P, - is

40 Attac' a po&er supply to t'e po&er-connector ?50 An unre ulated .@ to 6,@A5--mA po&er source can be used to supply t'e board0 Bse only a %ixed 7olta e po&er supply and no po&er supply &it' 7ariable 7olta e0 !ouble c'ec2 t'e correct polarity o% t'e plu as s'o&n in %i ure 30 $% t'e po&er supply is attac'ed correctly t'e red 9E!s !4 and !5 &ill s'ine0 50 Pus' s&itc' S6 to per%orm a Reset0 T'e red 9E! !5 &ill be turned o%% as lon as t'e reset button S6 is pressed0 A%ter releasin t'e reset button S6 t'e /onitor pro ram on t'e 2itCO)-565C &ill be started0

Real-Time Embedded Processor Systems ACOE343 Experiment #4

C0

$n7o2e t'e %las' tools and do&nload t'e executable o% t'e source code o% +i ure ,0 Bse a &a7e%orm enerator to enerate a si nal &it' an obser7able period at t'e A!C input0 Obser7e t'e pattern on t'e 9E!s

&!estion ": ;o& many assembly instructions does your pro ram containD Ans&er* &!estion %: $s t'ere a &ay to re&rite t'e pro ram usin %e&er instructionsD "'int* use s'i%t1 complement and loop instructions# Ans&er* 30 ;o& many instructions does t'e ne& pro ram containD ;o& muc' &as t'e approximate code siEe sa7in sD

PAR ' Proced!re: "#


8rite a pro ram %or producin in t'e !AC output t'e same approximate &a7e%orm as in t'e A!C input0

$ig!re "# $nter%acin &it' !AC and A!C $ig!re %# .-56 source code %or !AC-A!C inter%acin ,0 Connect your ;ost-PC "CO/6 or CO/,# to t'e !<=-soc2et P6 on t'e 2itCO)-565C usin a serial cable0 30 open0 Ensure t'at t'e red <oot->umper S,- &'ic' is located next to t'e !<=-plu P, - is

40 Attac' a po&er supply to t'e po&er-connector ?50 An unre ulated .@ to 6,@A5--mA po&er source can be used to supply t'e board0 Bse only a %ixed 7olta e po&er supply and no po&er supply &it' 7ariable 7olta e0 !ouble c'ec2 t'e correct polarity o% t'e plu as s'o&n in %i ure 30 $% t'e po&er supply is attac'ed correctly t'e red 9E!s !4 and !5 &ill s'ine0 50 Pus' s&itc' S6 to per%orm a Reset0 T'e red 9E! !5 &ill be turned o%% as lon as t'e reset button S6 is pressed0 A%ter releasin t'e reset button S6 t'e /onitor pro ram on t'e 2itCO)-565C &ill be started0

Real-Time Embedded Processor Systems ACOE343 Experiment #4

C0

$n7o2e t'e %las' tools and do&nload t'e executable o% t'e source code o% +i ure ,0 Bse t'e same input &a7e%orm and use an oscilloscope to obser7e t'e !AC output0

Vous aimerez peut-être aussi