MCP2150-I/PGRVB Microchip Technology, MCP2150-I/PGRVB Datasheet - Page 20

no-image

MCP2150-I/PGRVB

Manufacturer Part Number
MCP2150-I/PGRVB
Description
IrDA protocol handler plus endec for DTE Apps, -40C to +85C, 18-PDIP , TUBE
Manufacturer
Microchip Technology
Datasheet
MCP2150
EXAMPLE 2-1:
DS21655B-page 20
;#define
;#define
;#define
;#define
;
;*****************************************************************
; String Table
; This table stores a string, breg is the offset.
; is terminated by a null character.
;*****************************************************************
string1 clrf
;
UpdateID
;
ctsLP1
movf
addwf
DT
DT
call
bcf
bsf
bcf
call
bsf
clrf
call
btfss
goto
decfsz LoopCnt, F
goto
goto
dtr
cts
rts
clr
PCLATH
breg, W
PCL, F
D'15'
"My IR ID String"
deviceInit
clr
dtr
rts
delay1mS
clr
LoopCnt
delay1mS
cts
ctsLow
ctsLP1
StuckReset
PIC16FXX Code to Program the Device ID
PORTx, Pinx
PORTx, Pinx
PORTx, Pinx
PORTx, Pinx
; this routine is on page 0
; get the offset
; add the offset to PC
; the first byte is the byte count
; Initialize the PIC16Fxxx
; place the MCP2150 in reset
; Force the DTR pin high for program mode
; Force the RTS pin low for program mode
; delay for 1 ms.
; allow the MCP2150 to come out of reset
; LoopCnt = 0
; delay for 1 ms.
; if cts=0 then we're ready to program
; MCP2150 is ready to receive data
;
; NO, wait for MCP2150 to be ready
; The MCP2150 did not exit reset, do your recovery
;
; Must specify which Port and Which Pin
; Must specify which Port and Which Pin
; Must specify which Port and Which Pin
; Must specify which Port and Which Pin
in this routine.
Preliminary
The string
2002 Microchip Technology Inc.

Related parts for MCP2150-I/PGRVB