MCP402XEV Microchip Technology, MCP402XEV Datasheet - Page 35

BOARD EVAL FOR MCP402X

MCP402XEV

Manufacturer Part Number
MCP402XEV
Description
BOARD EVAL FOR MCP402X
Manufacturer
Microchip Technology
Datasheet

Specifications of MCP402XEV

Main Purpose
Digital Potentiometer
Embedded
Yes, MCU, 8-Bit
Utilized Ic / Part
MCP4021
Primary Attributes
1 Single Pot, 10 kOhm, 64 Tap, Non Volatile
Secondary Attributes
2.7 ~ 5.5 V, 150 ppm/°C
Processor To Be Evaluated
MCP402X
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Lead free / RoHS Compliant

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
MCP402XEV
Manufacturer:
MICROCHIP
Quantity:
12 000
TABLE E-1:
© 2005 Microchip Technology Inc.
;**********************************************************************************************
; General Pupose Register Definitions
;**********************************************************************************************
GPRS
State
OldState
Exit
DebounceUP
DebounceDOWN res
DLYCNT1
DLYCNT2
;***********************************************************************************************
; Reset Code
;***********************************************************************************************
RESET
;ResetVector
;***********************************************************************************************
; Main Code
;***********************************************************************************************
MAIN
Start
Init_Oscillator
; Internal RC calibration value is placed at location 0xFF by Microchip
; as a movlw k, where the k is a literal value.
;
StateMachineReset
;
Init
#define
#define
#define
#define
#define
#define
#define
#define
#define
goto
movwf
bcf
movlw
movwf
bcf
movlw
option
clrf
clrf
call
CODE
CODE
UDATA
HV_CS
UP_State
DOWN_State State,6
Start
OSCCAL
OSCCAL,FOSC4
b’11110011’
CMCON0
CMCON0, CMPON ; needs to be on to get GP2 as a General Purpose Output
b’10011010’
State
OldState
InitGPIO
res
res
res
res
res
res
UD
CS
UP
DOWN
CP
PowerDown GPIO,3
00066_MCP402XEV.ASM SOURCE CODE (CONTINUED)
1
1
1
1
1
1
1
GPIO,1
GPIO,0
GPIO,1
GPIO,0
GPIO,2
OSCCAL,FOSC4
State,7
; variable to track the “state” value
; this code functions as a state machine
; bits 3:0 stores the state 0-15 indicator
; bits 7:6 stores the debounced button states
; allows program to see if State changed
; variable to count the number ms to test for a button press
; variable to count the number of ms UP was pressed
; variable to count the number of ms DOWN was pressed
; variable for the delay subroutines
; variable for the delay subroutines
; processor reset vector + 1
; Device resets to 0x1FF to get the factory calibration
; Lower half of memory reserved for subroutines
; update register with factory cal value
; make sure the FOSC4 is disabled to shut charge pump off
; Disable the Comparator & make inputs digital
; disable Wake-Up on Pin Change,
; enable weak pullups for button inputs
; T0CS must be 0 for GP2 TRIS to be active
; set up for 72ms WDT
; make GP0/DECR/CS & GP1/INCR/UD outputs, block undesired U/D commands
00066_MCP402XEV.ASM Source Code
; GP1 tied to UD & has “INCR” switch connected via 2.2k resistor
; GP0 tied to CS & has “DECR” switch connected via 2.2k resistor
; Momentary switch UP
; Momentary switch DOWN
; OSCOUT pin for Charge Pump
; Vpp for programming & PowerDown input to put uC to SLEEP
; Debounced UP State - using bits 5:4 are critical
; Debounced DOWN State - using bits 5:4 are critical
; Drives CS to HVDD (drive CS high first)
DS51546B-page 31

Related parts for MCP402XEV