DM163035+TEFLCST3 Microchip Technology, DM163035+TEFLCST3 Datasheet - Page 60

no-image

DM163035+TEFLCST3

Manufacturer Part Number
DM163035+TEFLCST3
Description
KIT, PICDEMLAB+FLOWCODE-HOME BUNDLE/
Manufacturer
Microchip Technology
Datasheet

Specifications of DM163035+TEFLCST3

Kit Contents
Component Kit, PICDEM Lab Development Board, PICkit 2 Programmer/ Debugger, CD Containing User Guide
Svhc
No SVHC (15-Dec-2010)
Development Tool Type
Hardware / Software - Dev
Silicon Manufacturer
Microchip
Core Architecture
PIC
Core Sub-architecture
PIC10, PIC12, PIC16
Silicon Core Number
PIC10F, PIC12F, PIC16F
Silicon Family Name
PIC10F2xx, PIC12F6xx, PIC16F6xx
Rohs Compliant
Yes
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
PICDEM
DS41381A-page 56
TM
2.4.4.4
The LEDs connected to the individual PORTC pins should flash ON/OFF sequentially
from right-to-left in 1-second intervals while the push button is released. Pressing the
push button will change the ON/OFF flashing to left-to-right.
2.4.5
2.4.5.1
To configure the peripherals used in this lab, the following registers are used:
1. Interrupt Control Register: INTCON (Register 2-3 in Section 2 of the PIC16F690
2.4.5.2
This lab expands upon the previous lab by adding a push button interrupt that will
handle the modification to the direction variable that determines the direction of the
sequential shift of the flashing LEDs connected to the PORTC pins. The Shift macro
created in the previous lab will also be used by importing the macro into the current
Flowcode project. In the previous lab, the PORTA<RA2> was checked each time
through the Software Control loop for a change in voltage level signifying a push button
press. This is a method known as “Polling”. Polling a bit is a common method to check
the status of a register bit. However, checking a bit in this manner can only be done
when the Software Control loop execution reaches that point in firmware. Sometimes
this may not be sufficient to the application which brings up the use of interrupts.
Interrupts provide a means of signalling the processor that a task must be performed
immediately. Imagine an emergency shut-off switch on a piece of machinery. In this
scenario, the machinery must respond without delay when the switch is activated. To
accomplish this task, assuming a microcontroller is integrated into the application, an
interrupt is used. When the Central Processing Unit (CPU) on the microcontroller
receives notification of an interrupt, it immediately stops whatever it is doing and “ser-
vices” the interrupt. Servicing the interrupt involves executing user defined code that
has been associated with a particular interrupt in firmware. Using the emergency
shut-off switch example, the CPU may currently be executing code necessary in the
operation of the machinery. When the emergency shut-off switch is pressed, the CPU
receives the interrupt notification and immediately stops its current task to execute the
interrupt specific code that will stop the machinery.
Typically, each peripheral on a PIC
is triggered due to a specific event. The GPIO peripherals on the PIC16F690 have a
number of interrupts that can be triggered via a number of events such as a change in
the voltage level on a particular port pin as would be the case if a push button
connected to that pin were pressed. Other events that trigger interrupts associated with
different peripherals on the PIC16F690 include a change on the output of the
comparator peripheral or the completion of a conversion using the Analog-to-Digital
Converter (ADC), to name but a few.
Lab Flowcode Companion Guide
- This register contains various enable and flag bits for a variety of peripheral
Note:
data sheet)
interrupts including:
- TMR0 overflow
- PORTA interrupt-on-change and external RA2/INT pin interrupt.
TESTING THE APPLICATION
Lab 5: Adding an Interrupt and Importing Macros for a Push
Button Interface
NEW REGISTERS USED IN THIS LAB
OVERVIEW
Flowcode will automatically configure these bits in the background so that
the user does not have to.
®
device will have an interrupt associated with it that
© 2009 Microchip Technology Inc.

Related parts for DM163035+TEFLCST3