CodingReview - Code Review Problems Turn on LED Read in...

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

View Full Document Right Arrow Icon
Code Review
Background image of page 1

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

View Full DocumentRight Arrow Icon
Problems Turn on LED Read in switch value Pull up resistors LED shifting with dly Make sounds using timers PB5, OC1A, use mode with ICP1 as TOP and set OC1a to toggle each OVF
Background image of page 2
Start Init Stack Init I/O Init Timer1 Detach Pizo Attach Pizo Joystick Pressed ? NO YES
Background image of page 3

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

View Full DocumentRight Arrow Icon
Initialize: ldi r16, low(RAMEND) ;configure stack register out SPL, r16 ldi r16, high(RAMEND) out SPH, r16 call CONFIG_IO call CONFIG_TMR1 main: in r16,PINB ; check for joystick press andi r16, (1<<PB4) cpi r16,0x00 brne PB4_ON call TMR1_ON rjmp main PB4_ON: call TMR1_OFF rjmp main Start Init Stack Init I/O Init Timer1 Detach Pizo Attach PIzo Joystick Pressed ? NO YES
Background image of page 4
PORTB register is for: A. Reading the value of the inputs on port B B. Setting output values and pull up resisters C. Determining the direction of I/O pins D. Toggling output values [Default] [MC Any] [MC All]
Background image of page 5

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

View Full DocumentRight Arrow Icon
PINB is used for: A. Reading the value of the inputs on port B B. Setting output values and pull up resisters C. Determining the direction of I/O pins D. Toggling output values [Default] [MC Any] [MC All]
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 8

CodingReview - Code Review Problems Turn on LED Read in...

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

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