A PIC18F458 microcontroller is connected to a seven-segment displays (SSD), a bi-colour LED (DI), an emergency...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
A PIC18F458 microcontroller is connected to a seven-segment displays (SSD), a bi-colour LED (DI), an emergency push button (EM) and a reset push button (RST), as shown in Figure 2. At the beginning, the SSD displays number 0 and LED DI shows green colour, indicating normal operation. When the emergency push button EM is pressed, an interrupt is triggered and the PIC18 enters the interrupt service routine (ISR). In the ISR, the SSD displays a letter E and LED DI turns to red colour indicating an emergency state. The PIC18 stays in the emergency state until the RST push button is activated. The PIC18 then exits the ISR and returns to normal operation, where the SSD continues to display number 0 and LED DI shows green colour. Write a complete PIC18 assembly program to implement the design. Configure the push button EM as a high priority interrupt with proper edge trigger. The ISR must start at address Ox03000, and must be labelled as ISR_INT2. SD U1 13 OSC1/CLKI 15 RCOT1OSO/T1CKI 1 MCLRVPP 16 RC1/T1OSI RC2/CCP1 RC3/SCK/SCL RCA/SDVSDA RC5/SDO RC6/TX/CK RC7/RX/DT 17 18 D1 RAOIANO/CVREF RA1/AN1 23 LED-BIRG 24 25 R1 R2 RA2/AN2/VREF- RA3/AN3VREF+ 4.7k 4.7k 6. RA4/TOCKI RASIANA/SSILVDIN 26 14 19 RAG/OSC2/CLKO RDO/PSPO/C1N+ RD1/PSP1/C1N- RD2/PSP2/C2N+ RD3/PSP3/C2N- RD4/PSP4/ECCP1PIA RD5/PSPSP1B 20 33 34 21 EM RBOVINTO RB1/INT1 RB2/INT2/CANTX RB3/CANRX 22 35 36 37 38 39 27 28 29 30 RST RB4 RB5/PGM RB6/PGC RD6/PSP6P1C RD7/PSP7P1D 40 REO/RDIANS RE1WRIC1OUTIANS RE2/CS/C2OUTIAN7 RB7/PGD 10 PIC18F458 Figure 2: Schematic diagram for Question 3. [20 Marks] Scan or snapshot your hand-written solution for Question 3, and compile it into one PDF file. Name the PDF file as EP0102855_Q3.pdf and submit to Moodle. A PIC18F458 microcontroller is connected to a seven-segment displays (SSD), a bi-colour LED (DI), an emergency push button (EM) and a reset push button (RST), as shown in Figure 2. At the beginning, the SSD displays number 0 and LED DI shows green colour, indicating normal operation. When the emergency push button EM is pressed, an interrupt is triggered and the PIC18 enters the interrupt service routine (ISR). In the ISR, the SSD displays a letter E and LED DI turns to red colour indicating an emergency state. The PIC18 stays in the emergency state until the RST push button is activated. The PIC18 then exits the ISR and returns to normal operation, where the SSD continues to display number 0 and LED DI shows green colour. Write a complete PIC18 assembly program to implement the design. Configure the push button EM as a high priority interrupt with proper edge trigger. The ISR must start at address Ox03000, and must be labelled as ISR_INT2. SD U1 13 OSC1/CLKI 15 RCOT1OSO/T1CKI 1 MCLRVPP 16 RC1/T1OSI RC2/CCP1 RC3/SCK/SCL RCA/SDVSDA RC5/SDO RC6/TX/CK RC7/RX/DT 17 18 D1 RAOIANO/CVREF RA1/AN1 23 LED-BIRG 24 25 R1 R2 RA2/AN2/VREF- RA3/AN3VREF+ 4.7k 4.7k 6. RA4/TOCKI RASIANA/SSILVDIN 26 14 19 RAG/OSC2/CLKO RDO/PSPO/C1N+ RD1/PSP1/C1N- RD2/PSP2/C2N+ RD3/PSP3/C2N- RD4/PSP4/ECCP1PIA RD5/PSPSP1B 20 33 34 21 EM RBOVINTO RB1/INT1 RB2/INT2/CANTX RB3/CANRX 22 35 36 37 38 39 27 28 29 30 RST RB4 RB5/PGM RB6/PGC RD6/PSP6P1C RD7/PSP7P1D 40 REO/RDIANS RE1WRIC1OUTIANS RE2/CS/C2OUTIAN7 RB7/PGD 10 PIC18F458 Figure 2: Schematic diagram for Question 3. [20 Marks] Scan or snapshot your hand-written solution for Question 3, and compile it into one PDF file. Name the PDF file as EP0102855_Q3.pdf and submit to Moodle.
Expert Answer:
Answer rating: 100% (QA)
include sbit buttonP10 Push Button pin declared sbit button1P12 Reset b... View the full answer
Related Book For
Posted Date:
Students also viewed these accounting questions
-
QUESTION 3 20 MARKS Michelle Mental is a registered psychologist. Over the past decade, she has established herself as the leading sports psychologist for top professional sportspeople in Melbourne....
-
Accounting Q4 Question completion Status: 3 4 SB 6 7 9 10 QUESTION 3 The following information relates to Questions 3:8. Suppose a research USLOMAS 20 3 4 54 6 7 8 9 10 10 TReport your answer as a...
-
Concord Fabricators produces protective covers for smart phones. Since the covers must be customized to each smart phone model, Concord uses a job order costing system. On September 1, the company...
-
The following were selected from among the transactions complete by Wild Adventures Company during December of the current year. Dec. 3. Purchased merchandise on account from Miramar Co., list price...
-
Differentiate the common barriers to trade.
-
Evaluate the integral. t sec 2 2t dt
-
Suppose Ironman, Inc., lost all of its inventory in a flood. Beginning inventory was \($43,000,\) net purchases totaled \($524,000,\) and sales came to \($875,000.\) Ironmans normal gross profit...
-
Outrageous Bubbles, Inc., produces multicolored bubble solution used for weddings and other events. The company's master budget income statement for March follows. It is based on expected sales...
-
Consider a wild rice producer in a competitive wild rice industry. Suppose that the demand for wild rice increases.Part 2What will be the adjustments made by the firm and the industry? ( Check all...
-
Southwestern University (SWU), a large state college in Stephenville, Texas, 30 miles southwest of the Dallas/Fort Worth metroplex, enrolls close to 20,000 students. In a typical town-gown...
-
Tunas Mekar Bhd has decided to venture into a new project with a UK based company. The capital required for this project is 12 million needed in 6 months' time. The company decides to borrow the...
-
Explain the role of robotics and smart factories in manufacturing, services, and supply chains.
-
What are some of the demographic differences one finds between foragers and food producers such as pastoralists and horticulturalists? Why do you think these differences exist?
-
Suppose banks install automatic teller machines on every street corner and, by making cash readily available, reduce the amount of money people want to hold. a. Assume the central bank does not...
-
What is the demographic-transition theory? Do you think that this model applies to all cultures in the world?
-
In each of the following, name the term defined or answer the question. Answers are listed at the bottom. 1. Logic used to calculate the needed parts, components, and other materials needed to...
-
Why do you suppose damages are very important to consider in negligence actions? How can damages shape a negligence lawsuit?
-
The figure shows a bolted lap joint that uses SAE grade 8 bolts. The members are made of cold-drawn AISI 1040 steel. Find the safe tensile shear load F that can be applied to this connection if the...
-
Consider the computer-compensated system when T = 1 and Select the parameters K and r of{z) when Select within the range 1 KG,(s10) D(z) = 0.3678
-
An armature-controlled DC motor is driving a load. The input voltage is 5 V. The speed at t = 2 seconds is 30 rad/s, and the steady speed is 70 rad/s when t . Determine the transfer function...
-
Consider the inverting operational amplifier in Figure AP2.9. Find the transfer function V0(s)/V1(s), Show that the transfer function can be expressed as where the gains KP, KI, and KD are functions...
-
What is predictive analytics?
-
What are the two biggest challenges associated with using big data?
-
How does data science software for programmers differ from data science software for business users?
Study smarter with the SolutionInn App