Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Description:- This program uses TMR0 to generate a 100mSec delay using interrupts. A pushbutton (PB0), connected to pin RA0 of the PIC16F188, is used start

image text in transcribed

Description:- This program uses TMR0 to generate a 100mSec delay using interrupts. A pushbutton (PB0), connected to pin RA0 of the PIC16F188, is used start a mSec timer (i.e. a variable that is incremented every 100mSec ) whose value is displayed on an LCD screen. Another pushbutton (PB1) is used to reset the mSec timer. LED0 is used to indicate that the mSec timer is running (i.e. incrementing) while LED1 toggles on/off every 100mSec from within the interrupt service routine (ISR). *See LAB_7B_TMR0_INT_Delay_100mSec for details of a very similar program \[ \begin{array}{l} \text { Tdelay }(8 \text { bit Timer })=\text { Tosc } * 4 * N *(256-\text { TMR0_Init }) * \text { count } \\ \text { Tosc }=\frac{1}{\text { Fosc }}=\frac{1}{19.6608 \mathrm{e} 06} \\ \text { Tdelay }=\frac{1}{19.6608 \mathrm{e} 06} * 4 * 256 *(256-16) * 8=0.1 \mathrm{Sec} \end{array} \] Description:- This program uses TMR0 to generate a 100mSec delay using interrupts. A pushbutton (PB0), connected to pin RA0 of the PIC16F188, is used start a mSec timer (i.e. a variable that is incremented every 100mSec ) whose value is displayed on an LCD screen. Another pushbutton (PB1) is used to reset the mSec timer. LED0 is used to indicate that the mSec timer is running (i.e. incrementing) while LED1 toggles on/off every 100mSec from within the interrupt service routine (ISR). *See LAB_7B_TMR0_INT_Delay_100mSec for details of a very similar program \[ \begin{array}{l} \text { Tdelay }(8 \text { bit Timer })=\text { Tosc } * 4 * N *(256-\text { TMR0_Init }) * \text { count } \\ \text { Tosc }=\frac{1}{\text { Fosc }}=\frac{1}{19.6608 \mathrm{e} 06} \\ \text { Tdelay }=\frac{1}{19.6608 \mathrm{e} 06} * 4 * 256 *(256-16) * 8=0.1 \mathrm{Sec} \end{array} \]

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_2

Step: 3

blur-text-image_3

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

Database Modeling And Design

Authors: Toby J. Teorey, Sam S. Lightstone, Tom Nadeau, H.V. Jagadish

5th Edition

0123820200, 978-0123820204

More Books

Students also viewed these Databases questions

Question

=+19.1. Suppose that u(12) and fe L". Show that IfIl, Ilfilo.

Answered: 1 week ago