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

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 26
3.2.8
Lesson 8 shows the reversible LEDs but with the Delay Loop rewritten as a function.
New Instructions
Functions or Subroutines are invoked with the CALL instruction and terminated with a
RETURN or RETLW instruction. RETURN jumps back to the original program at the
location following the CALL. RETLW also returns to the calling program, but loads Wreg
with a constant.
The mid-range PICmicro MCU device’s CALL stack can hold up to 8 return addresses.
If a ninth CALL is made, it will overwrite the first one and then the program will not be
able to RETURN all the way back.
Passing Arguments
Arguments to the subroutine may be passed in a number of ways. Wreg is a convenient
place to pass one byte and the FSR may be used to pass another byte, if not otherwise
used. If more data must be passed, a buffer must be allocated.
When the Delay function is pulled out to a subroutine, the ADC result is moved into
Wreg, then the CALL transfers control to the Delay subroutine. The RETURN transfers
control to the MOVLW following the CALL.
EXAMPLE 3-7:
; Delay function.
; Delay time is Wreg value * 771 uS
Delay
DelayLoop
CALL
RETURN
RETLW
MOVF
CALL
...
GOTO
MOVWF Delay2
DECFSZ Delay1,f
GOTO
DECFSZ Delay2,f
GOTO
RETURN
Lesson 8: Function Calls
ADRESH,w
Delay
xxx
DelayLoop
DelayLoop
FUNCTION CALL EXAMPLE
Invokes functions or subroutines
Terminates functions or subroutines
Terminates functions or subroutines
;call delay function
;returns here when done
© 2005 Microchip Technology Inc.

Related parts for DM164120-1