Assignment 2(22BEC7289) MPMC

You might also like

Download as pdf
Download as pdf
You are on page 1of 12
Name: SAniJ Pag Hams 12 BECTLES Chote 2 By TB, Couvee + MPM oy) clot wake YR 3 an Rg; bakys CHR Bs ca eet Ra. Je Mae! Assembly fanguage Code t= Sus RL, ko, Ry CMe HB pay 6c ey) y Bat SKIP , Carb-O a SUR hy, RH RS g END SKIP 7 END: App key Pry PS STOP @ scanned with OKEN Scanner 83) LDR R,, = Ox0000 f20N LOR Ry = 000003000 H Lpe Ry, = oxlaoo4o00 H LOR ty = Ox kD60+OC0 H LOOP > LDR Ro, CAD LeR es, CRs) STR Ro, CRD SUBS Re, Ro, Rs 5 CMP Ro Re BGT turn off Lt TuKw— on Mav hq, #190000 DELAY_Leoe : subs RY, Rg, HI BNE 4 peLay _LooP B Looe TURN. ON: Lor Ry, = OXEF Wy STR Po, Cry) 8B Loop tun-OPP : LOR R, =OxFA H STAs, Crud) B Loop @ scanned with OKEN Scanner (Contre, Assembly LOnguage _Megran 1 y__ Geyer onto ity a Avemby Language Coda te 7 23 2 me LDR R, = OX00001000 H 3 Lyn Ri, = Gx00003000 Hy Z & MUL 3, Rey Re Pt Laue oe MUL ky, eves ie cia all UL Repaay Ry hs = Kuxta= Yl ADD Ke > ey DRgWO Ry Rom PrtRe= Vez ADD Ryy te) Re 7 hme RAR — HEY JZ The value tf wf = 30 MOV ky , #315 MoL Ro, By ,R6 g Ro> Bq 6 STR to, STop . END = 000004 000 H evobuch X= (Ge (yee Be ee el | @ scanned with OKEN Scanner On) P30 9:1 ps py. 7 py plo Ore 01056080 O 35 HlO Ord On oot nO Ome Ont © p37 O Ons Ons pak TeetO ae 6 0 psy | phy ; t ateve pattern Einbedde tes implemen men nbedad C pagan fe tndlrent Oy Fincde 2 1pC)1xx-h> void delay. ins Cunsigneet Int ms); int: main ) t System InvECY olFF 5 Lpc- Gna) OF TowaKl = CAO aes LrC- por —FIODIR' = 0x0000001F 7 LiC- ros —9 FZopret = 6x00000FF; | uihile (1) t Uc-atfol 4 =~ (oxon0oal FEL 1 Lec-G pro. FTOPIN pew Concnoal FY, | LeC-Gpror > Frorrn &= ~ (Ox000000 te) LtC- GPIOS > Fror1n &= (6x 00000 1FFIS delay -ms (100); LIC Gea > Foe | = 0%000001F Fy Lec G02 9 FTOPIN f= ~(6x006000! Fy LC -GtI03 — FIOPEN & = ~ (Ox 6008? wry | delay -m C100); a @ scanned with OKEN Scanner ~~ scent LAC. HAO — > FOtIN |= (0 x o00001re); UrC- PLO 9 FLoptn | Lox dado ry) LPC GP105 9 FrOPIN & © » Coxsone IFFY delay. 1. § (100); Lec. Gptoa —» Ftorzn |> (a xd00001F FY) Lrc- Gpror > FLOM I= (0x 600000 | Fs Lc - Grtos 9 Fitoren |= (ox do000 IFFY delay ns C160); Y void delay ms (unsigned In mg Re onigned Ga Por W207 ts Aiea ae panies} —2eemg hey an @ scanned with OKEN Scanner B® ae ? Fon te given problem and above diayan, : Stake Ba 10r, 3) & (P47 Ona) Should Ge in SOMA in Sane As well os #eRus 0 As))y# 6503-40) 919 Stake to ensure dra hic sahety B10 [4] m) Oo) 4Ja ‘| me [ou aq KC] olifofofifofofifo fot Jo [esha plelaiMiels|: fe [ol o |) | ora olelyfolsfofolf: fo | o ofo [1 [orai | vfolofofol lolol L[o Jo | oxeuc ] Oe LO}. }Olofo}t ofo ACA eh ie 0 [oxhtrd Snlerfocing chasrains LPCIT6® it (cee GR @ scanned with OKEN Scanner | + Ne ee Z1DCM xx hs ey void olay ms Cansigned int ms); \ IE maint ) © Saskemnit oy MEY a CH) = (0x32 gxrat, OR BEC, Ont 4 HPC GPUOL —> Frente |= 0% 00006 FFES Uo Sf so1 —>? FaoPru Y= Onan; | while (1) LB, Cieoy ine it) \ 4 X Uc-Geton —sFropm [= 200; | delay (100000000) ; | ey a B) Q6) 1 4 a PI. cere pl vt Pay Bs PS As ua Stepper matar operation Cas tell gare] A Toe 4']g) + B N Open 1fo]o]e alt | | Eloi |i Onin 4° f°. Fi @ scanned with OKEN Scanner Embedded — C_ program! | include sia jy xh? void desfay.msCunsigned ine rs) int maind) { _ Sysbem Invt C)s ni v 0 (1220) |) Lpc- Geo. —> @PFTOOTR 4= Jace) | (146307 Lpc_ GPT0L — root | = Creeoy [cree] ice? ]osee3) Jeet) | C125" Int 4, A> CLec- Geos — EP FTorIN 773) & 0x0) B= (Lec -Gpr04 > FaorIV 222) & OXI while 1) | { cA) { Lec_ 4Pto eG= 6,10. === Froern & aetHy reac =v 49; a) ; = 12ers Frc Geto —> Fsorin | oe 2 llee Gero. —? Eorrn ** ubc— (ued lec t = Lec -Gptoa —? FroPaN * ie Ur , t e @pro 4. — FROIN Be Ue ‘ oe = 1241 Lees G t10L =? pro pzN I= cezs 6 ipcia) { Lec-G eto. FA0PTN Lec- GPIor 7 Fropym A= ——— = tre: @ scanned with OKEN Scanner | i 6 ¥ 00000004 7 ~(0x006208) — alse. ; { UtC-4fto4—> FasPIn 4 ~Cleci)) Unt- GP204 —DFLOPIM |= () Le); veCtp) { ure -Gpror —? Faorrn [= oxcnoso0sg: UC. GPIo1—> FIOPTM = ~(0x C00 000044 J 5 5 2 99) Inter Pacing diagram sutch | se | dn = a @ scanned with OKEN Scanner Enbedded Cp_prgan| FP intlade. 2 lpclixxsh > Void aelay ms Caunsigned ink ms)y int main() (system Intec )y UC. 4p: Ax (LPC. GpIory FAGIIN 722-940) while C1) {if CA) x Uc &fTon F.T0p2N |= LOC — Gp tor — FIG PIN 4= a (ice) | 1A] delay (ooo); Uc-Gprow —? FaoP. Le Geto. —> FAOPIN A= etree) (123 oe delay Coda); Upc. Gttor —> FtorTN f= (i424) Upc_GPto. FIoPIN &= tee) | ckhey Coco); 1. =p Fropag d=) FtoPAR |= (ew {cred Ider | (ccs); (igen); creel)! aw f= Ciecasy Creer) Jozosd: | Lec -Gpro2 > Frorzw [= Ceery | LPC~ GPto1 — Froftn 4= Meer) [lice facers}! @ scanned with OKEN Scanner Ls Ftonta |= Cee; > FTO gente ces) | | aos | ey Stepper moter intey Facing table SnteyPacing cVagramt- a sf eee nese 5 maker a | Alelc]o lave lc] ol ter valed tfolalofololole | axe t|C}| elo }olofolo | ‘ores oO} \{ O}® | Oo] Jo Jor] ii oxo SHEET OAR OOH ONPoKco Cee ote tel Worse ofe{i | felololo tl axse oO of: lolololo LO pea TEIISS [EIS [as OMANI ROR C ofeltlalolo Fen COCA Reon mera O olofolefoltifo fo] «roy | @ scanned with OKEN Scanner Ermbedded C_ Prograny HF include CAPC Mex h? vid ciplayems Cansigned integer re int main ©) £ Syston ait OF eco) 10-29 ED Lec Gol TOOSA &° toc 4102 Faypae |= (ox coctoo FE) fen CLP GPO —rFasean 779) £0 | | | int ab6)= f oxeo, xl, wo, OG orle, Orb) | | axe, Ox'ty OXO8, oxoceay | while C) C Lpc- Go! —> FrOPa ere) { Lec 6°70! — > FlorIN “eel Lec Gez0l > Frora 1 | ie LIK) | L fy Cinbizay 93 44) Lec Geter > FLOPaN [= ny ke ILD) foeeg), (ie eos ac). detay ms C1000) | 3 ee, L vec. p10 | —? FIOPIN 4 = o(Key ucel} Lec PTO a 2 FPOPEN I> iF Cte) X by G4; Pai its) | bec Goro. > Fror2y [> delay € ms Coot); @ scanned with OKEN Scanner

You might also like