ECET 340 Week 3 HomeWork 3

Published on July 2017 | Categories: Education | Downloads: 62 | Comments: 0 | Views: 687
Download PDF   Embed   Report

ECET 340 Week 3 HomeWork 3 Click Below Link To Purchase www.foxtutor.com/product/ecet-340-week-3-homework-3 1. Sketch a circuit that can be used to debounce a pushbutton and explain how it works. (4 points max) 2. In Figure 7.32 on page 339 of the Huang textbook, if the row has and the columnsare , which key is pressed? (2 points max) 3. In Figure 7.32 on page 339 of the Huang textbook, explain why the 10kΩ resistors ties to VCC are required. (2 points max) 4. Write down the lines of C code (interrupt service routine, ISR) that generates an interrupt when Port H pin 0 becomes a logic “1”. Within this ISR, disable interrupts, clear the interrupt flag, then enable interrupts, and return from routine. I also want the routine or lines of C code that initialize Port H pin 0 to be used as an interrupt (hint: think data direction register) (2 points max) 5. Write down the C statements you would need to add to the main program of the keypad driver program given in lecture and lab in order to store the key characters to a buffer area of memory called keys_entered and exit the program as soon as either seven keypresses are entered or the the “D” key is entered. (Counts as two questions) (4 points max….you need to use arrays in C code) 6. State the functions of pins RS, E and R/W in the LCD. (4 points max) 7. Give the state of RS, E and R/W~, and the command code (in hex) for the 20th location, line 2 on the 40x2 LCD described in lecture. (2 points max)

Comments

Content

ECET 340 Week 3 HomeWork 3 Click Below Link To Purchase www.foxtutor.com/product/ecet-340-week-3-homework-3 1. Sketch a circuit that can be used to debounce a pushbutton and explain how it works. (4 points max) 2. In Figure 7.32 on page 339 of the Huang textbook, if the row has and the columnsare , which key is pressed? (2 points max) 3. In Figure 7.32 on page 339 of the Huang textbook, explain why the 10kΩ resistors ties to VCC are required. (2 points max) 4. Write down the lines of C code (interrupt service routine, ISR) that generates an interrupt when Port H pin 0 becomes a logic “1”. Within this ISR, disable interrupts, clear the interrupt flag, then enable interrupts, and return from routine. I also want the routine or lines of C code that initialize Port H pin 0 to be used as an interrupt (hint: think data direction register) (2 points max) 5. Write down the C statements you would need to add to the main program of the keypad driver program given in lecture and lab in order to store the key characters to a buffer area of memory called keys_entered and exit the program as soon as either seven keypresses are entered or the the “D” key is entered. (Counts as two questions) (4 points max….you need to use arrays in C code) 6. State the functions of pins RS, E and R/W in the LCD. (4 points max) 7. Give the state of RS, E and R/W~, and the command code (in hex) for the 20th location, line 2 on the 40x2 LCD described in lecture. (2 points max)

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close