Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using HCS12, write a C program 5) 7 marks] A push button is connected to IRQ pin to trigger interrupts. When the button is pressed,

Using HCS12, write a C program

image text in transcribed

5) 7 marks] A push button is connected to IRQ pin to trigger interrupts. When the button is pressed, one seven-segment display counts for 10 second before a device is activated. The display should count from 9 to 0 and then the device is activated by outputting 1 to pin 1 of port T. when the count reaches 0, it should display zero and when the button is pressed it counts again from 9 to 0. If the switch is pressed before the counting reaches 0, the counting should be paused. When pressed again, the counting is resumed. Write a C program. A hint: using RTI may make the solution easy When IRQ is interrupted: (1) if the count = 0, enable RTI interrupt to count from 9 to 0 and when the count = 0 RTI interrupt should disable itself. (2) if the count is not 0 (the counting is running), then toggle the status of RTI interrupt: disable it if it is enabled or enable it if it is disabled. 5) 7 marks] A push button is connected to IRQ pin to trigger interrupts. When the button is pressed, one seven-segment display counts for 10 second before a device is activated. The display should count from 9 to 0 and then the device is activated by outputting 1 to pin 1 of port T. when the count reaches 0, it should display zero and when the button is pressed it counts again from 9 to 0. If the switch is pressed before the counting reaches 0, the counting should be paused. When pressed again, the counting is resumed. Write a C program. A hint: using RTI may make the solution easy When IRQ is interrupted: (1) if the count = 0, enable RTI interrupt to count from 9 to 0 and when the count = 0 RTI interrupt should disable itself. (2) if the count is not 0 (the counting is running), then toggle the status of RTI interrupt: disable it if it is enabled or enable it if it is disabled

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Probabilistic Databases

Authors: Dan Suciu, Dan Olteanu, Christopher Re, Christoph Koch

1st Edition

3031007514, 978-3031007514

More Books

Students also viewed these Databases questions