ECE 3551-Lab4

ECE 3551-Lab4 - be turn off), and all the other LEDs will...

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

View Full Document Right Arrow Icon
ECE 3551 MICROCOMPUTER SYSTEMS 1 Lab 4—Learn more event handling in embedded system OBJECTIVE: Learn more event handling in embedded system Learn to write Interrupt Service Route (ISR) Create the Project 1. Before power on the board , make sure that switch SW9 pin1,pin2, pin3, pin4 are turned on. 2. Open this project you created in Lab #3 in Visual DSP++. Modify the Project 1. In Lab #3, three buttons were used to control the LEF4-LED9. When Pushing PF8, change the direct of moving light When pushing PF9, decrease the speed of moving light When pushing PF10, increase the peed of moving light 2. In this lab, we need add another button PF11 to control the lighting pattern of LEDs:
Background image of page 1

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

View Full DocumentRight Arrow Icon
(1) When you pushing PF11 once, The LED4 (the left most one) will be turn on (it will not be turn off), and all the other LEDs will move. (2) When you pushing PF11 twice, The LED9(he right most one) will be turn on (it will not
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: be turn off), and all the other LEDs will move (3) When you pushing PF11 the third time, all LEDs will move as the case in Lab #3. (4) When you pushing PF11 again, the pattern will go back to the case (1), and so on Some Hints All button interrupts are through IVG12, so actually, pushing any button, the same interrupt will generate. To differentiate which button is pushed, you can read the value of *pFIO_FLAG_C. If button PFn is pushed, the corresponded bit (nth bit) of *pFIO_FLAG_C is 1, the other bits are 0. For details see chapter 14 PROGRAMMABLE FLAGS in ADSP-BF533 Blackfin Processor Hardware Reference manual. In each ISR, one need to confirm interrupt handling (Clear the interrupt) You should modify the ISR for timer0 this time. The register * pFlashA_PortB_Data will control which LED will be lit on. Lab report is needed for this lab....
View Full Document

Page1 / 2

ECE 3551-Lab4 - be turn off), and all the other LEDs will...

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

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