User manual

MCP401X/2X EVALUATION
BOARD USERS GUIDE
© 2005 Microchip Technology Inc. DS51546B-page 29
Appendix E. 00066_MCP402XEV.ASM Source Code
E.1 INTRODUCTION
This appendix documents the example PIC10F20X source code used on the populated
PCB. The source code is described in detail by the comments within the.ASM file. The
00066_MCP402XEV.ASM, PIC10F206.INC and MCP402XEV.HEX files can be found
on the Microchip web site (www.microchip.com) and on the included CD.
Software License Agreement
The software supplied herewith by Microchip Technology Incorporated (the “Company”) is intended and supplied to you, the
Company’s customer, for use solely and exclusively with products manufactured by the Company.
The software is owned by the Company and/or its supplier, and is protected under applicable copyright laws. All rights are reserved.
Any use in violation of the foregoing restrictions may subject the user to criminal sanctions under applicable laws, as well as to civil
liability for the breach of the terms and conditions of this license.
THIS SOFTWARE IS PROVIDED IN AN “AS IS” CONDITION. NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATU-
TORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICU-
LAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR
SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
TABLE E-1: 00066_MCP402XEV.ASM SOURCE CODE
TITLE “MCP402XEV Firmware”
;********************************************************************************************
; Author: Jim Simons
; Tools: MPLAB(r) 7.10 using MPLINK(tm)
; Editor: ComicSans 8pt w/8 character Tabs
; Files: 00066_MCP402XEV.asm
; p10f206.inc
;
; Description: Exercise the MCP402x devices using the MCP402x EV board.
; Simply use the INCR & DECR buttons to execute the INCR & DECR serial commands.
;
; Serial Commands Action State
; _______________ ______ _____
; LV Increment w/EE Depress UP, Release UP LVwEE = 1 3
; LV Decrement w/EE Depress DOWN, Release DOWN LVwEE = 1 4
; LV Increment w/o EE Depress UP, Release UP LVwEE = x 3
; LV Decrement w/o EE Depress DOWN, Release DOWN LVwEE = x 4
; LV 64 Increments Depress UP, Hold for 2s, Release UP 1
; LV 64 Decrements Depress DOWN, Hold for 2s, Release DOWN 2
; HV Incr w/o WL Depress UP, Depress DOWN, Release UP, Release DOWN 11
; HV Decr w/o WL Depress DOWN, Depress UP, Release DOWN, Release UP 12
; HV 64 Incr w/o WL Depress UP, Depress DOWN, Hold for 2s, Release UP, Release DOWN 5
; HV 64 Decr w/o WL Depress DOWN, Depress UP, Hold for 2s, Release DOWN, Release UP 6
; HV Incr w/WL Depress UP, Depress DOWN, Release DOWN, Release UP 13
; HV Decr w/WL Depress DOWN, Depress UP, Release UP, Release DOWN 14
;