AN519. Implementing a Simple Serial Mouse Controller INTRODUCTION THEORY OF OPERATION FUNCTIONAL BLOCKS OF A SERIAL MOUSE

Size: px
Start display at page:

Download "AN519. Implementing a Simple Serial Mouse Controller INTRODUCTION THEORY OF OPERATION FUNCTIONAL BLOCKS OF A SERIAL MOUSE"

Transcription

1 Implementing a Simple Serial Mouse Controller INTRODUCTION The mouse is becoming increasingly popular as a standard pointing data entry device. There is no doubt that the demand for the mouse is increasing. Various kinds of mice can be found in the market, including optical mice, opto-mechanical mice, and their close relative, trackballs. The mouse interfaces to the host via a dedicated interface card or an RS-232 port. Their mechanisms are very similar. The major electrical components of a mouse are: Microcontroller Photo-transistors Infrared emitting diode Voltage conversion circuit The intelligence of the mouse is provided by the microcontroller, therefore the features and performance of a mouse is greatly related to the microcontroller used. This application note describes the implementation of a serial mouse using the PIC6C54. The PIC6C54 is a high speed 8-bit CMOS microcontroller offered by It is an ideal candidate for a mouse controller. THEORY OF OPERATION A mouse can be divided into several functional blocks: Microcontroller Button detection Motion detection RS-232 signal generation 5V DC power supply unit A typical functional block diagram is shown in Figure. In Figure 2, three pushbuttons are connected to the input ports of the PIC6C54. When a switch opening or closure is detected, a message is formatted and sent to the host. The X and Y movements are measured by counting the pulses generated by the photo-couplers. In the case of an opto-mechanical mouse, the infrared light emitted by the infrared diode is blocked by the rotating wheel, so that the pulses are generated on the photo-transistor side. In case of an optical mouse, the infrared light emitted by the infrared diode is reflected off the reflective pad patterned with vertical and horizontal grid lines. It is then received by the photo-transistor in the mouse. When any X or Y movement is detected, a message is formatted and sent to the host. FIGURE : FUNCTIONAL BLOCKS OF A SERIAL MOUSE Quadrature Encoders 2 RS-232 Port of Host Microcontroller 2 -V DC Power Conversion Circuitry +5V DC Pushbuttons 997 DS59C-page

2 The Microsoft Mouse System and the Mouse Systems device both use serial input techniques. The Mouse System protocol format contains five bytes of data. One byte describes the status of three push buttons, two bytes for the relative X movements and two bytes for the relative Y movements. The Microsoft protocol format contains three bytes of data describing the status of two push buttons and the relative X and Y movements. The details of these protocols are given in Table. Three lines are connected to the host via the RS-232 port: Signal Ground Received Data Request to Send Received Data carries the message sent by the mouse. While Request to Send provides a VDC for voltage conversion circuitry. A voltage of +5 VDC is required for electronic components inside the mouse, however, +5 VDC is not part of an RS-232 port, so voltage conversion circuitry is required. This circuit is typically composed of a 555 timer, Zener diodes, and capacitors. An example circuit is shown in Figure 3. Since the current supplied through the RS-232 port is limited to ma, the mouse cannot be designed to consume more than ma current unless an external power supply is provided. The PIC6C54, running at 4 MHz ( µs instruction cycle) can provide a very high tracking speed. An 8 MHz version of PIC6C54 is also available if higher performance is desired. FIGURE 2: PIC6C54 PIN ASSIGNMENTS +5 VDC OSC OSC2 RB RA RA YCLOCK YDATA Signals From Y-Coord. Photo-Transistor RB RB2 RA2 RA3 XCLOCK XDATA Signals From X-Coord. Photo-Transistor VDD MCLR RB7 GND Received Data Pin of Host RS-232 Port FIGURE 3: VOLTAGE CONVERSION CIRCUITRY 7 4 Signal RESET GND Vcc 8 Output Discharge 3 7 6k k -V to V V to +V RS-232 Port 555 RTS 2 Threshold Trigger 6 2 µf 5k +5 VDC Output 33 µf.5 µf DS59C-page 2 997

3 ABOUT THE SOFTWARE The major tasks performed by the software are button scanning, X and Y motion scanning, formatting and sending serial data to the host. These tasks need to be performed in parallel in order to gain better tracking speed. The pulses generated by the photo-couplers are counted while transmitting the serial signals to the RS-232 port. The number of pulses reflects the speed of the movement. The more pulses, the faster the movement. The directions of movement are determined by the last states and the present states of the outputs of the photo-transistors. In Figure 4, XCLOCK and XDATA are outputs from the photo-transistors corresponding to the X-axis movement. XDATA is read when a rising or a falling edge of XCLOCK is detected. For right movement, XDATA is either LOW at the rising edge of XCLOCK or HIGH at the falling edge of XCLOCK. The up and down movement detections follow the same logic. In Table, X7:X are data for relative movement. If X is positive, it implies that the mouse is moving to the right. If X is negative, it implies a movement to the left. Similarly, if Y is positive, it indicates that the mouse is moving down and if Y is negative, it indicates that the mouse is moving up. The pulses generated by the photo-couplers are checked before every bit is sent. A bit takes /2 second to send, if the distance between the grid lines is mm, the tracking speed will be up to 2 mm/second. FIGURE 4: VOLTAGE CONVERSION CIRCUITRY XCLOCK (XC) XDATA (XD) MOVE RIGHT MOVE LEFT YCLOCK (YC) YDATA (YD) MOVE UP MOVE DOWN TABLE : MOUSE SYSTEM AND MICROSOFT PROTOCOLS Mouse System Format* Microsoft Format* Bit Position Byte L M R L R Y7 Y6 X7 X6 Byte 2 X7 X6 X5 X4 X3 X2 X X X5 X4 X3 X2 X X Byte 3 Y7 Y6 Y5 Y4 Y3 Y2 Y Y Y5 Y4 Y3 Y2 Y Y Byte 4 X7 X6 X5 X4 X3 X2 X X Byte 5 Y7 Y6 Y5 Y4 Y3 Y2 Y Y * L = Left Key Status M = Middle Key Status R = Right Key Status = Pressed = Released X7-X = X-Axis Movement Data Y7-Y = Y-Axis Movement Data 997 DS59C-page 3

4 The buttons are scanned after a message is sent and the time used to send the message is used as the debouncing time. The message is in an RS-232 format with 2 baud, eight data bits, no parity, and two stop bits. The flowcharts of the main program, subroutine BYTE and subroutine BIT are shown in Figure 5, Figure 6, and Figure 7. Figure 5 shows that the trigger flag is set when any change in button status or X/Y movement is detected. Subroutine BYTE is called in the main program five times to send five bytes of information. Subroutine BYTE controls the status of the Received Data (RD) pin. If Trigger Flag is clear, RD will always be HIGH. Hence, no message will be sent even when subroutine BYTE is called. Figure 7 shows that subroutine BIT counts the number of pulses from the outputs of the photo-transistors, determines the directions, and generates a /2 second delay to get 2 baud timing. The mouse has been tested in Mouse System Mode and functions properly. The setup and software have been tested and function within the given guidlines. A listing of the source program is given in Appendix A. SUMMARY FIGURE 5: FLOWCHART OF THE MAIN PROGRAM Reset Entry Initialize I/O port - Get initial button status Button status change? Set trigger flag X movement count =? Set trigger flag The PIC6C54 from provides a very cost-effective, high performance mouse implementation. Its low power consumption (typically< 2 ma at µs instruction cycle), small package (8-pin) and high reliability (on-chip watchdog timer to prevent software hang-ups) are some of the many reasons why the PIC6C54 is uniquely suitable for mouse applications. Right flag set? Y movement count =? Negate X count te: This application note provides the user with a simple, fully functional serial mouse implementation. The user may use this as a starting point for a more comprehensive design. Set trigger flag Up flag set? Negate Y count Data Button Byte Call Routine BYTE Data X-Coord Byte Call Routine BYTE Data Y-Coord Byte Call Routine BYTE Data X-Coord Byte Call Routine BYTE Data Y-Coor. Byte Call Routine BYTE Set trigger flag DS59C-page 4 997

5 FIGURE 6: FLOWCHART OF ROUTINE BYTE BYTE Count '' TRIGGER flag set? '' RD pin (Start Bit) Call routine BIT TRIGGER flag set? Shift LSb of data to Carry Carry = /? '' RD Pin '' RD pin Call Routine BIT Count Count + Count = 8? Return to Caller 997 DS59C-page 5

6 FIGURE 7: FLOWCHART OF ROUTINE BIT BIT XC = /? XC XC?? X Count X Count + Reset RIGHT Flag X Count X Count + Reset RIGHT Flag XD = /? XD = /? Set RIGHT Flag Set RIGHT Flag YC = /? YC YC?? Y Count Y Count + Reset UP Flag Y Count Y Count + Reset UP Flag YD = /? YD = /? Set UP flag Set TRIGGER flag Delay.833 ms Return to Caller DS59C-page 6 997

7 Please check the Microchip BBS for the latest version of the source code. Microchip s Worldwide Web Address: Bulletin Board Support: MCHIPBBS using CompuServe (CompuServe membership not required). APPENDIX A: MOUSE.ASM MPASM.4 Released MOUSE.ASM :44:22 PAGE LOC OBJECT CODE VALUE LINE SOURCE TEXT TITLE MOUSE 2 LIST P=6C54,R=O 3 ; 4 ; 5 ;******************************************************************** 6 ; 7 ; MOUSE CONTROLLER 8 ; PIC MODE = PIC6C54XT CLK=4.MHZ 9 ; ; Program: MOUSE.ASM ; Revision Date: 25 APRIL, 99 2 ; Compatibility with MPASMWIN.4 3 ; 4 ;******************************************************************** 5 ; 6 ; ; FILES ASSIGNMENT 8 ; ; 3 2 STATUS EQU 3 ;STATUS REGISTER 5 2 RA EQU 5 ;I/O PORT A 6 22 RB EQU 6 ;I/O PORT B 8 23 TIMER EQU ;COUNTER FOR DELAY C 24 CSTAT EQU 4 ;CO-ORDINATE STATUS D 25 BSTAT EQU 5 ;BUTTON STATUS E 26 DATA EQU 6 ; F 27 DATA EQU 7 ; 28 DATA2 EQU 2 ;5 BYTE RS232 DATA 29 DATA3 EQU 2 ; 2 3 DATA4 EQU 22 ; 3 3 FLAGA EQU 23 ;GENERAL PURPOSE FLAG 4 32 XCOUNT EQU 24 ;X-MOVEMENT COUNTER 5 33 YCOUNT EQU 25 ;Y-MOVEMENT COUNTER 6 34 FLAGB EQU 26 ;GENERAL PURPOSE FLAG 8 35 COUNT EQU 3 ;GENERAL PURPOSE COUNTER 9 36 DATA_AREA EQU 3 ;FOR TEMP. STORAGE 37 ; 38 ; ; BIT ASSIGNMENT 4 ; ; 42 YC EQU ;Y-CLOCK PIN 43 YD EQU ;Y-DATA PIN 44 UP EQU ;MOVING UP FLAG 2 45 XC EQU 2 ;X-CLOCK PIN 3 46 XD EQU 3 ;X-DATA PIN 3 47 RI EQU 3 ;MOVING RIGHT FLAG 48 BU EQU ;BUTTON # PIN 2 49 BU2 EQU 2 ;BUTTON #2 PIN 5 CA EQU ;CARRY FLAG 7 5 RD EQU 7 ;RECEIVED DATA PIN TO RS ZERO_AREA EQU 2 ;ZERO FLAG 2 53 TR EQU 2 ;TIGGER FLAG 54 ; 997 DS59C-page 7

8 55 F EQU 56 ; 57 ;=========================================== 58 ; SUBROUTINES 59 ;=========================================== 6 ; 6 ;******************************************* 62 ORG 63 ;******************************************* 64 ; 65 ;=========================================== 66 ; DELAY A BIT TIME AND CHECK XC & YC STATUS 67 ;=========================================== 68 BIT BTFSS RA,XC ;XC =? AA 7 GOTO BIT 2 64C 7 BTFSC CSTAT,XC ;(XC=) 3 A 72 GOTO BITY ;(XC ALWAYS = ) 4 2B4 73 INCF XCOUNT, F ;(XC -- ) BCF FLAGB,RI ;DEFAULT LEFT BTFSS RA,XD ;LEFT / RIGHT? 7 A 76 GOTO BITY BSF FLAGB,RI 9 A 78 GOTO BITY A 79 BIT A 74C 8 BTFSS CSTAT,XC ;(XC=) B A 8 GOTO BITY ;(XC ALWAYS = ) C 2B4 82 INCF XCOUNT, F ;(XC --) D BCF FLAGB,RI ;DEFAULT LEFT E BTFSC RA,XD ;LEFT / RIGHT? F A 85 GOTO BITY BSF FLAGB,RI 87 BITY BTFSS RA,YC ;YC =? 2 AB 89 GOTO BITY 3 6C 9 BTFSC CSTAT,YC ;(YC=) 4 A22 9 GOTO BITDY ;(YC ALWAYS = ) 5 2B5 92 INCF YCOUNT, F ;(YC -- ) BCF FLAGB,UP ;DEFAULT DOWN BTFSS RA,YD ;DOWN / UP? 8 A22 95 GOTO BITDY BSF FLAGB,UP A A22 97 GOTO BITDY B 98 BITY B 7C 99 BTFSS CSTAT,YC ;(YC=) C A22 GOTO BITDY ;(YC ALWAYS = ) D 2B5 INCF YCOUNT, F ;(YC --) E BCF FLAGB,UP ;DEFAULT DOWN F BTFSC RA,YD ;DOWN / UP? 2 A22 4 GOTO BITDY BSF FLAGB,UP 22 6 BITDY MOVF RA,W ;SAVE COOR. STATUS 23 2C 8 MOVWF CSTAT 24 CC 9 MOVLW 93D ;.833 MS DELAY MOVWF TIMER 26 BITD 26 2 NOP 27 2E8 3 DECFSZ TIMER, F 28 A26 4 GOTO BITD RETLW 6 ; 7 ;================================================= 8 ; 9 ;************************************************ 2 ;* SUBROUTINE TO SEND A BYTE * DS59C-page 8 997

9 2 ;* AS RS232C FORMAT 8,N, * 22 ;************************************************ 23 ; 2A 24 BYTE 2A CLRF COUNT ;RESET 8 BIT COUNT 2B BTFSS FLAGA,TR ;ANY TRIGGER 2C A2E 27 GOTO BYTE 2D 4E6 28 BCF RB,RD ;LOW RD FOR START BIT 2E 29 BYTE 2E 9 3 CALL BIT 2F 3 BYTE 2F BTFSS FLAGA,TR ;ANY TRIGGER? 3 A37 33 GOTO BYTE RRF DATA_AREA, F ;SHIFT DATA TO CARRY BTFSS STATUS,CA ; /? 33 A36 36 GOTO BYTE2 34 5E6 37 BSF RB,RD ;SEND A 35 A37 38 GOTO BYTE BYTE2 36 4E6 4 BCF RB,RD ;SEND A 37 4 BYTE CALL BIT 38 2B8 43 INCF COUNT, F BTFSS COUNT,3 ;COUNT = 8? 3A A2F 45 GOTO BYTE 3B BTFSS FLAGA,TR ;ANY TRIGGER? 3C A42 47 GOTO BYTE4 3D 4E6 48 BCF RB,RD ;SEND SENT BIT 3E 9 49 CALL BIT 3F 5E6 5 BSF RB,RD CALL BIT 4 A44 52 GOTO BYTE BYTE CALL BIT CALL BIT BYTE RETLW 58 ; 59 ;============================================ 6 ; RESET ENTRY 6 ;============================================ 62 ; INIT 45 CC 64 MOVLW B ;DISABLE WATCHDOG OPTION 47 CF 66 MOVLW B ;INIT RB~3 BE INPUTS TRIS RB ;RB4~7 BE OUTPUTS 49 CFF 68 MOVLW B ;INIT RA~3 BE INPUTS 4A 5 69 TRIS RA 4B 5E6 7 BSF RB,RD ;HIGH RD PIN 4C COMF RB,W ;GET INIT BUTTON INPUTS 4D E5 72 ANDLW B 4E D8 73 IORLW B 4F 2D 74 MOVWF BSTAT 5 2E 75 MOVWF DATA MOVF RA,W 52 2C 77 MOVWF CSTAT CLRF FLAGA ;CLEAR TR FLAG CLRF XCOUNT ;RESET XCOUNT & YCOUNT CLRF YCOUNT 56 8 SCAN 56 6F 82 CLRF DATA ;UPDATE X,Y MOVEMENT DATA CLRF DATA CLRF DATA CLRF DATA4 5A MOVF XCOUNT,W ;XCOUNT =? 997 DS59C-page 9

10 5B BTFSS STATUS,ZERO_AREA 5C A8 88 GOTO WRITX 5D 89 SCANA 5D 25 9 MOVF YCOUNT,W ;YCOUNT =? 5E BTFSS STATUS,ZERO_AREA 5F A92 92 GOTO WRITY 6 93 SCANB COMF RB,W ;BUTTON STATUS CHANGE? 6 E5 95 ANDLW B 62 D8 96 IORLW B 63 AD 97 SUBWF BSTAT, F BTFSC STATUS,ZERO_AREA ;IF CHANGE THEN TRIGGER 65 A6B 99 GOTO SCANC ;(NO CHANGE) BSF FLAGA,TR ;(CHANGE) SET TRIGGER FLAG COMF RB,W ;FORMAT BUTTON STATUS DATA 68 E5 22 ANDLW B 69 D8 23 IORLW B 6A 2E 24 MOVWF DATA 6B 25 SCANC 6B COMF RB,W 6C E5 27 ANDLW B 6D D8 28 IORLW B 6E 2D 29 MOVWF BSTAT 6F 2E 2 MOVF DATA,W ;SEND DATA,,2,3,4 TO HOST MOVWF DATA_AREA 7 92A 22 CALL BYTE 72 2F 23 MOVF DATA,W MOVWF DATA_AREA 74 92A 25 CALL BYTE MOVF DATA2,W MOVWF DATA_AREA 77 92A 28 CALL BYTE MOVF DATA3,W MOVWF DATA_AREA 7A 92A 22 CALL BYTE 7B MOVF DATA4,W 7C MOVWF DATA_AREA 7D 92A 224 CALL BYTE 7E BCF FLAGA,TR ;CLEAR TRIGGER FLAG 7F A GOTO SCAN 227 ; WRITX BSF FLAGA,TR ;SET TRIGGER FLAG 8 C4 23 MOVLW 4H ;IF XCOUNT > 64 THEN XCOUNT < SUBWF XCOUNT,W BTFSC STATUS,CA 84 A8D 233 GOTO WRITR WRITS BTFSS FLAGB,RI ;LEFT / RIGHT? 86 A9 236 GOTO WRITL COMF XCOUNT, F ;(RIGHT) NEG XCOUNT INCF XCOUNT,W WRITA 89 2F 24 MOVWF DATA 8A 3 24 MOVWF DATA3 8B CLRF XCOUNT ;RESET XCOUNT 8C A5D 243 GOTO SCANA 244 ; 8D 245 WRITR 8D C4 246 MOVLW 4H ;XCOUNT <- 64 8E MOVWF XCOUNT 8F A GOTO WRITS 249 ; 9 25 WRITL MOVF XCOUNT,W ;(LEFT) 9 A GOTO WRITA DS59C-page 997

11 253 ; WRITY BSF FLAGA,TR ;SET TRIGGER FLAG 93 C4 256 MOVLW 4H ;IF YCOUNT > 64 THEN YCOUNT < SUBWF YCOUNT,W BTFSC STATUS,CA 96 A9F 259 GOTO WRITV WRITW BTFSS FLAGB,UP ;DOWN / UP? 98 AA2 262 GOTO WRITD COMF YCOUNT, F ;(UP) NEG YCOUNT 9A INCF YCOUNT,W 9B 265 WRITB 9B MOVWF DATA2 9C MOVWF DATA4 9D CLRF YCOUNT ;RESET YCOUNT 9E A6 269 GOTO SCANB 27 ; 9F 27 WRITV 9F C4 272 MOVLW 4H ;YCOUNT <- 64 A MOVWF YCOUNT A A GOTO WRITW 275 ; A2 276 WRITD A MOVF YCOUNT,W ;(DOWN) A3 A9B 278 GOTO WRITB 279 ; 28 ;=========================================== 28 ; RESET ENTRY 282 ;=========================================== 283 ; FF 284 ORG 777 FF A GOTO INIT ;JUMP TO PROGRAM STARTING 286 ; 287 END : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX 4 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX 8 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXX C : X All other memory blocks unused. Program Memory Words Used: 65 Program Memory Words Free: 347 Errors : Warnings : reported, suppressed Messages : reported, suppressed 997 DS59C-page

12 WORLDWIDE SALES AND SERVICE AMERICAS Corporate Office 2355 West Chandler Blvd. Chandler, AZ Tel: Fax: Technical Support: Web Address: Atlanta 5 Sugar Mill Road, Suite 2B Atlanta, GA 335 Tel: Fax: Boston 5 Mount Royal Avenue Marlborough, MA 752 Tel: Fax: Chicago 333 Pierce Road, Suite 8 Itasca, IL 643 Tel: Fax: Dallas 457 Westgrove Drive, Suite 6 Addison, TX Tel: Fax: Dayton Two Prestige Place, Suite 5 Miamisburg, OH Tel: Fax: Detroit Tri-Atria Office Building rthwestern Highway, Suite 9 Farmington Hills, MI Tel: Fax: Los Angeles 82 Von Karman, Suite 9 Irvine, CA 9262 Tel: Fax: New York 5 Motor Parkway, Suite 22 Hauppauge, NY 788 Tel: Fax: San Jose 27 rth First Street, Suite 59 San Jose, CA 953 Tel: Fax: AMERICAS (continued) Toronto 5925 Airport Road, Suite 2 Mississauga, Ontario L4V W, Canada Tel: Fax: ASIA/PACIFIC Hong Kong Microchip Asia Pacific Unit 2, Tower 2 Metroplaza 223 Hing Fong Road Kwai Fong, N.T., Hong Kong Tel: Fax: Beijing Microchip Technology, Beijing Unit 95, 6 Chaoyangmen Bei Dajie Dong Erhuan Road, Dongcheng District New China Hong Kong Manhattan Building Beijing 27 PRC Tel: Fax: India India Liaison Office. 6, Legacy, Convent Road Bangalore 56 25, India Tel: Fax: Japan Microchip Technology Intl. Inc. Benex S- 6F 3-8-2, Shinyokohama Kohoku-Ku, Yokohama-shi Kanagawa Japan Tel: Fax: Korea Microchip Technology Korea 68-, Youngbo Bldg. 3 Floor Samsung-Dong, Kangnam-Ku Seoul, Korea Tel: Fax: Shanghai Microchip Technology RM 46 Shanghai Golden Bridge Bldg. 277 Yan an Road West, Hong Qiao District Shanghai, PRC 2335 Tel: Fax: ASIA/PACIFIC (continued) Singapore Microchip Technology Singapore Pte Ltd. 2 Middle Road #7-2 Prime Centre Singapore 8898 Tel: Fax: Taiwan, R.O.C Microchip Technology Taiwan F-C 27 Tung Hua rth Road Taipei, Taiwan, ROC Tel: Fax: EUROPE United Kingdom Arizona Microchip Technology Ltd. 55 Eskdale Road Winnersh Triangle Wokingham Berkshire, England RG4 5TU Tel: Fax: Denmark Microchip Technology Denmark ApS Regus Business Centre Lautrup hoj -3 Ballerup DK-275 Denmark Tel: Fax: France Arizona Microchip Technology SARL Parc d Activite du Moulin de Massy 43 Rue du Saule Trapu Batiment A - ler Etage 93 Massy, France Tel: Fax: Germany Arizona Microchip Technology GmbH Gustav-Heinemann-Ring 25 D-8739 München, Germany Tel: Fax: Italy Arizona Microchip Technology SRL Centro Direzionale Colleoni Palazzo Taurus V. Le Colleoni 24 Agrate Brianza Milan, Italy Tel: Fax: /5/99 Microchip received QS-9 quality system certification for its worldwide headquarters, design and wafer fabrication facilities in Chandler and Tempe, Arizona in July 999. The Company s quality system processes and procedures are QS-9 compliant for its PICmicro 8-bit MCUs, KEELOQ code hopping devices, Serial EEPROMs and microperipheral products. In addition, Microchip s quality system for the design and manufacture of development systems is ISO 9 certified. All rights reserved. 999 Microchip Technology Incorporated. Printed in the USA. /99 Printed on recycled paper. Information contained in this publication regarding device applications and the like is intended for suggestion only and may be superseded by updates. representation or warranty is given and no liability is assumed by Microchip Technology Incorporated with respect to the accuracy or use of such information, or infringement of patents or other intellectual property rights arising from such use or otherwise. Use of Microchip s products as critical components in life support systems is not authorized except with express written approval by Microchip. licenses are conveyed, implicitly or otherwise, under any intellectual property rights. The Microchip logo and name are registered trademarks of in the U.S.A. and other countries. All rights reserved. All other trademarks mentioned herein are the property of their respective companies. 999

AN514. Software Interrupt Techniques CREATING CONSTANT TIME POLLING INTRODUCTION THEORY OF OPERATION

AN514. Software Interrupt Techniques CREATING CONSTANT TIME POLLING INTRODUCTION THEORY OF OPERATION Software Techniques AN514 INTRODUCTION This application note describes a unique method for implementing interrupts in software on the PIC16C5X series of microcontrollers. This method takes advantage of

More information

ICSP Socket Module User s Guide

ICSP Socket Module User s Guide ICSP Socket Module User s Guide Information contained in this publication regarding device applications and the like is intended through suggestion only and may be superseded by updates. No representation

More information

How to Implement ICSP Using PIC17CXXX OTP MCUs PIC17CXXX IN-CIRCUIT SERIAL PROGRAMMING USING TABLE WRITE INSTRUCTIONS VPP 13V

How to Implement ICSP Using PIC17CXXX OTP MCUs PIC17CXXX IN-CIRCUIT SERIAL PROGRAMMING USING TABLE WRITE INSTRUCTIONS VPP 13V TB015 How to Implement ICSP Using PIC17CXXX OTP MCUs Author: INTRODUCTION Stan D Souza PIC17CXXX microcontroller (MCU) devices can be serially programmed using an RS-232 or equivalent serial interface.

More information

AN519. Implementing a Simple Serial Mouse Controller. Implementing a Simple Serial Mouse Controller INTRODUCTION THEORY OF OPERATION

AN519. Implementing a Simple Serial Mouse Controller. Implementing a Simple Serial Mouse Controller INTRODUCTION THEORY OF OPERATION A59 Implementing a Simple Serial Mouse Controller ITRODUCTIO The mouse is becoming increasingly popular as a standard pointing data entry device. It is no doubt that the demand of the mouse is increasing.

More information

Techniques to Disable Global Interrupts

Techniques to Disable Global Interrupts Techniques to Disable Global Interrupts AN576 This application brief discusses four methods for disabling global interrupts. The method best suited for the application may then be used. All discussion

More information

FIGURE 1 - TABLE READ

FIGURE 1 - TABLE READ Implementing Table Read and Table Write AN548 INTRODUCTION This application brief discusses how to read data from program memory to data memory and write data from data memory to program memory. RETLW

More information

TB004. Automatic Calibration of the WDT Time-out Period CONCLUSION INTRODUCTION IMPLEMENTATION FIGURE 1: PROGRAM FLOWCHART

TB004. Automatic Calibration of the WDT Time-out Period CONCLUSION INTRODUCTION IMPLEMENTATION FIGURE 1: PROGRAM FLOWCHART This document was created with FrameMaker 404 TB004 Automatic Calibration of the WDT Time-out Period Author: INTRODUCTION Stan D Souza Advanced Microcontroller Technology Division The WDT timer is a simple

More information

PIC16F84A. PIC16F84A Errata Sheet

PIC16F84A. PIC16F84A Errata Sheet M PIC16F84A Errata Sheet PIC16F84A The PIC16F84A parts you have received conform functionally to the Device Data Sheet (DS35007A), except for the anomalies described below. None. 2001 Microchip Technology

More information

PIC17C7XX. PIC17C7XX Data Sheet Errata. Voltage. Frequency. Voltage. Frequency. Clarifications/Corrections to the Data Sheet:

PIC17C7XX. PIC17C7XX Data Sheet Errata. Voltage. Frequency. Voltage. Frequency. Clarifications/Corrections to the Data Sheet: M PIC17C7XX PIC17C7XX Data Sheet Errata Clarifications/Corrections to the Data Sheet: In the Device Data Sheet (DS30289B), the following clarifications and corrections should be noted. 1. Module: Electrical

More information

TC642DEMO FAN CONTROL MODULE FOR TC642/646 FEATURES GENERAL DESCRIPTION BOARD SCHEMATIC

TC642DEMO FAN CONTROL MODULE FOR TC642/646 FEATURES GENERAL DESCRIPTION BOARD SCHEMATIC FAN CONTROL MODULE FOR TC642/646 FEATURES Complete Implementation of TC642 or TC646 Fan Control Circuitry on a 1.5" x 2.0" Board Works with Standard Thermistors Temperature-proportional Fan Speed Control

More information

AN602. How to get 10 Million Cycles out of your Microchip Serial EEPROM 10 MILLION CYCLE GUARENTEE INTRODUCTION ENDURANCE. Thi d t t d ith F M k 4 0 4

AN602. How to get 10 Million Cycles out of your Microchip Serial EEPROM 10 MILLION CYCLE GUARENTEE INTRODUCTION ENDURANCE. Thi d t t d ith F M k 4 0 4 Thi d t t d ith F M k 4 0 4 AN602 How to get 10 Million Cycles out of your Microchip Serial EEPROM Author: INTRODUCTION Microchip Technology Incorporated recently became the first manufacturer of Serial

More information

PIC16F872 Rev. A2 Silicon Errata Sheet. As with any windowed EPROM device, please cover the window at all times, except when erasing.

PIC16F872 Rev. A2 Silicon Errata Sheet. As with any windowed EPROM device, please cover the window at all times, except when erasing. PIC16F872 Rev. A2 Silicon Errata Sheet The PIC16F872 Rev. A2 parts you have received conform functionally to the Device Data Sheet (DS30221A), except for the anomalies described below. All the problems

More information

PIC16C54C/55A/56A/57C/58B

PIC16C54C/55A/56A/57C/58B PIC16C54C/55A/56A/57C/58B (Rev. A Silicon) Errata Sheet The PIC16C54C/55A/56A/57C/58B (Rev. A Silicon ONLY) parts you have received conform functionally to the PIC16C5X Device Data Sheet (DS30453D), except

More information

M Floating Point to ASCII Conversion

M Floating Point to ASCII Conversion M Floating Point to ASCII Conversion AN670 Authors: INTRODUCTION It is often necessary to output a floating point number to a display. For example, to check calculations, one might want to output floating

More information

Optimizing Serial Bus Operations with Proper Write Cycle Times

Optimizing Serial Bus Operations with Proper Write Cycle Times AN559 Optimizing Serial Bus Operations with Proper Write Cycle Times SERIAL EEPROM WRITE TIME REQUIREMENTS Elements of the Write Cycle Time The total write operation time for a Serial EEPROM is determined

More information

How to Implement ICSP Using PIC16CXXX OTP MCUs VDD. MCLR/VPP ICSP Connector. To application circuit Isolation circuits

How to Implement ICSP Using PIC16CXXX OTP MCUs VDD. MCLR/VPP ICSP Connector. To application circuit Isolation circuits TB013 How to Implement ICSP Using PIC16CXXX OTP MCUs Author: Rodger Richey INTRODUCTION In-Circuit Serial Programming (ICSP ) is a great way to reduce your inventory overhead and time-to-market for your

More information

PIC16F872 Rev. A0 Silicon Errata Sheet. As with any windowed EPROM device, please cover the window at all times, except when erasing.

PIC16F872 Rev. A0 Silicon Errata Sheet. As with any windowed EPROM device, please cover the window at all times, except when erasing. PIC16F872 Rev. A0 Silicon Errata Sheet The PIC16F872 (Rev. A0) parts you have received conform functionally to the Device Data Sheet (DS30221A), except for the anomalies described below. All of the problems

More information

TB011. Using SRAM With A PIC16CXXX IMPLEMENTATION INTRODUCTION BLOCK DIAGRAM OF MULTIPLEXED ADDRESS/DATA BUS ON A PIC16C74

TB011. Using SRAM With A PIC16CXXX IMPLEMENTATION INTRODUCTION BLOCK DIAGRAM OF MULTIPLEXED ADDRESS/DATA BUS ON A PIC16C74 Using SRAM With A PIC16CXXX TB011 Author: Rick Evans INTRODUCTION There are applications where a significant amount of data memory is required beyond what is in the microcontroller. For example, buffering

More information

Electromechanical Switch Replacement Smart Switch for Automotive Applications and More

Electromechanical Switch Replacement Smart Switch for Automotive Applications and More Electromechanical Switch Replacement Smart Switch for Automotive Applications and More Author: Marc Hoffknecht Aachen, Germany email: hoffknecht@online.de INTELLIGENT PUSH BUTTON FOR AIR CONTROL AND MORE

More information

PIC16F87X. PIC16F87X Rev. B3 Silicon Errata Sheet DC SPECIFICATION CHANGES FROM DATA SHEET

PIC16F87X. PIC16F87X Rev. B3 Silicon Errata Sheet DC SPECIFICATION CHANGES FROM DATA SHEET PIC16F87X Rev. B3 Silicon Errata Sheet The PIC16F87X (Rev. B3) parts you have received conform functionally to the Device Data Sheet (DS30292A), except for the anomalies described below. All the problems

More information

TB004. Automatic Calibration of the WDT Time-out Period CONCLUSION INTRODUCTION IMPLEMENTATION FIGURE 1: PROGRAM FLOWCHART

TB004. Automatic Calibration of the WDT Time-out Period CONCLUSION INTRODUCTION IMPLEMENTATION FIGURE 1: PROGRAM FLOWCHART This document was created with FrameMaker 404 TB004 Automatic Calibration of the WDT Time-out Period Author: INTRODUCTION Stan D Souza Advanced Microcontroller Technology Division The WDT timer is a simple

More information

PS4200EV. PS4200 Evaluation Kit 1.0 INTRODUCTION. 1.1 Evaluation Kit Contents

PS4200EV. PS4200 Evaluation Kit 1.0 INTRODUCTION. 1.1 Evaluation Kit Contents PS4200 Evaluation Kit PS4200EV 1.0 INTRODUCTION The PS4200EV evaluation kit provides the opportunity to evaluate the PS402 IC quickly and easily. The evaluation kit contains all of the hardware and software

More information

TB026. Calculating Program Memory Checksums Using a PIC16F87X ACCESSING MEMORY INTRODUCTION. PIC16C7X vs. PIC16F87X. Microchip Technology Inc.

TB026. Calculating Program Memory Checksums Using a PIC16F87X ACCESSING MEMORY INTRODUCTION. PIC16C7X vs. PIC16F87X. Microchip Technology Inc. M TB026 Calculating Program Memory Checksums Using a PIC16F87X Author: INTRODUCTION Many applications require the microcontroller to calculate a checksum on the program memory to determine if the contents

More information

MPLAB ICE. Processor Module and Device Adapter Specification 2.0 TERMINOLOGY CONTENTS 1.0 INTRODUCTION SYSTEM. 2.1 Host to Pod Cable. 2.

MPLAB ICE. Processor Module and Device Adapter Specification 2.0 TERMINOLOGY CONTENTS 1.0 INTRODUCTION SYSTEM. 2.1 Host to Pod Cable. 2. MPLAB ICE Processor Module and Device Adapter Specification CONTENTS 1.0 INTRODUCTION... 1 2.0 TERMINOLOGY... 1 3.0 PROCESSOR MODULES... 2 4.0 EMULATOR-RELATED ISSUES... 4 5.0 DEVICE ADAPTER ISSUES...

More information

AN713. Controller Area Network (CAN) Basics INTRODUCTION CAN PROTOCOL BASICS CAN OVERVIEW

AN713. Controller Area Network (CAN) Basics INTRODUCTION CAN PROTOCOL BASICS CAN OVERVIEW Controller Area Network (CAN) Basics AN713 Author: INTRODUCTION Controller Area Network (CAN) was initially created by German automotive system supplier Robert Bosch in the mid-1980s for automotive applications

More information

ICSP SOCKET MODULE USER S GUIDE

ICSP SOCKET MODULE USER S GUIDE M ICSP SOCKET MODULE USER S GUIDE 2002 Microchip Technology Inc. DS51113D All rights reserved. Copyright 2002, Microchip Technology Incorporated, USA. Information contained in this publication regarding

More information

Simplifying External Memory Connections of PIC17CXXX PICmicro Microcontrollers. FIGURE 1: EXTERNAL MEMORY INTERFACE BLOCK DIAGRAM (x16 DEVICES)

Simplifying External Memory Connections of PIC17CXXX PICmicro Microcontrollers. FIGURE 1: EXTERNAL MEMORY INTERFACE BLOCK DIAGRAM (x16 DEVICES) Simplifying External Memory Connections of PIC17CXXX PICmicro Microcontrollers TB027 Author: Rodger Richey INTRODUCTION The PIC17CXXX family of PICmicro microcontrollers has an external program memory

More information

PIC16C745/765. PIC16C745/765 Rev. A2 Silicon/Data Sheet Errata

PIC16C745/765. PIC16C745/765 Rev. A2 Silicon/Data Sheet Errata Rev. A2 Silicon/Data Sheet Errata The (Rev. A2) parts you have received conform functionally to the Device Data Sheet (DS41124C), except for the anomalies described below. None. Note: The silicon revision

More information

Electromechanical Switch Replacement Smart Switch for Car Windscreen Wiper Control

Electromechanical Switch Replacement Smart Switch for Car Windscreen Wiper Control Electromechanical Switch Replacement Smart Switch for Car Windscreen Wiper Control Author: Marc Hoffknecht Aachen, Germany email: hofknecht@online.de OPERATION FLOWCHART dry wet windscreen unit on PIC12C508

More information

AN767. Interfacing Microchip's Fan Speed Controllers to a SPI Port STANDARD IMPLEMENTATION INTRODUCTION

AN767. Interfacing Microchip's Fan Speed Controllers to a SPI Port STANDARD IMPLEMENTATION INTRODUCTION Interfacing Microchip's Speed Controllers to a SPI Port Author: INTRODUCTION Paul Paglia, Microchip Technology, Inc. Microchip's TC642, TC643, and TC646 are the world's first integrated circuits dedicated

More information

Section 35. Glossary

Section 35. Glossary M Section 35. A A/D See Analog to Digital. Acquisition Time (TACQ) This is related to Analog to Digital (A/D) converters. This is the time that the A/D s holding capacitor acquires the analog input voltage

More information

SEEVAL 32 Quick Start Guide

SEEVAL 32 Quick Start Guide SEEVAL 32 Quick Start Guide 2003 Microchip Technology Inc. Advance Information DS51338A Information contained in this publication regarding device applications and the like is intended through suggestion

More information

PIC16C5X Disassembler

PIC16C5X Disassembler PIC16C5X Disassembler Electromechanical Timer Replacements Author: PROGRAM DEFINITION DIS16 is an intelligent and easy-to-use disassembler for PIC16C5X microcontrollers. It produces a compact assembler

More information

AN551. Serial EEPROM Solutions vs. Parallel Solutions. Serial EEPROM Solutions vs. Parallel Solutions PARALLEL NON-VOLATILE MEMORIES SERIAL EEPROMS

AN551. Serial EEPROM Solutions vs. Parallel Solutions. Serial EEPROM Solutions vs. Parallel Solutions PARALLEL NON-VOLATILE MEMORIES SERIAL EEPROMS AN551 Serial EEPROM Solutions vs. Parallel Solutions In searching for solutions to their system non-volatile memory requirements, equipment, systems and product designers are faced with a plethora of design

More information

In-Circuit Serial Programming (ICSP ) for PIC16C715 OTP MCUs

In-Circuit Serial Programming (ICSP ) for PIC16C715 OTP MCUs PIC16C715 In-Circuit Serial Programming (ICSP ) for PIC16C715 OTP MCUs This document includes the programming specifications for the following devices: PIC16C715 Pin Diagrams PDIP, SOIC, Windowed CERDIP

More information

TB033. Using the PIC16F877 To Develop Code For PIC16CXXX Devices INTRODUCTION. Stan D Souza, Rodger Richey Microchip Technology Inc.

TB033. Using the PIC16F877 To Develop Code For PIC16CXXX Devices INTRODUCTION. Stan D Souza, Rodger Richey Microchip Technology Inc. Using the PIC16F877 To Develop Code For PIC16CXXX Devices TB033 Authors: INTRODUCTION Stan D Souza, Rodger Richey With the release of the FLASH-based PIC16F87X family, Microchip Technology has completed

More information

EPROM Memory Programming Specification TABLE 1-1: PIN DESCRIPTIONS (DURING PROGRAMMING): PIC16C64X/66X

EPROM Memory Programming Specification TABLE 1-1: PIN DESCRIPTIONS (DURING PROGRAMMING): PIC16C64X/66X M PIC16C64X/66X EPROM Memory Programming Specification This document includes the programming specifications for the following devices: PIC16C642 PIC16C662 1. PROGRAMMING THE PIC16C64X/66X The PIC16C64X/66X

More information

TB042. Interfacing a KEELOQ Encoder to a PLL Circuit THE RF ENABLE OUTPUT OVERVIEW WHY USE A PLL HCS362 INTERFACE INTERFACING TO PLLS

TB042. Interfacing a KEELOQ Encoder to a PLL Circuit THE RF ENABLE OUTPUT OVERVIEW WHY USE A PLL HCS362 INTERFACE INTERFACING TO PLLS Interfacing a KEELOQ Encoder to a PLL Circuit Author: OVERVIEW Most of the recently introduced advanced KEELOQ Encoders, like the HCS362, HCS365, HCS370 and HCS412, have provisions for controlling a multiple

More information

M Using Timer1 in Asynchronous Clock Mode

M Using Timer1 in Asynchronous Clock Mode M Using Timer1 in Asynchronous Clock Mode AN580 Author INTRODUCTION This application note discusses the use of the PIC16CXXX Timer1 module as an asynchronous clock. The Timer1 module has it own oscillator

More information

AN586. Macros for Page and Bank Switching INTRODUCTION

AN586. Macros for Page and Bank Switching INTRODUCTION Macros for Page and Bank Switching Author: Mark Palmer Microchip Technology Inc. Contributions: Mike Morse Sr. Field Applications Engineer (Dallas) INTRODUCTION This application note discusses the use

More information

AN583. Implementation of the Data Encryption Standard Using PIC17C42 KEY SCHEDULE INTRODUCTION THE DATA ENCRYPTION STANDARD

AN583. Implementation of the Data Encryption Standard Using PIC17C42 KEY SCHEDULE INTRODUCTION THE DATA ENCRYPTION STANDARD Implementation of the Data Encryption Standard Using PIC17C42 Authors: INTRODUCTION Al Lovrich Mark Palmer Microchip Technology Inc. In January 1977, The United States government adopted a product cipher

More information

Improving the Susceptibility of an Application to ESD HIGH VOLTAGE POWER SUPPLY 5V POWER SUPPLY PIN VSS

Improving the Susceptibility of an Application to ESD HIGH VOLTAGE POWER SUPPLY 5V POWER SUPPLY PIN VSS Thi d t t d ith F M k 4 4 Improving the Susceptibility of an Application to ESD Author: David Wilkie Reliability Engineering INDUCED LATCH-UP All semiconductor devices are sensitive to electrostatic discharge

More information

PIC14C000. EPROM Memory Programming Specification PIN DIAGRAM 1.0 PROGRAMMING THE PIC14C000

PIC14C000. EPROM Memory Programming Specification PIN DIAGRAM 1.0 PROGRAMMING THE PIC14C000 EPROM Memory Programming Specification This document includes the programming specifications for the following devices: PIC14C PIN DIAGRAM PDIP, SOIC, SSOP, Windowed CERDIP 1. PROGRAMMING THE PIC14C The

More information

Electromechanical Timer Replacement

Electromechanical Timer Replacement Electromechanical Timer Replacement Reminder Timer for Changing Chemicals in a Water Softener (IRON) Author: Michael MacDonald Mikaurie Prescott, WI USA email: mikemd@pressenter.com APPLICATION OPERATION:

More information

PICMASTER PICMASTER CE

PICMASTER PICMASTER CE PICMASTER PICMASTER CE Emulator Probe Specification INTRODUCTION The probes for PICMASTER (PM) and PICMASTER CE (PMCE) are interchangeable personality modules that allow the emulator to be reconfigured

More information

59C11. 1K 5.0V Microwire Serial EEPROM PACKAGE TYPES FEATURES DESCRIPTION BLOCK DIAGRAM. This document was created with FrameMaker 404

59C11. 1K 5.0V Microwire Serial EEPROM PACKAGE TYPES FEATURES DESCRIPTION BLOCK DIAGRAM. This document was created with FrameMaker 404 This document was created with FrameMaker 404 1K 5.0V Microwire Serial EEPROM 59C11 FEATURES Low power CMOS technology Pin selectable memory organization - 128 x 8 or 64 x 16 bit organization Single 5V

More information

16K (2K x 8) CMOS EEPROM I/O0 I/O1 I/O2. Vcc NC NC A7 A6 A5 A4 A3 A Microchip Technology Inc. DS11125G-page 1

16K (2K x 8) CMOS EEPROM I/O0 I/O1 I/O2. Vcc NC NC A7 A6 A5 A4 A3 A Microchip Technology Inc. DS11125G-page 1 This document was created with FrameMaker 404 16K (2K x 8) CMOS EEPROM 28C16A FEATURES Fast Read Access Time 150 ns CMOS Technology for Low Power Dissipation - 30 ma Active - 100 µa Standby Fast Byte Write

More information

93C66A/B. 4K 5.0V Automotive Temperature Microwire Serial EEPROM FEATURES PACKAGE TYPE BLOCK DIAGRAM DESCRIPTION

93C66A/B. 4K 5.0V Automotive Temperature Microwire Serial EEPROM FEATURES PACKAGE TYPE BLOCK DIAGRAM DESCRIPTION 查询 93C66A 供应商 捷多邦, 专业 PCB 打样工厂,24 小时加急出货 M 4K 5.0V Automotive Temperature Microwire Serial EEPROM FEATURES Single supply 5.0V operation Low power CMOS technology - 1 ma active current (typical) - 1 µa

More information

EVALUATION KIT FOR TC642/TC646/TC647/TC648/TC649 BDC FAN CONTROLLERS

EVALUATION KIT FOR TC642/TC646/TC647/TC648/TC649 BDC FAN CONTROLLERS EVALUATION KIT FOR TC64/TC646/TC647/TC648/TC649 BDC FAN CONTROLLERS FEATURES Complete Evaluation / Prototyping Vehicle for Microchip s TC64, TC646,TC647, TC648 and TC649 BDC Fan Controllers Works with

More information

FLASH Memory Programming Specification

FLASH Memory Programming Specification FLASH Memory Programming Specification This document includes the programming specifications for the following devices: PIC16F73 PIC16F74 PIC16F76 PIC16F77 1.0 PROGRAMMING THE The is programmed using a

More information

MPLAB. Processor Module and Device Adapter Specification. Host-to-Pod Processor Module. Logic Probe Connector Indicator Lights

MPLAB. Processor Module and Device Adapter Specification. Host-to-Pod Processor Module. Logic Probe Connector Indicator Lights CONTENTS 1.0 Introduction... 1 2.0 MPLAB ICE 4000 System... 1 3.0 Processor Modules... 2 4.0 Device Adapters... 4 5.0 Emulator-Related Issues... 4 1.0 INTRODUCTION The components of an MPLAB ICE 4000 in-circuit

More information

28C17A. 16K (2K x 8) CMOS EEPROM PACKAGE TYPES FEATURES DESCRIPTION BLOCK DIAGRAM. This document was created with FrameMaker 404

28C17A. 16K (2K x 8) CMOS EEPROM PACKAGE TYPES FEATURES DESCRIPTION BLOCK DIAGRAM. This document was created with FrameMaker 404 This document was created with FrameMaker 404 16K (2K x 8) CMOS EEPROM 28C17A FEATURES Fast Read Access Time 150 ns CMOS Technology for Low Power Dissipation - 30 ma Active - 100 µa Standby Fast Byte Write

More information

TC74 Serial Temperature Sensor Demo Board User s Guide

TC74 Serial Temperature Sensor Demo Board User s Guide TC74 Serial Temperature Sensor Demo Board User s Guide 2002 Microchip Technology Inc. DS51303A Note the following details of the code protection feature on Microchip devices: Microchip products meet the

More information

28C64A. 64K (8K x 8) CMOS EEPROM PACKAGE TYPE FEATURES DESCRIPTION BLOCK DIAGRAM

28C64A. 64K (8K x 8) CMOS EEPROM PACKAGE TYPE FEATURES DESCRIPTION BLOCK DIAGRAM 64K (8K x 8) CMOS EEPROM 28C64A FEATURES Fast Read Access Time 150 ns CMOS Technology for Low Power Dissipation - 30 ma Active - 100 µa Standby Fast Byte Write Time 200 µs or 1 ms Data Retention >200 years

More information

TB028. Technique to Calculate Day of Week DESCRIPTION OF SOFTWARE INTRODUCTION THEORY OF CALCULATION. Microchip Technology Inc.

TB028. Technique to Calculate Day of Week DESCRIPTION OF SOFTWARE INTRODUCTION THEORY OF CALCULATION. Microchip Technology Inc. M Technique to Calculate Day of Week TB028 Author: INTRODUCTION Tan Beng Hai Basically, there are two kinds of electronic systems that come with a built-in calendar. The first kind of system is used mainly

More information

Using the 8-Bit Parallel Slave Port

Using the 8-Bit Parallel Slave Port M AN579 Using the 8-Bit Parallel Slave Port Author: INTRODUCTION PIC16C64/74 microcontrollers from Microchip Technology Inc. can be interfaced with ease into a multi-microprocessor environment using its

More information

AN537. Serial EEPROM Endurance. Everything a System Engineer Needs to Know About Serial EEPROM Endurance

AN537. Serial EEPROM Endurance. Everything a System Engineer Needs to Know About Serial EEPROM Endurance AN537 Everything a System Engineer Needs to Know About Serial EEPROM Endurance The term endurance has become a confusing parameter for both users and manufacturers of EEPROM products. This is largely because

More information

TB082. Understanding Reset Events On The PIC10F20X INTRODUCTION WATCHDOG TIMER OR WDT POWER-ON RESET (POR)

TB082. Understanding Reset Events On The PIC10F20X INTRODUCTION WATCHDOG TIMER OR WDT POWER-ON RESET (POR) Understanding Reset Events On The PIC10F20X Author: INTRODUCTION The PIC10F20X family of microcontrollers utilizes the baseline 12-bit microcontroller core from Microchip. Because this core does not support

More information

TB079. Programming Baseline Flash Devices with PICkit 1 PIC12F508/509 AND PIC16F505 PROGRAMMING INTRODUCTION. PICkit 1 FIRMWARE VERSION 2.0.

TB079. Programming Baseline Flash Devices with PICkit 1 PIC12F508/509 AND PIC16F505 PROGRAMMING INTRODUCTION. PICkit 1 FIRMWARE VERSION 2.0. TB079 Baseline Flash Devices with PICkit 1 Author: INTRODUCTION The PICkit 1 Baseline Flash Programmer PC application together with the PICkit 1 Flash Starter Kit firmware version 2.0.0 or later can program

More information

Embedded Systems. PIC16F84A Sample Programs. Eng. Anis Nazer First Semester

Embedded Systems. PIC16F84A Sample Programs. Eng. Anis Nazer First Semester Embedded Systems PIC16F84A Sample Programs Eng. Anis Nazer First Semester 2017-2018 Development cycle (1) Write code (2) Assemble / compile (3) Simulate (4) Download to MCU (5) Test Inputs / Outputs PIC16F84A

More information

TB056. Demonstrating the Set_Report Request With a PS/2 to USB Keyboard Translator Example INTRODUCTION THE SET_REPORT REQUEST DESCRIPTORS

TB056. Demonstrating the Set_Report Request With a PS/2 to USB Keyboard Translator Example INTRODUCTION THE SET_REPORT REQUEST DESCRIPTORS Demonstrating the Set_Report Request With a PS/2 to USB Keyboard Translator Example TB056 Author: Reston Condit Company: Microchip Technology Inc. INTRODUCTION This Technical Brief details the translation

More information

EEPROM Memory Programming Specification

EEPROM Memory Programming Specification EEPROM Memory Programming Specification This document includes the programming specifications for the following devices: PIC16F627 PIC16F628 PIC16LF627 PIC16LF628 1.0 PROGRAMMING THE PIC16F62X The PIC16F62X

More information

AN759. Interface Control Document for the MHz Anti-Collision Interrogator EXTERNAL INTERFACES SCOPE. Electrical Interfaces.

AN759. Interface Control Document for the MHz Anti-Collision Interrogator EXTERNAL INTERFACES SCOPE. Electrical Interfaces. M AN759 Interface Control Document for the 13.56 MHz Anti-Collision Interrogator SCOPE Author: Youbok Lee, Ph.D. This document specifies the external interface requirements for the MCRF4XX and MCRF355/360

More information

AN570. Calibrating the MTA11200 System. Calibrating the MTA11200 System INTRODUCTION THE CALIBRATION SOFTWARE. Notes and Precautions:

AN570. Calibrating the MTA11200 System. Calibrating the MTA11200 System INTRODUCTION THE CALIBRATION SOFTWARE. Notes and Precautions: TM Calibrating the MTA11200 System AN570 INTRODUCTION This application note analyzes the calibration algorithm from theoretical and numerical approaches. It includes two calibration procedures, including

More information

PIC18C601/801. PIC18C601/801 Rev. C0 Silicon/Data Sheet Errata. 3. Module: Interrupts. 1. Module: WDT. 2. Module: I/O

PIC18C601/801. PIC18C601/801 Rev. C0 Silicon/Data Sheet Errata. 3. Module: Interrupts. 1. Module: WDT. 2. Module: I/O M PIC18C601/801 PIC18C601/801 Rev. C0 Silicon/Data Sheet Errata The PIC18C601/801 parts you have received conform functionally to the Device Data Sheet (DS39541A), except for the anomalies described below.

More information

TC74. General Description. Features. Applications. Functional Block Diagram. Package Types

TC74. General Description. Features. Applications. Functional Block Diagram. Package Types M TC74 Tiny Serial Digital Thermal Sensor Features Digital Temperature Sensing in SOT-23-5 or TO-220 Packages Outputs Temperature as an 8-Bit Digital Word Simple SMBus/I 2 C Serial Port Interface Solid-State

More information

AN530. Interfacing 93 Series Serial EEPROMs. Interfacing 93CX6 Serial EEPROMs to PIC16C5X Microcontrollers INTRODUCTION THE HARDWARE CONNECTION

AN530. Interfacing 93 Series Serial EEPROMs. Interfacing 93CX6 Serial EEPROMs to PIC16C5X Microcontrollers INTRODUCTION THE HARDWARE CONNECTION AN530 Interfacing 93CX6 Serial EEPROMs to PIC16C5X Microcontrollers INTRODUCTION Microchip Technology Inc. s popular 93C46/56/66 and 93LC46/56/66 Serial EEPROMs feature a three/four wire serial interface

More information

AN536. Basic Serial EEPROM Operation. Basic Serial EEPROM Operation BASIC SERIAL EEPROM OPERATION CONTENTS SERIAL EEPROM APPLICATIONS

AN536. Basic Serial EEPROM Operation. Basic Serial EEPROM Operation BASIC SERIAL EEPROM OPERATION CONTENTS SERIAL EEPROM APPLICATIONS Basic Serial EEPROM Operation AN536 BASIC SERIAL EEPROM OPERATION Looking for the optimum non-volatile memory product for your system that requires a small footprint, byte level flexibility, low power,

More information

TCN75. 2-Wire Serial Temperature Sensor and Thermal Monitor. Package Type. Features. General Description. Applications SOIC TCN75MOA MSOP TCN75MUA

TCN75. 2-Wire Serial Temperature Sensor and Thermal Monitor. Package Type. Features. General Description. Applications SOIC TCN75MOA MSOP TCN75MUA 2-Wire Serial Temperature Sensor and Thermal Monitor Features Solid-State Temperature Sensing; 0.5 C Accuracy (Typ.) Operates from -55 C to +25 C Operating Supply Range: 2.7V to 5.5V Programmable Trip

More information

M 25AA640/25LC640/25C640

M 25AA640/25LC640/25C640 M 25AA640/25LC640/25C640 64K SPI Bus Serial EEPROM DEVICE SELECTION TABLE Part Number FEATURES Low power CMOS technology - Write current: 3 ma typical - Read current: 500 µa typical - Standby current:

More information

AN536. Basic Serial EEPROM Operation. Basic Serial EEPROM Operation BASIC SERIAL EEPROM OPERATION CONTENTS SERIAL EEPROM APPLICATIONS

AN536. Basic Serial EEPROM Operation. Basic Serial EEPROM Operation BASIC SERIAL EEPROM OPERATION CONTENTS SERIAL EEPROM APPLICATIONS Basic Serial EEPROM Operation AN536 BASIC SERIAL EEPROM OPERATION Looking for the optimum non-volatile memory product for your system that requires a small footprint, byte level flexibility, low power,

More information

TC64X/TC64XB Fan Control Demo Board User s Guide

TC64X/TC64XB Fan Control Demo Board User s Guide M TC64X/TC64XB Fan Control Demo Board User s Guide 2003 Microchip Technology Inc. DS21401C Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification

More information

AN915. 1K, 2K and 4K Microwire EEPROM Migration WRITE CYCLE TIME INTRODUCTION INITIATING WRITE CYCLES BUS SPEED COMPATIBILITY DIFFERENCES

AN915. 1K, 2K and 4K Microwire EEPROM Migration WRITE CYCLE TIME INTRODUCTION INITIATING WRITE CYCLES BUS SPEED COMPATIBILITY DIFFERENCES 1K, 2K and 4K Microwire EEPROM Migration Author: INTRODUCTION Microchip Technology recently introduced a new family of Microwire serial EEPROMs with smaller packaging, faster write times, and faster bus

More information

Section 40. Introduction (Part IV)

Section 40. Introduction (Part IV) Section 40. Introduction (Part IV) HIGHLIGHTS This section of the manual contains the following major topics: 40.1 Introduction... 40-2 40.2 Revision History...40-3 40 Introduction (Part IV) 2007-2012

More information

MPLAB ICE Processor Module and Device Adapter Specification. Host-to-Pod Processor Module. Logic Probe Connector.

MPLAB ICE Processor Module and Device Adapter Specification. Host-to-Pod Processor Module. Logic Probe Connector. CONTENTS 1.0 Introduction... 1 2.0 MPLAB ICE 4000 System... 1 3.0 Processor Modules... 2 4.0 Device Adapters... 4 5.0 Emulator-Related Issues... 4 1.0 INTRODUCTION The components of an MPLAB ICE 4000 in-circuit

More information

Lesson 14. Title of the Experiment: Introduction to Microcontroller (Activity number of the GCE Advanced Level practical Guide 27)

Lesson 14. Title of the Experiment: Introduction to Microcontroller (Activity number of the GCE Advanced Level practical Guide 27) Lesson 14 Title of the Experiment: Introduction to Microcontroller (Activity number of the GCE Advanced Level practical Guide 27) Name and affiliation of the author: N W K Jayatissa Department of Physics,

More information

PIC12F752/HV752 Family Silicon Errata and Data Sheet Clarification. DEV<8:0> (1) REV<4:0> Silicon Revision (2)

PIC12F752/HV752 Family Silicon Errata and Data Sheet Clarification. DEV<8:0> (1) REV<4:0> Silicon Revision (2) Family Silicon Errata and Data Sheet Clarification The family devices that you have received conform functionally to the current Device Data Sheet (DS41576B), except for the anomalies described in this

More information

AN510. Implementation of an Asynchronous Serial I/O IMPLEMENTATION INTRODUCTION. Microchip Technology Inc.

AN510. Implementation of an Asynchronous Serial I/O IMPLEMENTATION INTRODUCTION. Microchip Technology Inc. Implementation of an Asynchronous Serial I/O Author: INTRODUCTION Amar Palacherla Microchip Technology Inc. The PIC16C5X series from Microchip Technology Inc., are 8-bit, high-speed, EPROM-based microcontrollers.

More information

A Better Mouse Trap. Consumer Appliance, Widget, Gadget APPLICATION OPERATION: Ontario, Canada

A Better Mouse Trap. Consumer Appliance, Widget, Gadget APPLICATION OPERATION: Ontario, Canada A Better Mouse Trap Author: APPLICATION OPERATION: My application uses a PIC12C508 to produce realistic sounding mouse-like coos that all mice are sure to find seductive. The entire circuit should be imbedded

More information

Discrete Logic Replacement A Keypad Controller for Bi-directional Key Matrix

Discrete Logic Replacement A Keypad Controller for Bi-directional Key Matrix A Keypad Controller for Bi-directional Key Matrix Author: Vladimir Velchev AVEX - Vladimir Velchev Sofia, Bulgaria email:avex@iname.com APPLICATION OPERATION: The PIC microcontroller can replace the traditional

More information

TB066. Temperature Sensor Backgrounder INTRODUCTION ENTER THE TEMPERATURE SENSOR THEN AND NOW. Microchip Technology Inc.

TB066. Temperature Sensor Backgrounder INTRODUCTION ENTER THE TEMPERATURE SENSOR THEN AND NOW. Microchip Technology Inc. Temperature Sensor Backgrounder TB066 Author: INTRODUCTION History has shown that consumers have an almost insatiable appetite for even greater computing horsepower. If you're old enough to remember, the

More information

AN237. Implementing a LIN Slave Node on a PIC16F73 INTRODUCTION APPLICATIONS. Resource Usage. Bit Rate. Summary. Process Time AVAILABLE PROCESS TIME

AN237. Implementing a LIN Slave Node on a PIC16F73 INTRODUCTION APPLICATIONS. Resource Usage. Bit Rate. Summary. Process Time AVAILABLE PROCESS TIME Implementing a LIN Slave de on a PIC16F73 Author: INTRODUCTION This application note presents a LIN slave driver for the PIC16F73 using the standard hardware USART. There are many details to this firmware

More information

TC670. Tiny Predictive Fan Failure Detector. Features. General Description. Applications. Package Type. Typical Application Circuit

TC670. Tiny Predictive Fan Failure Detector. Features. General Description. Applications. Package Type. Typical Application Circuit M Tiny Predictive Fan Failure Detector TC67 Features Fan Wear-Out Detection for 2-Wire Linear-Controlled Fans Replacement System for 3-Wire Fans Fan Alert Signal when Fan Speed is below Programmed Threshold

More information

PIC16F87X 13.0 INSTRUCTION SET SUMMARY INSTRUCTIONS DESCRIPTIONS

PIC16F87X 13.0 INSTRUCTION SET SUMMARY INSTRUCTIONS DESCRIPTIONS PIC6F87X 3.0 INSTRUCTION SET SUMMARY Each PIC6F87X instruction is a 4bit word, divided into an OPCODE which specifies the instruction type and one or more operands which further specify the operation of

More information

SPI Communication with the AR1020 Controller

SPI Communication with the AR1020 Controller SPI Communication with the AR1020 Controller Author: Cassandra Backus Microchip Technology Inc. INTRODUCTION The AR1020 controller s SPI (Serial Peripheral Interface) communicates as a slave mode device

More information

Serial Port Utilities

Serial Port Utilities Serial Port Utilities AN57 INTRODUCTION PIC17C2 has an on chip high speed Universal Synchronous Asynchronous Receiver Transmitter (USART). The serial port can be configured to operate either in fullduplex

More information

Connecting EPSON Display Controllers to Topway LCD Panels

Connecting EPSON Display Controllers to Topway LCD Panels Connecting EPSON Display Controllers to Topway LCD Panels Document Number: Issue Date: 2012/04/23 SEIKO EPSON CORPORATION Rev. 1.0 Page 2 NOTICE No part of this material may be reproduced or duplicated

More information

Chapter 4 Sections 1 4, 10 Dr. Iyad Jafar

Chapter 4 Sections 1 4, 10 Dr. Iyad Jafar Starting to Program Chapter 4 Sections 1 4, 10 Dr. Iyad Jafar Outline Introduction Program Development Process The PIC 16F84A Instruction Set Examples The PIC 16F84A Instruction Encoding Assembler Details

More information

PIC12LF1552 Silicon Errata and Data Sheet Clarification DEV<8:0>

PIC12LF1552 Silicon Errata and Data Sheet Clarification DEV<8:0> Silicon Errata and Data Sheet Clarification The device that you have received conforms functionally to the current Device Data Sheet (DS41674B), except for the anomalies described in this document. The

More information

Using a Timer to Interface PIC18 MCUs with UNI/O Bus-Compatible Serial EEPROMs CIRCUIT FOR PIC18F24J10 MCU AND 11XXX SERIAL EEPROM MCLR RA3 VCC (1)

Using a Timer to Interface PIC18 MCUs with UNI/O Bus-Compatible Serial EEPROMs CIRCUIT FOR PIC18F24J10 MCU AND 11XXX SERIAL EEPROM MCLR RA3 VCC (1) Author: INTRODUCTION As embedded systems become smaller, a growing need exists to minimize I/O pin usage for communication between devices. Microchip has addressed this need by developing the UNI/O bus,

More information

FM Bytes Memory Card Chip. Datasheet. Dec Datasheet. FM Bytes Memory Card Chip Ver 3.0 1

FM Bytes Memory Card Chip. Datasheet. Dec Datasheet. FM Bytes Memory Card Chip Ver 3.0 1 FM4442 256 Bytes Memory Card Chip Dec. 2008 FM4442 256 Bytes Memory Card Chip Ver 3.0 1 INFORMATION IN THIS DOCUMENT IS INTENDED AS A REFERENCE TO ASSIST OUR CUSTOMERS IN THE SELECTION OF SHANGHAI FUDAN

More information

Recommended Usage of Microchip SPI Serial SRAM Devices RECOMMENDED CONNECTIONS FOR 23XXXX SERIES DEVICES VCC 23XXXXX HOLD SCK

Recommended Usage of Microchip SPI Serial SRAM Devices RECOMMENDED CONNECTIONS FOR 23XXXX SERIES DEVICES VCC 23XXXXX HOLD SCK Recommended Usage of Microchip SPI Serial SRAM Devices Author: INTRODUCTION Martin Bowman Microchip Technology Inc. Many embedded systems require some amount of volatile storage for temporary data. This

More information

MCP2140. MCP2140 Rev. A Silicon/Data Sheet Errata. Clarifications/Corrections to the Data Sheet: INTEGRATED OPTICAL TRANSCEIVER

MCP2140. MCP2140 Rev. A Silicon/Data Sheet Errata. Clarifications/Corrections to the Data Sheet: INTEGRATED OPTICAL TRANSCEIVER MCP2140 Rev. A Silicon/Data Sheet Errata The MCP2140 Rev. A parts you have received conform functionally to the MCP2140 device data sheets (DS21790A), with the exception of the anomaly described below.

More information

AN1006. Interfacing SPI Serial EEPROMs to PIC18 Devices INTRODUCTION CIRCUIT FOR PIC18F1220 AND 25 SERIES (SPI) DEVICE

AN1006. Interfacing SPI Serial EEPROMs to PIC18 Devices INTRODUCTION CIRCUIT FOR PIC18F1220 AND 25 SERIES (SPI) DEVICE Interfacing SPI Serial EEPROMs to PIC18 Devices Author: INTRODUCTION Martin Kvasnicka Microchip Technology Inc. There are many different microcontrollers on the market today that are being used in embedded

More information

S1V3G340 External SPI-Flash Select Guide

S1V3G340 External SPI-Flash Select Guide S1V3G340 External SPI-Flash Select Guide Rev.1.00 NOTICE No part of this material may be reproduced or duplicated in any form or by any means without the written permission of Seiko Epson. Seiko Epson

More information

Chapter 13. PIC Family Microcontroller

Chapter 13. PIC Family Microcontroller Chapter 13 PIC Family Microcontroller Lesson 15 Instruction Set Most instructions execution Time One instruction cycle If XTAL frequency = 20 MHz, then instruction cycle time is 0.2 s or 200 ns (= 4/20

More information

S5U1C88000P Manual (S1C88 Family Peripheral Circuit Board)

S5U1C88000P Manual (S1C88 Family Peripheral Circuit Board) MF1434-01 CMOS 8-BIT SINGLE CHIP MICROCOMPUTER S5U1C88000P Manual (S1C88 Family Peripheral Circuit Board) NOTICE No part of this material may be reproduced or duplicated in any form or by any means without

More information

PIC12CE5XXA. In-Circuit Serial Programming for PIC12C5XX OTP MCUs 1.0 PROGRAMMING THE PIC12C5XX. Pin Diagram. 1.1 Hardware Requirements

PIC12CE5XXA. In-Circuit Serial Programming for PIC12C5XX OTP MCUs 1.0 PROGRAMMING THE PIC12C5XX. Pin Diagram. 1.1 Hardware Requirements In-Circuit Serial Programming for PIC12C5XX OTP MCUs This document includes the programming specifications for the following devices: Pin Diagram PDIP, SOIC, JW PIC12C58 PIC12C58A PIC12CE518 PIC12C59 PIC12C59A

More information

2-wire Serial EEPROM Smart Card Modules AT24C32SC AT24C64SC

2-wire Serial EEPROM Smart Card Modules AT24C32SC AT24C64SC Features Low-voltage and Standard-voltage Operation 5.0 (V CC = 4.5V to 5.5V) 2.7 (V CC = 2.7V to 5.5V) Internally Organized 4096 x 8, 8192 x 8 2-wire Serial Interface Schmitt Trigger, Filtered Inputs

More information

EEE111A/B Microprocessors

EEE111A/B Microprocessors EEE111A/B Microprocessors Revision Notes Lecture 1: What s it all About? Covers the basic principles of digital signals. The intelligence of virtually all communications, control and electronic devices

More information