Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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


Mollele SSD 4U1 13 OSC1/CLKI MCLRIVPP RCOTIOSO/T1CKI RC1/T1OSI RC2/CCP1 RC3/SCK/SCL RCAISDVSDA RC5/SDO RC6/TX/CK RC7/RX/DT 2  

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.

Step by Step Solution

3.48 Rating (155 Votes )

There are 3 Steps involved in it

Step: 1

include sbit buttonP10 Push Button pin declared sbit button1P12 Reset b... 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

Modern Control Systems

Authors: Richard C. Dorf, Robert H. Bishop

12th edition

136024580, 978-0136024583

More Books

Students also viewed these Accounting questions