Write a program that generates TMR0 interrupt signal every 65.5msec. (oscillator frequency is 4MHz) Also handle the interrupt and the interrupt subroutine properly. WDT is a timer, and it has a separate built-in low power oscillator. Its main purpose is to reset the program at overflow. On reset, the program starts from the beginning. Also, by resetting it can wake up a sleeping MC. When a wakeup happens, the program continues from last CLRWDT command. In program WDT can be cleared using CLRWDT command. Pre-Scale Value (PSV) is also applicable to WDT as shown in the datasheet. When PSV is 000 from CLRWDT to overflow WDT takes 18ms. For WDT to work, WDT must be turned on at configurations. When in sleep mode the Micro Processor (MC) stops most of its processes to minimize power consumption. It is important for battery-powered systems. Command SLEEP is to make MC enter Sleep Mode. There are three ways to exit a sleep mode: Manual Reset, External Interrupt Trigger (INTF becomes 1), and WDT overflow. Write a program that contains interrupt subroutine for RB4-RB7 interrupts. In your program your processor sleeps and when an interrupt is received from RB4-RB7 it wakens up and toggles RB0 and goes to sleep mode again. Write the following program. Your processor wakens up every 72msecs and scans PORTA for any input. If an input is available, it activates the alarm device at RB0. Report: It can be written on paper or on a computer (I prefer it to be written on a computer). The report will include: Student Name, Surname, and ID. Calculations Flowchart of the software.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

 

  • Write a program that generates TMR0 interrupt signal every 65.5msec. (oscillator frequency is 4MHz)
  • Also handle the interrupt and the interrupt subroutine properly.

WDT is a timer, and it has a separate built-in low power oscillator.

  • Its main purpose is to reset the program at overflow. On reset, the program starts from the beginning.
  • Also, by resetting it can wake up a sleeping MC. When a wakeup happens, the program continues from last CLRWDT command.
  • In program WDT can be cleared using CLRWDT command.
  • Pre-Scale Value (PSV) is also applicable to WDT as shown in the datasheet. When PSV is 000 from CLRWDT to overflow WDT takes 18ms.
  • For WDT to work, WDT must be turned on at configurations.

When in sleep mode the Micro Processor (MC) stops most of its processes to minimize power consumption. It is important for battery-powered systems.

  • Command SLEEP is to make MC enter Sleep Mode.
  • There are three ways to exit a sleep mode: Manual Reset, External Interrupt Trigger (INTF becomes 1), and WDT overflow.
  • Write a program that contains interrupt subroutine for RB4-RB7 interrupts. In your program your processor sleeps and when an interrupt is received from RB4-RB7 it wakens up and toggles RB0 and goes to sleep mode again.
  • Write the following program. Your processor wakens up every 72msecs and scans PORTA for any input. If an input is available, it activates the alarm device at RB0.
  • Report: It can be written on paper or on a computer (I prefer it to be written on a computer). The report will include:
  • Student Name, Surname, and ID.
  • Calculations
  • Flowchart of the software.
  •  
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Embedded software development
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education