After-03 - if(SW4==DOWN&&(mode==0 || mode==2 || mode==1 mode=1 LED4=ON displayLEDs count mainLoop JSR updateDISPLAY mode1 BRSET 7,PTAD,chk1

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
Background image of page 1

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

View Full DocumentRight Arrow Icon
Background image of page 2
Background image of page 3

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

View Full DocumentRight Arrow Icon
Mode 1 - Reset/Initial ± All LED's are OFF. ± SW4 is pressed - enter Mode 2. ± Ignore any button presses other than SW4. Mode 2 - Start ± LED4 is ON. ± LED1, LED2, LED3 count up in Binary, about once every second. ± SW3 is pressed - enter Mode 3. ± Ignore any button presses other than SW3. Mode 3 - Stop ± LED4 is OFF. ± LED1, LED2, LED3 remain showing last value. ± SW4 is pressed - enter Mode2. ± SW3 is pressed - remain in Mode3 ± Any other button presses (SW1, SW2) - enter Mode 1
Background image of page 4
Background image of page 5

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

View Full DocumentRight Arrow Icon
Background image of page 6
Background image of page 7

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

View Full DocumentRight Arrow Icon
Background image of page 8
Background image of page 9

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

View Full DocumentRight Arrow Icon
Background image of page 10
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: if ( (SW4==DOWN && (mode==0 || mode==2)) || mode==1 ) { mode=1; LED4=ON; displayLEDs(); count++; } mainLoop: JSR updateDISPLAY mode1: BRSET 7,PTAD,chk1 ; Check if SW4 is pressed BRSET 0,MODE,count ; Check if mode0 BRSET 2,MODE,count ; Check if mode2 chk1: BRCLR 1,MODE,mode2 ; Check if mode1 count: INC COUNT ; count++ CLR MODE ; set mode=1 BSET 1,MODE...
View Full Document

This note was uploaded on 10/07/2009 for the course CPEG 222 taught by Professor Robb,b during the Fall '08 term at University of Delaware.

Page1 / 10

After-03 - if(SW4==DOWN&&(mode==0 || mode==2 || mode==1 mode=1 LED4=ON displayLEDs count mainLoop JSR updateDISPLAY mode1 BRSET 7,PTAD,chk1

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online