mt1.sol - ECE 367 Spring 2008 Midterm 1(Print LAST Name...

Info icon This preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
Image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ECE 367 Spring 2008 / Midterm 1 (Print) LAST Name FIRST Name Signature : go i Uclzi 0.0 g; UID# 1) Sketch how to connect two 8-bit latches (having pins for: 8-data lines, Vcc, Gnd, (OE)’ (NOT output enable, try-state), and LE (latch enable)-to a Stampll microcontroller so that 8-bit data could be sent from either latch to the controller. Be careful. This is INPUT TO THE CONTROLLER not output. Sketch and Clearly Explain the operation of your circuit. Be sure to show how to connect all 12 pins of each latch. (10 points) NOTE Burt-H 5E (10qu Be Lama—f 5mMe_ lime 13 pdge AS 1:0 La‘EcL inuTDm‘Em iMTo bat-l» LQJECLG—S 2)SETIOFC3 Low‘toPeml Lot-irate l OMITPLLT $E'T‘ Pi-(o (4:61" ”to P934 Lodge)“ 0 OwT‘PtL—l— 537—1 0 Renal. Dacha. Meat Vow—"D ) $1.9th %\A‘.~l—‘t lo?! 1L) (LLe-mrloi‘iE <9 anvil CSLNCL éaoeeé‘bma” \ LL)(RQ.4L& (Pow—T P‘s‘ (ll-M4 'CLeav 331:3 2’7 cwd ebb "mm”ro Q€S¢["l:, C‘r‘o‘i: iT’i‘NZ 2) A periodic pulse signal has an average value of 4.8 volts . If this signal is being produced at an output pin of a CMOS microcontroller with a power supply V00 2 6.5 volts then what is the value of the Duty Cycle for this pulse? 4 8 I 2&4 47,5:4I8‘fi7'm79: 2:3 [00 CE 367 Midterm 1 Spring 2008 I 3) Give the full name of the type of addressing mode used in each on the following instructions: (5 points) a.) LDS $40 l) {reds b) CPY #$2390 :MM 9. i ”be c) SUBA $22,): deeé X . 4) What is the purpose for having tri—state output on logic 10’s? (5 points) ll: ‘lzooo Our— Mowa OUL'E’ {Du—1: Cc) um act £0 (“.3 Laura er wetter Same Lime owl, one Dig-em” Out—pats (Laud league, access 5d: ifiimi, Sei‘hfia 75M: carbine» odepkfics “to i':v~i~s-l:acl:e'm¢9<la (High—7‘1- ) avoids Comteplziw OUQW'ELQ Lime. 5) Assume the code slice below has been assembled. Give a. listing of the Hex values stored in EEPROM memory after the code has been loaded. Carefully align the memory locations and Hex code. (10 points) ORG $12000 TO FW¢ gvmc’lm €39me LDAA #$0A 3e cola \Joclue. Mote: that #:La LOOPI 33:3 #$BC :5; M as, a mafia- os; emu DECA AH warmed—{‘90 + NOP 0‘ it a?“ layfes 0—Y- opemmls BNE LOOPI Zco i=0: 0 “dare” HERE BRA HERE 1 0 PE 00 'H + tByres +2< :' Tau-136% ' =1 "T _ __ E000 9b X (“Pact £33?— #Bytcs 500! GA “3‘55 E002 cc E005 BC 5004 01 E005 4F! Target— EoOé» 0! J, E007 2(0 EOO7~+Z+><= Eooz 500? For . (900x :_ EoonEOO7”Z 5000! 2,0 '- n =3 "7 $7 For ,_ .. coo - 2 +2< : 2 500 H- i’“ I; 3, + I 00C; CE 367 Midterm 1 Spring 2008 6) Assume bit PCO of PORTC of a SSHCII microcontroller is configured for output. For the code slice ' below determine: 1. The frequency of the waveform produced at P00 P63, (:qu t LL41“ tLd ii. The duty cycle of the waveform produced at P00 04:1“ LL04 OP ewai: loxJ V96 L1H“ Assume an 8MHZ crystal. #0. yr. Ou‘r putt" 5': ow 0J0 9? d (10 points) as e LOOP LDAA $01 2 NOP # a Low kflptews ow {:keLast NOP 2 kill: (’35.: L—Lue. LQST—cygla STAA $1003 4 04‘— Hla Od‘ “A a. N0? 2 LDAA #3100 2 H i 3L STAA $1003 4 NOP Z L BRA LOOP 3 0” 1 L) lfiycle '3 OngSec = ©,52</o 000 2%Cyc X G¢Sx/o‘53e%ycz //,S‘2<‘/o = . . T ___g__ _. LL) 5C7!) : $X‘Z00 " lax/oo‘lglfl785fio 7) Assume the the SP1 system ihas been appropriately enabled.’ Write a short STAMPll assembly code slice that will output (as serial data at pin MOSI of the STAMPll) ten bytes of data located from $F000 to $F009. (15 points) k3?» Dome, EEEOVAJ clawé E 62 003 LDY Rengc LDX #$ F¢¢¢ 3 Ifldex X '-"- begluulsa a‘fr'DoChLlea/Lle Loo? Liana $¢>¢)X : Get I‘W tableudwe $‘THR Sr'bKY 3 “with; SPIbm-s 1% aaromwcdgv Qtocwi‘s Serial Duff—pai— uEKE BRCLR s PSR) Y 3 so) Hams; "Danae 31>: H1? wa 3 mdLKe X Point” "TO Mex—I: t‘bble VAltLe CPX 1:113 F¢gfiflrg NEE-lax: dalue BRE 'DouoE EWo—pCJA l-gdoue A Two Loop SMue‘FUOT‘ba clove Sc) 3e?“ Mex?” fable value DOME “BRA 9K 1 are? CE 367 Midterm 1 Spring 2008 8) Sketch an asynchronous serial signal frame that has one start bit, one stopbits, eight data bits and " one parity bit (for odd parity). Assume the data is $3B. Label all significant components.(10 points) $58 = 00/ ”(91/ => “Pa““rf lair 3:0 M533 441.33 (a1 read}; l/Laiud field COLMJT‘Q‘Y“ 15') idle. - lea p l l o a | l o o l o ' I l . 4‘ I ll fists “18% ‘tSV‘oa BET S‘l‘ckw‘l: F) g”. loom?) lam-2a 9) Write a Stampll assemble program that will read in a 4—bit BCD value (for integer digits 1 to _9 only) at pins PAD, PA], PAZ, and PA3, and output an 8-bit value of (the square of the input integer + 3) at PortD and pins PAS, PA? of PortA. The solutions to the (square + 3) of the input integer should be extracted from a lookup table (la the solutions are not calculated. The beginning of the lookup table is to be located at address $F000. Assume that a logic IGH value at PAS indicat that a new BCD value has been input to PortA pins and the solution ifiing requested.(15 points) kgcsutwce Stauclowd EQUOS Thb is 91/ 9/, LDY flRegkage 'P/QS’ IX our aqua %HW:LDHE> PORTH) V E (SQ‘F \BL'D \Jccluce Lawauel “HUB #l’ OF 3 (Lirew M?F6W4 lor'Ts Lb ><' #511 F000 ’, Load. >< Hal‘s/unrated Milli: HBX gx Mow lnocs soch‘ElaM I‘chlM, Lpsa $00M 3 MT QOlUCl‘loo $THR POR+D,Y '3 CWT—pot)” {a 1997' a“!- Paul-b Poms H=$C¢ ‘, ecq-ssn— ,2 M315 47‘ Pam-14 sites 3‘90??ij 'Ehis cLeaws (a L: a} as: is? a as T“? chB $05)[email protected]$07) 0e? SEES—1‘08. %ahl30qlmeg jugr Lille eXmQQV‘l'Mm‘E/Wé Z (MAB ' “1—._.—-———-."=__.__.. SE 367 Midterm 1 Spring 2008 10) Show how to connect a 16 key (standard 4 column by 4 row matrix keypad) to a microcontroller using a minimum number of data lines. Include all required hardware including any needed resistors. Explain your implementation. How would we know if the key in column 2 row 3 has been selected (i.e. pressed?) No code is necessary. Just explain. (10 points) M C, 2744- AMV) ®€codev~ . ' Egon: - «:9 m m 4 x 4 H3 3 ’L O ColmMfiS gen) (iv-c \ Mi Ciro Co~+u0['faw> R1314. 367* TO OLL‘VFDOLLUé ioJ'S Pro ge-T— “'wa IM%BWN& ‘ ? Set H5 Phi 7‘ I¢ (b?) 1-Hl6L‘> Sell: pi! Phi : ‘0 (4" :I1 2 CD[LL“’L)OZU0LlU.€_> Lgr liex/ ITIS @weeSP/cl Frail l 3r [29.7, M” Pressed Pro :0 so) lZeoud A9 J Uses em 5 no uses 1 ...
View Full Document

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern