DM164120-1 Microchip Technology, DM164120-1 Datasheet - Page 18

BOARD DEMO PICKIT 2 LP COUNT

DM164120-1

Manufacturer Part Number
DM164120-1
Description
BOARD DEMO PICKIT 2 LP COUNT
Manufacturer
Microchip Technology
Type
MCUr
Datasheet

Specifications of DM164120-1

Contents
3 Boards (1 Populated, 2 Bare)
Processor To Be Evaluated
PIC16F690
Silicon Manufacturer
Microchip
Core Architecture
PIC
Core Sub-architecture
PIC16
Silicon Core Number
PIC16F
Silicon Family Name
PIC16F6xxx
Rohs Compliant
Yes
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With/related Products
28-pin PIC16C, 16F, 18C, 18F
Lead Free Status / Rohs Status
Lead free / RoHS Compliant

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
DM164120-1
Manufacturer:
Microchip Technology
Quantity:
135
Low Pin Count Demo Board User’s Guide
DS51556A-page 14
3.2.1
The first lesson shows how to turn on a LED. This is the PICmicro
version of “Hello World” and discusses the I/O pin structures.
New Instructions
The LEDs are connected to I/O pins RC0 through RC3. When one of these I/O pins
drive high, the LED turns on. The I/O pins can be configured for input or output. On
start-up, the default is input. The TRIS bits use the convention of ‘0’ for output and ‘1’
for input. We want digital output so these must be configured.
EXAMPLE 3-1:
Now lets look at the program that makes this happen.
For more information, refer to the I/O Ports Section of the PIC16F685/687/689/690
Data Sheet (DS41262).
; PICkit 2 Lesson 1 - 'Hello World'
;
#include <p16F690.inc>
_MCLRE_OFF & _CP_OFF & _BOD_OFF & _IESO_OFF & _FCMEN_OFF)
Start
BSF
BCF
;
#include
__Config
Org 0
BCF TRISC,0
BSF PORTC,0
GOTO $
__config (_INTRC_OSC_NOCLKOUT & _WDT_OFF & _PWRTE_OFF &
org 0
BSF
BCF
BCF
BSF
GOTO
end
Lesson 1: Hello World (Light a LED)
STATUS,RP0
TRISC,0
STATUS,RP0
PORTC,0
$
PICkit 2, LESSON 1: “HELLO WORLD”
Bit set
Bit clear
Starts a comment. Any text on the line following the semicolon
is ignored.
Brings in an include file defining all the Special Function
Registers available on the PIC16F690. Also, it defines valid
memory areas. These definitions match the names used in the
device data sheet.
Defines the Configuration Word. The labels are defined in the
p16F690.inc file. The labels may be logically ANDed
together to form the word.
Tells the assembler where to start generating code. Code may
be generated for any area of the part. Mid-range PICmicro
microcontroller devices start at address ‘0’, also called the
Reset vector.
Tells the processor to clear a bit in a file register. TRISC is the
Tri-state register for pin 0 of PORTC. A ‘1’ in the register
makes the pin an input; a ‘0’ makes it an output. We want to
make it an output, so the bit must be cleared.
Tells the processor to set pin 0 of PORTC. This will force the
I/O pin to a high condition turning on the LED.
Tells the processor to go to the current instruction.
;select Register Page 1
;make I/O Pin C0 an output
;back to Register Page 0
;turn on LED C0
;wait here
© 2005 Microchip Technology Inc.
®
microcontroller
®

Related parts for DM164120-1