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 Microchip Technology Inc. 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 Microchip Technology Inc. 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 Microchip Technology Inc.

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 Microchip Technology Inc. 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 Microchip Technology Inc. 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 Microchip Technology Inc.

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 Microchip Technology Inc. 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 Microchip Technology Inc.

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 Microchip Technology Inc. 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 Microchip Technology Inc.

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 Microchip Technology Inc. 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 Microchip Technology Inc.

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 Microchip Technology Inc. DS59C-page

12 te the following details of the code protection feature on PICmicro MCUs. The PICmicro family meets the specifications contained in the Microchip Data Sheet. Microchip believes that its family of PICmicro microcontrollers is one of the most secure products of its kind on the market today, when used in the intended manner and under normal conditions. There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our knowledge, require using the PICmicro microcontroller in a manner outside the operating specifications contained in the data sheet. The person doing so may be engaged in theft of intellectual property. Microchip is willing to work with the customer who is concerned about the integrity of their code. Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not mean that we are guaranteeing the product as unbreakable. Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our product. If you have any further questions about this matter, please contact the local sales office nearest to you. Information contained in this publication regarding device applications and the like is intended through suggestion only and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. 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. Trademarks The Microchip name and logo, the Microchip logo, FilterLab, KEELOQ, microid, MPLAB, PIC, PICmicro, PICMASTER, PICSTART, PRO MATE, SEEVAL and The Embedded Control Solutions Company are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. dspic, ECONOMONITOR, FanSense, FlexROM, fuzzylab, In-Circuit Serial Programming, ICSP, ICEPIC, microport, Migratable Memory, MPASM, MPLIB, MPLINK, MPSIM, MXDEV, PICC, PICDEM, PICDEM.net, rfpic, Select Mode and Total Endurance are trademarks of Microchip Technology Incorporated in the U.S.A. Serialized Quick Turn Programming (SQTP) is a service mark of Microchip Technology Incorporated in the U.S.A. All other trademarks mentioned herein are property of their respective companies. 22, Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved. Printed on recycled paper. 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. 22 Microchip Technology Inc.

13 M WORLDWIDE SALES AND SERVICE AMERICAS Corporate Office 2355 West Chandler Blvd. Chandler, AZ Tel: Fax: Technical Support: Web Address: Rocky Mountain 2355 West Chandler Blvd. Chandler, AZ Tel: Fax: Atlanta 5 Sugar Mill Road, Suite 2B Atlanta, GA 335 Tel: Fax: Boston 2 Lan Drive, Suite 2 Westford, MA 886 Tel: Fax: Chicago 333 Pierce Road, Suite 8 Itasca, IL 643 Tel: Fax: Dallas 457 Westgrove Drive, Suite 6 Addison, TX 75 Tel: Fax: Detroit Tri-Atria Office Building rthwestern Highway, Suite 9 Farmington Hills, MI Tel: Fax: Kokomo 2767 S. Albright Road Kokomo, Indiana 4692 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 Microchip Technology Inc. 27 rth First Street, Suite 59 San Jose, CA 953 Tel: Fax: Toronto 6285 rtham Drive, Suite 8 Mississauga, Ontario L4V X5, Canada Tel: Fax: ASIA/PACIFIC Australia Microchip Technology Australia Pty Ltd Suite 22, 4 Rawson Street Epping 22, NSW Australia Tel: Fax: China - Beijing Microchip Technology Consulting (Shanghai) Co., Ltd., Beijing Liaison Office Unit 95 Bei Hai Wan Tai Bldg.. 6 Chaoyangmen Beidajie Beijing, 27,. China Tel: Fax: China - Chengdu Microchip Technology Consulting (Shanghai) Co., Ltd., Chengdu Liaison Office Rm. 24, 24th Floor, Ming Xing Financial Tower. 88 TIDU Street Chengdu 66, China Tel: Fax: China - Fuzhou Microchip Technology Consulting (Shanghai) Co., Ltd., Fuzhou Liaison Office Unit 28F, World Trade Plaza. 7 Wusi Road Fuzhou 35, China Tel: Fax: China - Shanghai Microchip Technology Consulting (Shanghai) Co., Ltd. Room 7, Bldg. B Far East International Plaza. 37 Xian Xia Road Shanghai, 25 Tel: Fax: China - Shenzhen Microchip Technology Consulting (Shanghai) Co., Ltd., Shenzhen Liaison Office Rm. 35, 3/F, Shenzhen Kerry Centre, Renminnan Lu Shenzhen 58, China Tel: Fax: Hong Kong Microchip Technology Hongkong Ltd. Unit 9-6, Tower 2, Metroplaza 223 Hing Fong Road Kwai Fong, N.T., Hong Kong Tel: Fax: India Microchip Technology Inc. India Liaison Office Divyasree Chambers Floor, Wing A (A3/A4)., O Shaugnessey Road Bangalore, 56 25, India Tel: Fax: Japan Microchip Technology Japan K.K. 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: Singapore Microchip Technology Singapore Pte Ltd. 2 Middle Road #7-2 Prime Centre Singapore, 8898 Tel: Fax: Taiwan Microchip Technology Taiwan F-3,. 27 Tung Hua rth Road Taipei, 5, Taiwan Tel: Fax: EUROPE Denmark Microchip Technology rdic ApS Regus Business Centre Lautrup hoj -3 Ballerup DK-275 Denmark Tel: Fax: France 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 Microchip Technology GmbH Gustav-Heinemann Ring 25 D-8739 Munich, Germany Tel: Fax: Italy Microchip Technology SRL Centro Direzionale Colleoni Palazzo Taurus V. Le Colleoni 24 Agrate Brianza Milan, Italy Tel: Fax: United Kingdom Arizona Microchip Technology Ltd. 55 Eskdale Road Winnersh Triangle Wokingham Berkshire, England RG4 5TU Tel: Fax: //2 22 Microchip Technology Inc.

AN709. System Level Design Considerations When Using I 2 C TM Serial EEPROM Devices INTRODUCTION INSURING BUS-FREE DURING POWER-UP

AN709. System Level Design Considerations When Using I 2 C TM Serial EEPROM Devices INTRODUCTION INSURING BUS-FREE DURING POWER-UP M AN709 System Level Design Considerations When Using I 2 C TM Serial EEPROM Devices Author: INTRODUCTION Rick Stoneking Developing systems that implement the I 2 C protocol for communicating with serial

More information

AN688. Layout Tips for 12-Bit A/D Converter Application GETTING A GOOD START INTRODUCTION. Microchip Technology Inc. / 2 MCP602

AN688. Layout Tips for 12-Bit A/D Converter Application GETTING A GOOD START INTRODUCTION. Microchip Technology Inc. / 2 MCP602 Layout Tips for 12-Bit A/D Converter Application Author: INTRODUCTION Bonnie C. Baker Microchip Technology Inc. This Application Note originally started as a cook book for a true 12-bit layout. The assumption

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

AN680. Passive RFID Basics INTRODUCTION DEFINITIONS. Modulation. Reader. Tag. Carrier. Microchip Technology Inc.

AN680. Passive RFID Basics INTRODUCTION DEFINITIONS. Modulation. Reader. Tag. Carrier. Microchip Technology Inc. Passive RFID Basics Author: INTRODUCTION Radio Frequency Identification (RFID) systems use radio frequency to identify, locate and track people, assets, and animals. Passive RFID systems are composed of

More information

TC1270/TC1271. 4-Pin µp Reset Monitors. Features. Package Type. General Description. Applications. Device Selection Table. Typical Operating Circuit

TC1270/TC1271. 4-Pin µp Reset Monitors. Features. Package Type. General Description. Applications. Device Selection Table. Typical Operating Circuit 查 询 TC1270FERC 供 应 商 TC1270/TC1271 4-Pin µp Reset Monitors Features Precision Monitor for 1.8V, 2.7V, 3.0V, 3.3V and 5.0V Nominal Supplies Manual Reset Input 140msec Minimum RESET, RESET Output Duration

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

TCM809/TCM810. 3-Pin Microcontroller Reset Monitors. General Description. Features. Applications. Pin Configurations. Typical Application Circuit

TCM809/TCM810. 3-Pin Microcontroller Reset Monitors. General Description. Features. Applications. Pin Configurations. Typical Application Circuit M TCM809/TCM810 3-Pin Microcontroller Reset Monitors Features Precision Monitor for 2.5V, 3.0V, 3.3V, 5.0V Nominal System Voltage Supplies 140 msec Minimum RESET Timeout Period RESET Output to = 1.0V (TCM809)

More information

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

How to Implement ICSP Using PIC12C5XX OTP MCUs VDD. GP3/MCLR/VPP ICSP Connector. To application circuit Isolation circuits TB017 How to Implement ICSP Using PIC12C5XX OTP MCUs Author: Thomas Schmidt custom orders for your products. IN-CIRCUIT SERIAL PROGRAMMING INTRODUCTION The technical brief describes how to implement in-circuit

More information

AN831. Matching Small Loop Antennas to rfpic Devices INTRODUCTION CALCULATING THE LOOP RADIATION RESISTANCE AND LOSS RESISTANCE EQUATION 2:

AN831. Matching Small Loop Antennas to rfpic Devices INTRODUCTION CALCULATING THE LOOP RADIATION RESISTANCE AND LOSS RESISTANCE EQUATION 2: Matching Small Loop Antennas to rfpic Devices Author: Jan van Niekerk Microchip Technology Inc. EQUATION 2: Ploss I 2 Rloss INTRODUCTION In close proximity to the human body, small loop antennas outperform

More information

AN699. Anti-Aliasing, Analog Filters for Data Acquisition Systems ANALOG VERSUS DIGITAL FILTERS INTRODUCTION. Microchip Technology Inc.

AN699. Anti-Aliasing, Analog Filters for Data Acquisition Systems ANALOG VERSUS DIGITAL FILTERS INTRODUCTION. Microchip Technology Inc. Anti-Aliasing, Analog Filters for Data Acquisition Systems Author: INTRODUCTION Bonnie C. Baker Microchip Technology Inc. Analog filters can be found in almost every electronic circuit. Audio systems use

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

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

Code Hopping Decoder Using a PIC16C56

Code Hopping Decoder Using a PIC16C56 Code Hopping Decoder Using a PIC6C56 AN66 Author: OVERVIEW Steven Dawson Microchip Technology Inc. This application note fully describes the working of a code hopping decoder implemented on a Microchip

More information

AN844. Simplified Thermocouple Interfaces and PICmicro MCUs INTRODUCTION. Linearization THERMOCOUPLE CIRCUITS. Absolute Temperature Reference.

AN844. Simplified Thermocouple Interfaces and PICmicro MCUs INTRODUCTION. Linearization THERMOCOUPLE CIRCUITS. Absolute Temperature Reference. Simplified Thermocouple Interfaces and PICmicro MCUs Author: INTRODUCTION Joseph Julicher Microchip Technology Inc. Thermocouples are the simplest form of temperature sensors. Thermocouples are normally:

More information

TB040. Fast Integer Square Root THE ALGORITHM INTRODUCTION SQUARE ROOT FLOW CHART

TB040. Fast Integer Square Root THE ALGORITHM INTRODUCTION SQUARE ROOT FLOW CHART Fast Integer Square Root Author: Ross M. Fosler Microchip Technology Inc. algorithm demonstrates how the single cycle multiplier is useful in calculating a square root and at the same time, save processor

More information

Voltage-to-Frequency/Frequency-to-Voltage Converter

Voltage-to-Frequency/Frequency-to-Voltage Converter Voltage-to-Frequency/Frequency-to-Voltage Converter Author: Michael O. Paiva, Microchip Technology, Inc. RATIOMETRIC MEASUREMENT (ANALOG DIVISION) One of the most difficult circuits to build is one which

More information

TCM680. +5V To ±10V Voltage Converter. General Description. Features. Applications. Package Type. Typical Operating Circuit

TCM680. +5V To ±10V Voltage Converter. General Description. Features. Applications. Package Type. Typical Operating Circuit M 5V To ±10V Voltage Converter TCM680 Features 99% Voltage Conversion Efficiency 85% Power Conversion Efficiency Input Voltage Range: 2.0V to 5.5V Only 4 External Capacitors Required 8Pin SOIC Package

More information

FLASH Memory Programming Specification TABLE 1-1: PIN DESCRIPTIONS (DURING PROGRAMMING): PIC16F72

FLASH Memory Programming Specification TABLE 1-1: PIN DESCRIPTIONS (DURING PROGRAMMING): PIC16F72 M PIC16F72 FLASH Memory Programming Specification This document includes the programming specifications for the following device: PIC16F72 1.0 PROGRAMMING THE PIC16F72 The PIC16F72 is programmed using

More information

TC652/TC653. Integrated Temperature Sensor & Brushless DC Fan Controller with FanSense Detect & Over-Temperature. Features.

TC652/TC653. Integrated Temperature Sensor & Brushless DC Fan Controller with FanSense Detect & Over-Temperature. Features. Integrated Temperature Sensor & Brushless DC Fan Controller with FanSense Detect & Over-Temperature Features Integrated Temperature Sensing and Multi-speed Fan Control FanSense Fan Fault Detect Circuitry

More information

Technical Brief Secure Learning RKE Systems Using KEELOQ Encoders

Technical Brief Secure Learning RKE Systems Using KEELOQ Encoders Technical Brief Secure Learning RKE Systems Using KEELOQ Encoders TB001 Author: Chris R. Burger INTRODUCTION Learning capability in remote keyless entry (RKE) and remote-controlled security systems is

More information

How To Use A Temperature Sensor On A Microchip Computer (For Microchip)

How To Use A Temperature Sensor On A Microchip Computer (For Microchip) 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

A CAN Physical Layer Discussion

A CAN Physical Layer Discussion M A CAN Physical Layer Discussion AN228 Author: INTRODUCTION Pat Richards Microchip Technology Inc. Many network protocols are described using the seven layer Open System Interconnection (OSI) model, as

More information

Uninstalling Incorrect USB Device Drivers

Uninstalling Incorrect USB Device Drivers DEVELOPMENT SYSTEMS Uninstalling Incorrect USB Device Drivers RECOMMENDED UNINSTALL METHODS When using Microchip development tools, trouble may be experienced as a result of incorrect device drivers being

More information

Analog-to-Digital Converters

Analog-to-Digital Converters Analog-to-Digital Converters In this presentation we will look at the Analog-to-Digital Converter Peripherals with Microchip s midrange PICmicro Microcontrollers series. 1 Analog-to-Digital Converters

More information

AN562. Using Endurance Predictive Software. Using the Microchip Endurance Predictive Software INTRODUCTION TOTAL ENDURANCE PREDICTIVE SOFTWARE

AN562. Using Endurance Predictive Software. Using the Microchip Endurance Predictive Software INTRODUCTION TOTAL ENDURANCE PREDICTIVE SOFTWARE AN562 Using the Microchip Endurance Predictive Software INTRODUCTION Endurance, as it applies to non-volatile memory, refers to the number of times an individual memory cell can be erased and/or written

More information

EEPROM Memory Programming Specification

EEPROM Memory Programming Specification M PIC16F8X EEPROM Memory Programming Specification This document includes the programming specifications for the following devices: PIC16F83 PIC16CR83 PIC16F84 PIC16CR84 PIC16F84A 1. PROGRAMMING THE PIC16F8X

More information

PIC16F877A. FLASH Memory Programming Specification 1.0 PROGRAMMING THE PIC16F87XA

PIC16F877A. FLASH Memory Programming Specification 1.0 PROGRAMMING THE PIC16F87XA M PIC16F87XA FLASH Memory Programming Specification This document includes programming specifications for the following devices: Pin Diagrams PDIP, SOIC PIC16F873A PIC16F874A PIC16F876A PIC16F877A 1.0

More information

AN685. Thermistors in Single Supply Temperature Sensing Circuits INTRODUCTION THERMISTOR OVERVIEW. Current-Over-Time Mode. Voltage-Versus-Current Mode

AN685. Thermistors in Single Supply Temperature Sensing Circuits INTRODUCTION THERMISTOR OVERVIEW. Current-Over-Time Mode. Voltage-Versus-Current Mode Thermistors in Single Supply Temperature Sensing Circuits Author: INTRODUCTION Bonnie C. Baker Microchip Technology Inc. There is a variety of temperature sensors on the market all of which meet specific

More information

Driving Power MOSFETs in High-Current, Switch Mode Regulators V GS(TH) In equation form: and. I G = Q G /t (transition) where: For example:

Driving Power MOSFETs in High-Current, Switch Mode Regulators V GS(TH) In equation form: and. I G = Q G /t (transition) where: For example: N786 Driving Power MOSFETs in High-Current, Switch Mode Regulators uthor: bid Hussain, Microchip Technology, Inc. Q GS Q GD Q G Q OD DRIVING THE MOSFET The low on-resistance and high current carrying capability

More information

TB056. Demonstrating the Set_Report Request With a PS/2 to USB Keyboard Translator Example INTRODUCTION. The Set_Report Request.

TB056. Demonstrating the Set_Report Request With a PS/2 to USB Keyboard Translator Example INTRODUCTION. The Set_Report Request. Demonstrating the Set_Report Request With a PS/2 to USB Keyboard Translator Example Author: INTRODUCTION This Technical Brief details the translation of a PS/2 keyboard to a USB keyboard using the PIC16C745/

More information

AN679. Temperature Sensing Technologies SO MANY TEMPERATURE SENSORS INTRODUCTION. Microchip Technology Inc.

AN679. Temperature Sensing Technologies SO MANY TEMPERATURE SENSORS INTRODUCTION. Microchip Technology Inc. M Temperature Sensing Technologies AN679 Author: Bonnie Baker Microchip Technology Inc. INTRODUCTION Of all of the sensing technologies, temperature sensing is the most common. This phenomena can be explained

More information

AN1286. Water-Resistant Capacitive Sensing INTRODUCTION THEORY OF OPERATION. Sensing Steps. Sensing Steps Description DESIGN

AN1286. Water-Resistant Capacitive Sensing INTRODUCTION THEORY OF OPERATION. Sensing Steps. Sensing Steps Description DESIGN Water-Resistant Capacitive Sensing AN1286 Author: INTRODUCTION Thomas Perme Steven Lin Microchip Technology Inc. This application note describes a new hardware sensing method which is resilient to water

More information

TB3016. Using the PIC MCU CTMU for Temperature Measurement IMPLEMENTATION BASIC PRINCIPLE MEASUREMENT CIRCUIT

TB3016. Using the PIC MCU CTMU for Temperature Measurement IMPLEMENTATION BASIC PRINCIPLE MEASUREMENT CIRCUIT Using the PIC MCU CTMU for Temperature Measurement Author: Padmaraja Yedamale Microchip Technology Inc. The Charge Time Measurement Unit (CTMU), introduced on the latest generation of PIC24F and PIC18F

More information

AN717. Building a 10-bit Bridge Sensing Circuit using the PIC16C6XX and MCP601 Operational Amplifier

AN717. Building a 10-bit Bridge Sensing Circuit using the PIC16C6XX and MCP601 Operational Amplifier Building a 10-bit Bridge Sensing Circuit using the PIC16C6XX and MCP601 Operational Amplifier Author: INTRODUCTION Bonnie C. Baker Sensors that use Wheatstone bridge configurations, such as pressure sensors,

More information

AN826. Crystal Oscillator Basics and Crystal Selection for rfpic TM and PICmicro Devices INTRODUCTION OSCILLATOR MODELS. Microchip Technology Inc.

AN826. Crystal Oscillator Basics and Crystal Selection for rfpic TM and PICmicro Devices INTRODUCTION OSCILLATOR MODELS. Microchip Technology Inc. Crystal Oscillator Basics and Crystal Selection for rfpic TM and PICmicro Devices Author: INTRODUCTION Steven Bible Microchip Technology Inc. Oscillators are an important component of radio frequency (RF)

More information

TB055. PS/2 to USB Mouse Translator IMPLEMENTATION OVERVIEW. Hardware FIGURE 1: PS/2 TO USB MOUSE TRANSLATOR HARDWARE DIAGRAM (1)

TB055. PS/2 to USB Mouse Translator IMPLEMENTATION OVERVIEW. Hardware FIGURE 1: PS/2 TO USB MOUSE TRANSLATOR HARDWARE DIAGRAM (1) PS/2 to USB Mouse Translator TB55 Author: OVERVIEW Reston Condit Microchip Technology Inc. This Technical Brief details the translation of a PS/2 mouse to a USB mouse using the PIC16C745/765. The PIC16C745/765

More information

AN734. Using the PICmicro SSP for Slave I 2 C TM Communication INTRODUCTION THE I 2 C BUS SPECIFICATION

AN734. Using the PICmicro SSP for Slave I 2 C TM Communication INTRODUCTION THE I 2 C BUS SPECIFICATION Using the PICmicro SSP for Slave I 2 C TM Communication Author: INTRODUCTION Stephen Bowling Microchip Technology Incorporated Many devices in the PICmicro family have a Synchronous Serial Port (SSP) or

More information

Recommended Usage of Microchip 23X256/23X640 SPI Serial SRAM Devices RECOMMENDED CONNECTIONS FOR 23X256,23X640 SERIES DEVICES VCC 23X256/ HOLD.

Recommended Usage of Microchip 23X256/23X640 SPI Serial SRAM Devices RECOMMENDED CONNECTIONS FOR 23X256,23X640 SERIES DEVICES VCC 23X256/ HOLD. Recommended Usage of Microchip 23X256/23X640 SPI Serial SRAM Devices Author: INTRODUCTION Martin Bowman Microchip Technology Inc. This document details recommended usage of the Microchip 23X256 and 23X640

More information

AN905. Brushed DC Motor Fundamentals INTRODUCTION PRINCIPLES OF OPERATION. Stator. Rotor SIMPLE TWO-POLE BRUSHED DC MOTOR. Microchip Technology Inc.

AN905. Brushed DC Motor Fundamentals INTRODUCTION PRINCIPLES OF OPERATION. Stator. Rotor SIMPLE TWO-POLE BRUSHED DC MOTOR. Microchip Technology Inc. Brushed DC Motor Fundamentals AN905 Author: Reston Condit Microchip Technology Inc. INTRODUCTION Brushed DC motors are widely used in applications ranging from toys to push-button adjustable car seats.

More information

TC110. PFM/PWM Step-Up DC/DC Controller. Features. General Description. Applications. Functional Block Diagram. Device Selection Table

TC110. PFM/PWM Step-Up DC/DC Controller. Features. General Description. Applications. Functional Block Diagram. Device Selection Table PFM/PWM Step-Up DC/DC Controller TC110 Features Assured Start-up at 0.9V 50µA (Typ) Supply Current (f OSC = 100kHz) 300mA Output Current @ V IN 2.7V 0.5µA Shutdown Mode 100kHz and 300kHz Switching Frequency

More information

AN723. Operational Amplifier AC Specifications and Applications INTRODUCTION FREQUENCY DOMAIN SPECIFICATIONS

AN723. Operational Amplifier AC Specifications and Applications INTRODUCTION FREQUENCY DOMAIN SPECIFICATIONS Operational Amplifier AC Specifications and Applications Author: INTRODUCTION Bonnie C. Baker I IN V DD This application note defines the ac specifications of voltage feedback operational amplifiers (Op

More information

AN1303. Software Real-Time Clock and Calendar Using PIC16F1827 DATA INTERFACE INTRODUCTION IMPLEMENTATION INTERNAL REGISTER MAP

AN1303. Software Real-Time Clock and Calendar Using PIC16F1827 DATA INTERFACE INTRODUCTION IMPLEMENTATION INTERNAL REGISTER MAP Software Real-Time Clock and Calendar Using PIC16F1827 Author: INTRODUCTION Cristian Toma Microchip Technology Inc. This application note describes the implementation of software Real-Time Clock and Calendar

More information

AN880. Converting from 8051 to Microchip Assembler: A Quick Reference INTRODUCTION

AN880. Converting from 8051 to Microchip Assembler: A Quick Reference INTRODUCTION Converting from 805 to Assembler: A Quick Reference Author: INTRODUCTION Gaurang Kavaiya Technology Inc. When migrating assembly language programs from one family of microcontrollers to another, the first

More information

WORKSHOP-IN-A-BOX 2: LOW POWER SOLUTIONS DEMONSTRATION BOARD

WORKSHOP-IN-A-BOX 2: LOW POWER SOLUTIONS DEMONSTRATION BOARD WORKSHOP-IN-A-BOX 2: LOW POWER SOLUTIONS DEMONSTRATION BOARD 2004 Microchip Technology Inc. DS51512A Note the following details of the code protection feature on Microchip devices: Microchip products meet

More information

Installing and Licensing MPLAB XC C Compilers

Installing and Licensing MPLAB XC C Compilers Installing and Licensing MPLAB XC C Compilers DS50002059G Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification contained in their particular

More information

AN1199. 1-Wire Communication with PIC Microcontroller INTRODUCTION. OVERVIEW OF THE 1-Wire BUS. 1-Wire Protocol. Prerequisites

AN1199. 1-Wire Communication with PIC Microcontroller INTRODUCTION. OVERVIEW OF THE 1-Wire BUS. 1-Wire Protocol. Prerequisites 1-Wire Communication with PIC Microcontroller Author: INTRODUCTION This application note introduces the user to the 1-Wire communication protocol and describes how a 1-Wire device can be interfaced to

More information

Operational Amplifier Topologies and DC Specifications

Operational Amplifier Topologies and DC Specifications Operational Amplifier Topologies and DC Specifications Author: Bonnie C. Baker INTRODUCTION Operational amplifiers (op amps) are as prolific in analog circuits as salt and pepper is on food. They are sprinkled

More information

HCS200. KEELOQ Code Hopping Encoder DESCRIPTION FEATURES PACKAGE TYPES BLOCK DIAGRAM. Security. Operating. Other. Typical Applications

HCS200. KEELOQ Code Hopping Encoder DESCRIPTION FEATURES PACKAGE TYPES BLOCK DIAGRAM. Security. Operating. Other. Typical Applications KEELOQ Code Hopping Encoder HCS200 FEATURES Security Programmable 28-bit serial number Programmable 64-bit crypt key Each transmission is unique 66-bit transmission code length 32-bit hopping code 28-bit

More information

RC Model Aircraft Motor Control. Solutions. PWM Rate khz 1 PIC12C508A 20 20 0.5 limited None None 1.3 2 PIC16F628 20 20 1.0 Yes Yes Yes 32, 8, 2

RC Model Aircraft Motor Control. Solutions. PWM Rate khz 1 PIC12C508A 20 20 0.5 limited None None 1.3 2 PIC16F628 20 20 1.0 Yes Yes Yes 32, 8, 2 RC Model Aircraft Motor Control AN847 Author: INTRODUCTION Joseph Julicher Microchip Technology Inc. As modern MOSFET transistors are developed with lower ON resistance and smaller packages, Electronic

More information

AN873. Using the MCP2515 CAN Developer s Kit INTRODUCTION. PC Node. PICmicro Node BLOCK DIAGRAM OF MCP2515 DEVELOPMENT BOARD

AN873. Using the MCP2515 CAN Developer s Kit INTRODUCTION. PC Node. PICmicro Node BLOCK DIAGRAM OF MCP2515 DEVELOPMENT BOARD M Using the MCP2515 CAN Developer s Kit AN873 Author: INTRODUCTION The MCP2515 eases software development and shortens the learning curve for the MCP2515 by providing three PC software templates with different

More information

Interfacing Pressure Sensors to Microchip s Analog Peripherals V OUT- Silicon Substrate

Interfacing Pressure Sensors to Microchip s Analog Peripherals V OUT- Silicon Substrate Interfacing Pressure Sensors to Microchip s Analog Peripherals Author: INTRODUCTION Bonnie Baker Pressure measurement devices can be classified into two groups: those where pressure is the only source

More information

MCP3021. Low Power 10-Bit A/D Converter With I 2 C Interface. Description. Features. Applications. Functional Block Diagram.

MCP3021. Low Power 10-Bit A/D Converter With I 2 C Interface. Description. Features. Applications. Functional Block Diagram. M MCP321 Low Power 1-Bit A/D Converter With I 2 C Interface Features 1-bit resolution ±1 LSB DNL, ±1 LSB INL max. 25 µa max conversion current 5 na typical standby current, 1 µa max. I 2 C compatible serial

More information

AN1142. USB Mass Storage Class on an Embedded Host INTRODUCTION. USB Mass Storage Class. Overview

AN1142. USB Mass Storage Class on an Embedded Host INTRODUCTION. USB Mass Storage Class. Overview USB Mass Storage Class on an Embedded Host Author: INTRODUCTION With the introduction of Microchip's microcontrollers with the USB OTG peripheral, microcontroller applications can easily support USB Embedded

More information

TC648. Fan Speed Controller with Auto-Shutdown and Over-Temperature Alert. Package Types. Features TC648. General Description.

TC648. Fan Speed Controller with Auto-Shutdown and Over-Temperature Alert. Package Types. Features TC648. General Description. M Fan Speed Controller with Auto-Shutdown and Over-Temperature Alert TC648 Features Temperature Proportional Fan Speed for Acoustic Control and Longer Fan Life Efficient PWM Fan Drive 3.0V to 5.5V Supply

More information

AN956. Migrating Applications to USB from RS-232 UART with Minimal Impact on PC Software OVERVIEW INTRODUCTION. Microchip Technology Inc.

AN956. Migrating Applications to USB from RS-232 UART with Minimal Impact on PC Software OVERVIEW INTRODUCTION. Microchip Technology Inc. Migrating Applications to USB from RS-232 UART with Minimal Impact on PC Software Author: INTRODUCTION Rawin Rojvanit Microchip Technology Inc. The RS-232 serial interface is no longer a common port found

More information

Section 29. Instruction Set

Section 29. Instruction Set M Section 29. Instruction Set HIGHLIGHTS This section of the manual contains the following major topics: 29. Introduction...29-2 29.2 Instruction Formats...29-4 29.3 Special Function Registers as Source/Destination...29-6

More information

AN687. Precision Temperature-Sensing With RTD Circuits RTD OVERVIEW INTRODUCTION EQUATION 1:

AN687. Precision Temperature-Sensing With RTD Circuits RTD OVERVIEW INTRODUCTION EQUATION 1: Precision Temperature-Sensing With RTD Circuits Author: INTRODUCTION Bonnie C. Baker Microchip Technology Inc. The most widely measured phenomena in the process control environment is temperature. Common

More information

HANDLING SUSPEND MODE ON A USB MOUSE

HANDLING SUSPEND MODE ON A USB MOUSE APPLICATION NOTE HANDLING SUSPEND MODE ON A USB MOUSE by Microcontroller Division Application Team INTRODUCTION All USB devices must support Suspend mode. Suspend mode enables the devices to enter low-power

More information

PIC10F200/202/204/206

PIC10F200/202/204/206 Memory Programming Specification This document includes the programming specifications for the following devices: PIC10F200 PIC10F202 PIC10F204 PIC10F206 1.0 PROGRAMMING THE PIC10F200/202/204/206 The PIC10F200/202/204/206

More information

High Speed CAN Transceiver. 8 Externally controlled slope for reduced RFI emissions Detection of ground fault (permanent dominant) on TXD input

High Speed CAN Transceiver. 8 Externally controlled slope for reduced RFI emissions Detection of ground fault (permanent dominant) on TXD input M MCP2551 High Speed CAN Transceiver Features Package Types Supports 1 Mb/s operation Implements ISO 11898 standard physical layer requirements Suitable for 12 V and 24 V systems PDIP/SOIC TXD 1 8 RS Externally

More information

AN1325. mtouch Metal Over Cap Technology THEORY OF OPERATION INTRODUCTION CROSS SECTION OF METAL OVER CAPACITIVE (UNPRESSED)

AN1325. mtouch Metal Over Cap Technology THEORY OF OPERATION INTRODUCTION CROSS SECTION OF METAL OVER CAPACITIVE (UNPRESSED) mtouch Metal Over Cap Technology AN1325 Authors: INTRODUCTION Keith Curtis Dieter Peter Microchip Technology Inc. As a user interface, capacitive touch has several advantages: it is low power, low cost,

More information

dspic30f3012/3013 dspic30f3012/3013 Rev. B0 Silicon Errata dspic30f3012/3013 (Rev. B0) Silicon Errata Silicon Errata Summary

dspic30f3012/3013 dspic30f3012/3013 Rev. B0 Silicon Errata dspic30f3012/3013 (Rev. B0) Silicon Errata Silicon Errata Summary dspic30f3012/3013 Rev. B0 Silicon Errata dspic30f3012/3013 (Rev. B0) Silicon Errata The dspic30f3012/3013 (Rev. B0) samples you have received were found to conform to the specifications and functionality

More information

PICmicro DC Motor Control Tips n Tricks

PICmicro DC Motor Control Tips n Tricks PICmicro DC Motor Control Tips n Tricks M Table of Contents Tips n Tricks Tips N Tricks Introduction TIP #1: Brushed DC Motor Drive Circuits...2 TIP #2: Brushless DC Motor Drive Circuits...5 TIP #3: Stepper

More information

PIC Programming in Assembly. (http://www.mstracey.btinternet.co.uk/index.htm)

PIC Programming in Assembly. (http://www.mstracey.btinternet.co.uk/index.htm) PIC Programming in Assembly (http://www.mstracey.btinternet.co.uk/index.htm) Tutorial 1 Good Programming Techniques. Before we get to the nitty gritty of programming the PIC, I think now is a good time

More information

Timers: Timer0 Tutorial (Part 1)

Timers: Timer0 Tutorial (Part 1) Timers: Timer0 Tutorial (Part 1) 2007 Microchip Technology Inc. DS51682A Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification contained

More information

In-Circuit Serial Programming (ICSP ) Guide

In-Circuit Serial Programming (ICSP ) Guide In-Circuit Serial Programming (ICSP ) Guide 2003 Microchip Technology Inc. May 2003 DS30277D te the following details of the code protection feature on Microchip devices: Microchip products meet the specification

More information

Universal Programming Module 2

Universal Programming Module 2 Universal Programming Module OVERVIEW The Universal Programming Module (UPM) is a handy, low-cost board that supports the programming of Microchip devices using MPLAB in-circuit emulators and debuggers.

More information

AN730. CRC Generating and Checking INTRODUCTION THEORY OF OPERATION EXAMPLE 1: MODULO-2 CALCULATION. Example Calculation. Microchip Technology Inc.

AN730. CRC Generating and Checking INTRODUCTION THEORY OF OPERATION EXAMPLE 1: MODULO-2 CALCULATION. Example Calculation. Microchip Technology Inc. CRC Generating and Checking AN730 Authors: Thomas Schmidt INTRODUCTION This application note describes the Cyclic Redundancy Check (CRC) theory and implementation. The CRC check is used to detect errors

More information

AN727. Credit Card Reader Using a PIC12C509 DATA ENCODING INTRODUCTION FIGURE 1: POSITION OF ISO TRACKS 1, 2 AND 3. Andrew M Errington

AN727. Credit Card Reader Using a PIC12C509 DATA ENCODING INTRODUCTION FIGURE 1: POSITION OF ISO TRACKS 1, 2 AND 3. Andrew M Errington Credit Using a PIC12C509 AN727 Author: INTRODUCTION Andrew M Errington Many people carry one or more magnetically encoded cards with them for accessing a range of services. Perhaps the most common example

More information

SPI. Overview and Use of the PICmicro Serial Peripheral Interface. Getting Started: SPI

SPI. Overview and Use of the PICmicro Serial Peripheral Interface. Getting Started: SPI SPI Overview and Use of the PICmicro Serial Peripheral Interface In this presentation, we will look at what the Serial Peripheral Interface, otherwise known as the SPI, is, and how it is used to communicate

More information

Section 28. In-Circuit Serial Programming (ICSP )

Section 28. In-Circuit Serial Programming (ICSP ) M Section 28. In-Circuit Serial Programming (ICSP ) HIGHLIGHTS This section of the manual contains the following major topics: 28. Introduction...28-2 28.2 Entering In-Circuit Serial Programming Mode...28-3

More information

Using The PIC I/O Ports

Using The PIC I/O Ports EE2801 -- Lecture 22 Using The PIC I/O Ports EE2801-L22P01 The Variety Of Available IO Ports The PIC 16F874 microcontroller has five different IO ports, accounting for thirty three of the processors forty

More information

8-bit Microcontroller. Application Note. AVR400: Low Cost A/D Converter

8-bit Microcontroller. Application Note. AVR400: Low Cost A/D Converter AVR400: Low Cost A/D Converter Features Interrupt Driven : 23 Words Low Use of External Components Resolution: 6 Bits Measurement Range: 0-2 V Runs on Any AVR Device with 8-bit Timer/Counter and Analog

More information

MCP3204/3208. 2.7V 4-Channel/8-Channel 12-Bit A/D Converters with SPI Serial Interface. Features. Description. Applications. Functional Block Diagram

MCP3204/3208. 2.7V 4-Channel/8-Channel 12-Bit A/D Converters with SPI Serial Interface. Features. Description. Applications. Functional Block Diagram M MCP324/328 2.7V 4-Channel/8-Channel 12-Bit A/D Converters with SPI Serial Interface Features 12-bit resolution ± 1 LSB max DNL ± 1 LSB max INL (MCP324/328-B) ± 2 LSB max INL (MCP324/328-C) 4 (MCP324)

More information

AN1275. KEELOQ with Advanced Encryption Standard (AES) Receiver/Decoder KEY FEATURES OVERVIEW. Microchip Technology Inc.

AN1275. KEELOQ with Advanced Encryption Standard (AES) Receiver/Decoder KEY FEATURES OVERVIEW. Microchip Technology Inc. KEELOQ with Advanced Encryption Standard (AES) Receiver/Decoder Author: OVERVIEW Enrique Aleman Microchip Technology Inc. This application note describes a KEELOQ with AES code hopping decoder implemented

More information

Integrated Development Environment

Integrated Development Environment Development Tools Integrated Development Environment Transforming Ideas Into Realities The typical product development life cycle is comprised of smaller cycles each representing an iterative process toward

More information

8-bit RISC Microcontroller. Application Note. AVR182: Zero Cross Detector

8-bit RISC Microcontroller. Application Note. AVR182: Zero Cross Detector AVR182: Zero Cross Detector Features Interrupt Driven Modular C Source Code Size Efficient Code Accurate and Fast Detection A Minimum of External Components Introduction One of the many issues with developing

More information

Data Movement Between Big-Endian and Little-Endian Devices

Data Movement Between Big-Endian and Little-Endian Devices Freescale Semiconductor Application Note AN2285 Rev. 2.2, 3/2008 Data Movement Between Big-Endian and Little-Endian Devices by Kyle Aubrey, Field Technical Leader Ashan Kabir, System Engineering Freescale

More information

TC1047/TC1047A. Precision Temperature-to-Voltage Converter. General Description. Applications. Block Diagram. Features.

TC1047/TC1047A. Precision Temperature-to-Voltage Converter. General Description. Applications. Block Diagram. Features. Precision Temperature-to-Voltage Converter Features Supply Voltage Range: - TC147: 2.7V to 4.4V - TC147A: 2.V to.v Wide Temperature Measurement Range: - -4 o C to +12 o C High Temperature Converter Accuracy:

More information

AVR305: Half Duplex Compact Software UART. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

AVR305: Half Duplex Compact Software UART. 8-bit Microcontrollers. Application Note. Features. 1 Introduction AVR305: Half Duplex Compact Software UART Features 32 Words of Code, Only Handles Baud Rates of up to 38.4 kbps with a 1 MHz XTAL Runs on Any AVR Device Only Two Port Pins Required Does Not Use Any Timer

More information

8-bit Microcontroller. Application Note. AVR415: RC5 IR Remote Control Transmitter. Features. Introduction. Figure 1.

8-bit Microcontroller. Application Note. AVR415: RC5 IR Remote Control Transmitter. Features. Introduction. Figure 1. AVR415: RC5 IR Remote Control Transmitter Features Utilizes ATtiny28 Special HW Modulator and High Current Drive Pin Size Efficient Code, Leaves Room for Large User Code Low Power Consumption through Intensive

More information

AN1470. Manchester Decoder Using the CLC and NCO ABSTRACT INTRODUCTION MANCHESTER ENCODED DATA (AS PER G.E. THOMAS)

AN1470. Manchester Decoder Using the CLC and NCO ABSTRACT INTRODUCTION MANCHESTER ENCODED DATA (AS PER G.E. THOMAS) Manchester Decoder Using the CLC and NCO Authors: ABSTRACT A Manchester decoder can be built using Microchip s award winning CLC (Configurable Logic Cell) blocks and NCO (Numerically Controlled Oscillator)

More information

AN1156. Battery Fuel Measurement Using Delta-Sigma ADC Devices INTRODUCTION REVIEW OF BATTERY CHARGING AND DISCHARGING CHARACTERISTICS

AN1156. Battery Fuel Measurement Using Delta-Sigma ADC Devices INTRODUCTION REVIEW OF BATTERY CHARGING AND DISCHARGING CHARACTERISTICS Battery Fuel Measurement Using Delta-Sigma ADC Devices Author: INTRODUCTION Youbok Lee, Ph.D. Microchip Technology Inc. The battery fuel status indicator is a common feature of the battery-supported handheld

More information

AN1265. KEELOQ with AES Microcontroller-Based Code Hopping Encoder INTRODUCTION DUAL ENCODER OPERATION BACKGROUND FUNCTIONAL INPUTS AND

AN1265. KEELOQ with AES Microcontroller-Based Code Hopping Encoder INTRODUCTION DUAL ENCODER OPERATION BACKGROUND FUNCTIONAL INPUTS AND KEELOQ with AES Microcontroller-Based Code Hopping Encoder Authors: INTRODUCTION This application note describes the design of a microcontroller-based KEELOQ Hopping Encoder using the AES encryption algorithm.

More information

Flexible Active Shutter Control Interface using the MC1323x

Flexible Active Shutter Control Interface using the MC1323x Freescale Semiconductor Document Number: AN4353 Application Note Rev. 0, 9/2011 Flexible Active Shutter Control Interface using the MC1323x by: Dennis Lui Freescale Hong Kong 1 Introduction This application

More information

8-bit RISC Microcontroller. Application Note. AVR236: CRC Check of Program Memory

8-bit RISC Microcontroller. Application Note. AVR236: CRC Check of Program Memory AVR236: CRC Check of Program Memory Features CRC Generation and Checking of Program Memory Supports all AVR Controllers with LPM Instruction Compact Code Size, 44 Words (CRC Generation and CRC Checking)

More information

Section 15. Input Capture

Section 15. Input Capture Section 15. Input Capture HIGHLIGHTS This section of the manual contains the following topics: 15.1 Introduction...15-2 15.2 Input Capture Registers...15-4 15.3 Timer Selection...15-8 15.4 Input Capture

More information

AN236. X-10 Home Automation Using the PIC16F877A HARDWARE OVERVIEW INTRODUCTION TEST SETUP WHEN USING DEVELOPMENT TOOLS. Microchip Technology Inc.

AN236. X-10 Home Automation Using the PIC16F877A HARDWARE OVERVIEW INTRODUCTION TEST SETUP WHEN USING DEVELOPMENT TOOLS. Microchip Technology Inc. X-10 Home Automation Using the PIC16F877A Author: INTRODUCTION Jon Burroughs Microchip Technology Inc. X-10 is a communication protocol designed for sending signals over 120 VAC wiring. X-10 uses 120 khz

More information

AN885. Brushless DC (BLDC) Motor Fundamentals INTRODUCTION CONSTRUCTION AND OPERATING PRINCIPLE. Stator. Padmaraja Yedamale Microchip Technology Inc.

AN885. Brushless DC (BLDC) Motor Fundamentals INTRODUCTION CONSTRUCTION AND OPERATING PRINCIPLE. Stator. Padmaraja Yedamale Microchip Technology Inc. Brushless DC (BLDC) Motor Fundamentals AN885 Author: INTRODUCTION Padmaraja Yedamale Microchip Technology Inc. Brushless Direct Current (BLDC) motors are one of the motor types rapidly gaining popularity.

More information

Uninstalling Incorrect USB Device Drivers

Uninstalling Incorrect USB Device Drivers DEVELOPMENT SYSTEMS Uninstalling Incorrect USB Device Drivers RECOMMENDED UNINSTALL METHODS When using the Microchip development tools listed below, trouble may be experienced as a result of incorrect

More information

AVR317: Using the Master SPI Mode of the USART module. 8-bit Microcontrollers. Application Note. Features. Introduction

AVR317: Using the Master SPI Mode of the USART module. 8-bit Microcontrollers. Application Note. Features. Introduction AVR317: Using the Master SPI Mode of the USART module Features Enables Two SPI buses in one device Hardware buffered SPI communication Polled communication example Interrupt-controlled communication example

More information

AN2680 Application note

AN2680 Application note Application note Fan speed controller based on STDS75 or STLM75 digital temperature sensor and ST72651AR6 MCU Introduction This application note describes the method of defining the system for regulating

More information

PIC32 Microcontroller Families

PIC32 Microcontroller Families 32-bit Microcontrollers Winter 2009 PIC32 Microcontroller Families With USB, CAN and Ethernet www.microchip.com/pic32 Building on the heritage of Microchip Technology s world-leading 8- and 16-bit PIC

More information

TC7660. Charge Pump DC-to-DC Voltage Converter. Package Types. Features. General Description. Applications. Functional Block Diagram TC7660

TC7660. Charge Pump DC-to-DC Voltage Converter. Package Types. Features. General Description. Applications. Functional Block Diagram TC7660 Charge Pump DC-to-DC Voltage Converter Features Wide Input Voltage Range:.V to V Efficient Voltage Conversion (99.9%, typ) Excellent Power Efficiency (9%, typ) Low Power Consumption: µa (typ) @ V IN =

More information

Features, Value and Benefits of Digital Control for Power Supplies

Features, Value and Benefits of Digital Control for Power Supplies Author: INTRODUCTION Sagar Khare Microchip Technology Inc. Control of Switch Mode Power Supplies (SMPSs) has traditionally been a purely analog domain. The advent of low-cost, high-performance Digital

More information

How To Improve Electromagnetic Compatibility

How To Improve Electromagnetic Compatibility Introducing the EMC Newsletter What is EMC? Issue 1, November 2004 NOVEMBER 2004 Rodger Richey Senior Applications Manager Welcome to the first issue of the EMC Newsletter created by the Application Engineers

More information

TCP/IP Networking: Web-Based Status Monitoring

TCP/IP Networking: Web-Based Status Monitoring TCP/IP Networking: Web-Based Status Monitoring Microchip TCP/IP Stack HTTP2 Module 2007 Microchip Technology Incorporated. All Rights Reserved. Web-Based Status Monitoring Slide 1 Welcome to the first

More information

MCP2515 Development Kit User s Guide

MCP2515 Development Kit User s Guide M MCP Development Kit User s Guide 00 Microchip Technology Inc. DSA Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification contained in

More information

Touch Through Metal. mtouch Metal Over Capacitive Technology Part 1

Touch Through Metal. mtouch Metal Over Capacitive Technology Part 1 Touch Through Metal mtouch Metal Over Capacitive Technology Part 1 2010 Microchip Technology Incorporated. All Rights Reserved. Touch Through Metal Slide 1 Hello and welcome to Microchip s Touch Through

More information

Fondamenti su strumenti di sviluppo per microcontrollori PIC

Fondamenti su strumenti di sviluppo per microcontrollori PIC Fondamenti su strumenti di sviluppo per microcontrollori PIC MPSIM ICE 2000 ICD 2 REAL ICE PICSTART Ad uso interno del corso Elettronica e Telecomunicazioni 1 2 MPLAB SIM /1 MPLAB SIM is a discrete-event

More information