MCP402XEV Microchip Technology, MCP402XEV Datasheet - Page 36

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.
ButtonCheck
DebounceLoop
CheckDOWN
DebounceLoopTest
;***********************************************************************************************
; State Machine Code
;***********************************************************************************************
State0
State1
btfss
goto
bsf
bsf
movlw
movwf
movlw
movwf
movwf
call
movlw
call
btfss
decfsz
goto
bcf
call
movlw
call
btfss
decfsz
goto
bcf
decfsz
goto
call
movf
call
movwf
xorwf
btfss
call
movlw
call
movf
movwf
goto
movlw
movwf
PowerDown
LowPowerMode
UP_State
DOWN_State
.50
Exit
.40
DebounceUP
DebounceDOWN
GPIO_TestUP
.99
VAR5TcyDELAY
UP
DebounceUP,f
CheckDOWN
UP_State
GPIO_TestDOWN ; make GP0/DECR/CS an input (w/pu enabled)
.99
VAR5TcyDELAY
DOWN
DebounceDOWN,f
DebounceLoopTest
DOWN_State
Exit,f
DebounceLoop
InitGPIO
State,w
DetermineState
State
OldState,w
STATUS,Z
PerformState
.5
VAR1000TcyDELAY
State,w
OldState
ButtonCheck
goto
.200
Exit
00066_MCP402XEV.ASM SOURCE CODE (CONTINUED)
StateMachineReset ; State 0, no action, shouldn’t get here
; Debounce Buttons
; If pulled low, put uC to SLEEP
; initialize Button_State to indicate no button pressed
; debounce the buttosns for 50mS to see if pressed
; if pushed for 40 of 50 tests, then valid UP
; make GP1/INCR/UD an input (w/pu enabled)
; 5 + (99*5) = 500us
; UP Button Pressed
; 5 + (99*5) = 500us
; DOWN Button Pressed
; make GP0/DECR/CS & GP1/INCR/UD outputs, block undesired U/D commands
00066_MCP402XEV.ASM Source Code
; subroutine to determine the next state
;State changed, now do something
; Make sure EE Write Cycle has finished
; Loop for button presses
; UP button pressed
; 200x10mS = 2s
DS51546B-page 32

Related parts for MCP402XEV