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

Size: px
Start display at page:

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

Transcription

1 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 question is almost always: What s the equivalent opcode? Some operations, like addition and subtraction, are self-evident and practically universal. Other instructions may have some subtle differences in syntax or spelling that make direct conversions a bit trickier. Occasionally, some instructions simply don t have a direct equivalent in the target set, or an equivalent exists but is explained in different terms. Another question that arises is that of addressing modes. Typically, Direct and Indirect Addressing modes are standard in all architectures. However, they tend to be different in limitations and feature set. To help simplify the conversion process, this application note provides a table of the instruction set of the bit microcontroller family and their equivalents in the PICmicro instruction sets (Table ). It is organized alphabetically by the 805 instruction mnemonic in the first column, followed by the common description of the operation and the closest equivalent opcode or opcode sequence in the PIC6 and PIC8 instruction sets. In addition, the size of the instructions (in words or bytes, as appropriate) and the number of machine or instruction cycles required for execution are listed for each entry. There are some instructions in the PICmicro architecture that do not have exact equivalents in the 805 architecture. For the convenience of users more familiar with 805 instructions, these are listed separately in Table. They are organized by the PIC8 mnemonic in the first column, followed by the PIC6 equivalent, the closest 805 equivalent or equivalent sequence and the common description. Again, information on the instruction size and execution time is provided. It is important to remember that this reference list is only a starting point for code conversion. There are several considerations to keep in mind when moving code from 8-bit 805 devices to PICmicro devices:. The basic processor architecture is significantly different. The 805 processor core is a von Neumann machine which places data and program memory in the same flat memory space and accesses all information through a single bus. In contrast, all PICmicro processor cores are Harvard machines which use separate data and program memory spaces and two separate busses.. Both the 805 and PICmicro devices use a data memory that is 8 bits wide. With their core architecture, 805 devices are also limited to 8-bit wide program memories as well. PICmicro devices, on the other hand, have program memories that are either 4 bits or 6 bits wide (PIC6 and PIC8 families, respectively). 3. The 805 devices result in greater variance in the size of instructions, from one to three bytes (depending on the operand requirements of the instruction). In contrast, PICmicro instructions are mostly single-word (two bytes) with a small amount of two-word instructions. In general, the first byte of the opcode represents the instruction, while the second byte represents the data or address payload. 003 Technology Inc. DS00880A-page

2 4. Addressing modes in 805 and their equivalents in PIC microcontrollers: a) Direct Addressing: Both the PIC and the 805 architecture support the Direct Addressing mode, where an 8-bit address is specified in the operand. On the 805, only the lower 8 bytes of RAM and SFRs can be accessed in this mode. On the PIC architecture, the entire data memory is accessible in this mode. b) Indirect Addressing: Both the PIC MCUs and the 805 support this mode, where a register contains the address of the operand. The 805 cannot access SFRs in this mode. It can access both internal and external memory in this mode. PIC devices can access whole data memory and SFRs in this mode. PIC devices cannot access external memory data in this mode (some devices on the PIC8 architecture offer external data memory; however, it is accessed in Indexed Addressing mode). The 805 uses R0, R and DPTR for indirect access. PIC devices use File Select Registers (FSR) for Indirect Addressing. The FSRs also provide the options for preincrement, post-increment, post-decrement and the use of 8-bit offsets on PIC8 devices. c) Register Instructions: The register banks on the 805 can be accessed by certain instructions that carry 3-bit information. This mode is available only on the 805. d) Register Specific Instructions: On the 805, some instructions are specific to certain registers (e.g., CPL A). On the PIC MCUs, most of the instructions can work on any register (e.g., same instruction as COMF M, F). e) Immediate Constants: The value of constant (literal) is in opcode. On the 805, the Immediate Constants is one addressing mode and it can be used with many instructions. In PIC architecture, different equivalent instructions handle Immediate Constants. These are documented under literal-based operations. f) Indexed Addressing: Only program memory is accessed in this mode on the 805. It is used to read the program memory content. On the PIC6, this is implemented through program memory access SFRs. On the PIC8, TBLRD instructions provide the read access to program memory. This instruction also provides options to pre-increment, postincrement and post-decrement the access pointers. The PIC architecture provides a way to write to program memory. The PIC8 implements various options for TBLWT (table write, similar to table read). The 805 architecture does not provide instructions to write to program memory. The external data memory on some of the PIC8 devices can be accessed in this mode. 5. The 805 implements 8 bits of bit addressable memory. Some of the instructions can directly operate on these bit variables. Some of the SFRs are accessible in bit addressing modes. In PIC architecture, any bit in data memory is accessible through bit access instructions. Some of the instructions with bit addressing modes in the 805 do not have equivalent instructions in PIC architecture. 6. The classic 805 architecture supports only 384 bytes of internal RAM. However, the variant of the architecture with expanded RAM exists. This provides additional internal RAM. This RAM is mapped as external RAM and one needs to access it in a way similar to external RAM (e.g., MOVX instruction). On the PIC devices, the entire internal RAM (up to 4K on the PIC8) is accessed in the same way through direct and indirect addressing. 7. The equivalent register and FSR name 4-bit location/function are different in both architectures (e.g., PSW in the 805 is equivalent to the Status register in PICmicro devices). Users are encouraged to review the documentation for both architectures. All of these differences can significantly change the way that both data and logical program structures are implemented. This is particularly true when indexed and indirect addressing methods are used to direct code execution. Users are encouraged to review existing application notes for the appropriate family to get an idea of how different applications are implemented. DS00880A-page 003 Technology Inc.

3 TABLE : 805 INSTRUCTIONS AND THEIR MICROCHIP EQUIVALENTS 805 PIC6 PIC8 Instruction Bytes Cycles Instruction(s) Words Cycles Instruction(s) Bytes Cycles ACALL Absolute Call CALL RCALL rel ADD ADD A #data - Add without Carry () ADDWF M, F Add Literal and WREG (Accumulator) () ADDLW ADDC - Add with Carry () BTFSC STATUS, C INCF M, F ADDWF M, F ADDWF M, F ADDLW 3 3 ADDWFC M, F AJMP Absolute Jump GOTO Addr BRA rel ANL ANL A #data Logical AND () Logical AND Literal with WREG (Accumulator) () ANDWF M, F ANDLW ANDWF M, F ANDLW ANL Bit Logical AND for bit variables No equivalent instruction CJNE 3 Compare and Jump if Not Equal () SUBWF M, W BTFSS STATUS, Z GOTO Addr CLR A Clear Accumulator (5) Clear Memory CLRW CLRF M, F 3 4 CPFSEQ M BRA Addr CLRF WREG CLRF M, F 4 4 CLR bit - Clear bit BCF M, F BCF M, F CPL A Complement Accumulator (/Memory) (5) COMF M, F COMF M, F CPL bit - Complement bit MOVLW # XORWF M, F BTG M, F Legend: For PICmicro mnemonics: M = memory location, n = specific bit location, F = file register, addr = full 3-bit or 0-bit address, rel = 8-bit or -bit offset, WREG = W register (equivalent to accumulator in 805 architecture). Note : Direct or indirect addressing version of instruction depending on the registers selected by M and F; equivalent to Direct, Indirect or Indexed Addressing modes in 805 architecture. : Immediate addressing version of instruction; equivalent to Immediate Addressing mode in 805 architecture. 3: Reference routines are the 8-bit fixed-point Multiply and Divide routines specified in the application note, AN67, Fixed Point Routines (DS0067). 4: Reference routine for PIC8 devices is the 8-bit fixed-point Divide routine provided with the MPLAB C8 C compiler. 5: Register specific instruction on 805 architecture. On PICmicro devices, it works on all memory locations. 003 Technology Inc. DS00880A-page 3

4 TABLE : 805 INSTRUCTIONS AND THEIR MICROCHIP EQUIVALENTS (CONTINUED) 805 Instruction Bytes Cycles DAA Decimal Adjust Accumulator ADDLW 0x06 BTFSS STATUS, DC GOTO $+3 ADDLW 0x0 GOTO $+ ADDLW 0xFA ADDLW 0x60 BTFSS STATUS, DC ADDLW 0xA0 9 0 DAW DEC - Decrement () DECF M, F DECF M, F DIV 4 Divide Divide Routine 4 69 Divide Routine DJNZ -3 Decrement and Jump if Not Zero DECF M, F BTFSS STATUS, Z 3 4 DCFSNZ M, F BRA rel 4 3 INC - Increment () INCF M, F INCF M, F INC DPTR Increment Data Pointer INCF FSR, F INFSNZ FSR0L, F INCF FSR0H, F JB Bit, rel 3 Jump if bit set BTFSC M, n JBC Bit, rel 3 Jump if bit set and Clear bit No equivalent instruction JC rel Jump if Carry is set BTFSC STATUS, C 3 BTFSC M, n BRA rel BC rel + DPTR Jump Indirect MOVWF PCL MOVWF PCL JNB bit, rel 3 Jump if bit is not set BTFSS M, n PIC6 PIC8 Instruction(s) Words Cycles Instruction(s) Bytes Cycles 3 BTFSS M, n BRA rel 4 3 Legend: For PICmicro mnemonics: M = memory location, n = specific bit location, F = file register, addr = full 3-bit or 0-bit address, rel = 8-bit or -bit offset, WREG = W register (equivalent to accumulator in 805 architecture). Note : Direct or indirect addressing version of instruction depending on the registers selected by M and F; equivalent to Direct, Indirect or Indexed Addressing modes in 805 architecture. : Immediate addressing version of instruction; equivalent to Immediate Addressing mode in 805 architecture. 3: Reference routines are the 8-bit fixed-point Multiply and Divide routines specified in the application note, AN67, Fixed Point Routines (DS0067). 4: Reference routine for PIC8 devices is the 8-bit fixed-point Divide routine provided with the MPLAB C8 C compiler. 5: Register specific instruction on 805 architecture. On PICmicro devices, it works on all memory locations. DS00880A-page Technology Inc.

5 TABLE : 805 INSTRUCTIONS AND THEIR MICROCHIP EQUIVALENTS (CONTINUED) 805 Instruction Bytes Cycles JNC rel Jump if Carry not set BTFSS STATUS, C JNZ rel Jump if Accumulator Not Zero BTFSS STATUS, Z JZ rel Jump if Accumulator Zero BTFSC STATUS, Z 3 BNC rel 3 BNZ rel 3 BZ rel LCALL addr6 3 Long Call CALL Addr CALL Addr 4 3 LJMP addr6 3 Long Jump GOTO Addr GOTO Addr 4 3 MOV N, M -3 - Move byte variable MOVF M, W MOVFF N, M 4 MOV A, #data Move Literal to WREG (Accumulator) MOVWF N MOVLW # MOVLW # MOV Db Sb - Move bit Data No equivalent instruction MOV DPTR, #data6 3 Load Data Pointer with a 6-bit constant MOVLW data MOVWF FSR PIC6 PIC8 Instruction(s) Words Cycles Instruction(s) Bytes Cycles LFSR data MOVC Move Code byte No equivalent PIC6 instruction TBLRD* MOVX Move External No equivalent PIC6 instruction TBLRD* MUL AB 4 Multiply (5) Multiply Routine 74 MULWF M, F NOP No NOP NOP ORL -3 - Logical OR for byte variables () IORWF M, F IORWF M, F ORL Bit Logical OR for bit variables No equivalent instruction POP Pop from Stack No equivalent PIC6 instruction POP PUSH Push from Stack No equivalent PIC6 instruction PUSH RET Return from Subroutine RETURN RETURN RETI Return from Interrupt RETFIE RETFIE Legend: For PICmicro mnemonics: M = memory location, n = specific bit location, F = file register, addr = full 3-bit or 0-bit address, rel = 8-bit or -bit offset, WREG = W register (equivalent to accumulator in 805 architecture). Note : Direct or indirect addressing version of instruction depending on the registers selected by M and F; equivalent to Direct, Indirect or Indexed Addressing modes in 805 architecture. : Immediate addressing version of instruction; equivalent to Immediate Addressing mode in 805 architecture. 3: Reference routines are the 8-bit fixed-point Multiply and Divide routines specified in the application note, AN67, Fixed Point Routines (DS0067). 4: Reference routine for PIC8 devices is the 8-bit fixed-point Divide routine provided with the MPLAB C8 C compiler. 5: Register specific instruction on 805 architecture. On PICmicro devices, it works on all memory locations. 003 Technology Inc. DS00880A-page 5

6 TABLE : 805 INSTRUCTIONS AND THEIR MICROCHIP EQUIVALENTS (CONTINUED) 805 RL Rotate Accumulator Left No equivalent PIC6 instruction RLNCF M, F RLC Rotate Accumulator Left through Carry () RLF M, F RLCF M, F RRC Rotate Accumulator Right () No equivalent PIC6 instruction RRNCF M, F RRC Rotate Accumulator Right through Carry () RRF M, F RRCF M, F SETB - Set bit BSF M, F BSF M, F SJMP rel Short Jump BRA rel SUBB - Subtract with Borrow () BTFSS STATUS, C INCF M, F SUBWF M, F SUBWFB M, F SWAP A Swap nibbles within the Accumulator (5) SWAPF M, F SWAPF M, F XCH XCHD Instruction Bytes Cycles XRL XRL A #data Exchange Accumulator with byte variable Exchange Digit Logical Exclusive OR for byte variables () Exclusive OR Literal with WREG (Accumulator) PIC6 PIC8 Instruction(s) Words Cycles Instruction(s) Bytes Cycles No equivalent instruction XORWF M, F XORLW XORWF M, F XORLW Legend: For PICmicro mnemonics: M = memory location, n = specific bit location, F = file register, addr = full 3-bit or 0-bit address, rel = 8-bit or -bit offset, WREG = W register (equivalent to accumulator in 805 architecture). Note : Direct or indirect addressing version of instruction depending on the registers selected by M and F; equivalent to Direct, Indirect or Indexed Addressing modes in 805 architecture. : Immediate addressing version of instruction; equivalent to Immediate Addressing mode in 805 architecture. 3: Reference routines are the 8-bit fixed-point Multiply and Divide routines specified in the application note, AN67, Fixed Point Routines (DS0067). 4: Reference routine for PIC8 devices is the 8-bit fixed-point Divide routine provided with the MPLAB C8 C compiler. 5: Register specific instruction on 805 architecture. On PICmicro devices, it works on all memory locations. DS00880A-page Technology Inc.

7 TABLE : MICROCHIP PIC8 INSTRUCTIONS WITHOUT EXACT EQUIVALENTS IN THE 805 FAMILY 805 Equivalent to PIC8 #Bytes #Cycles Equivalent to PIC6 #Words #Cycles Name #Bytes #Cycles BN rel BTFSC M, 7 GOTO Addr BNN rel BTFSS M, 7 GOTO Addr BNOV rel BTFSS STATUS, OV GOTO Addr BOV rel BTFSC STATUS, OV GOTO Addr 3 Branch if Negative No equivalent instruction 3 Branch if Not Negative No equivalent instruction 3 Branch if Not Overflow JNB PSW. rel 3 3 Branch if Overflow JB PSW. rel 3 CLRWDT CLRWDT Clear Watchdog Timer No equivalent instruction CPFSGT M No equivalent PIC6 instruction Compare M with W, skip if M > W CPFSLT M No equivalent PIC6 instruction Compare M with W, skip if M < W DECFSZ M, F DECFSZ M, F Decrement M, skip if 0 () DEC JNZ INCFSZ M, F INCFSZ M, F Increment M, skip if 0 () INC JNZ INFSNZ M, F No equivalent PIC6 instruction Increment M, skip if not 0 () INC JZ MOVLB # BSF/BCF STATUS, RP0 BSF/BCF STATUS, RP NEGF M, F COMF M, F INCF M, F No equivalent instruction No equivalent instruction Move Literal to BSR CLR/SETB PSW.3 CLR/SETB PSW.4 Negate (Two s Complement) XCH A, M CPL A INC A XCH A, M RESET No equivalent PIC6 instruction Reset No equivalent instruction RETLW RETLW Return Literal to W MOV A # RET Legend: For PICmicro mnemonics: M = memory location, n = specific bit location, F = file register, addr = full 3-bit or 0-bit address, rel = 8-bit or -bit offset, WREG = W register (equivalent to accumulator in 805 architecture). Note : Direct or indirect addressing version of instruction depending on the registers selected by M and F; equivalent to Direct, Indirect or Indexed Addressing modes in 805 architecture. 003 Technology Inc. DS00880A-page 7

8 TABLE : MICROCHIP PIC8 INSTRUCTIONS WITHOUT EXACT EQUIVALENTS IN THE 805 FAMILY 805 Equivalent to PIC8 #Bytes #Cycles Equivalent to PIC6 #Words #Cycles Name #Bytes #Cycles SETF MOVLW 0xFF MOVWF M SLEEP SLEEP Enter Sleep (Power-down) mode Set File to all s MOV M, # 3 MOV A, #0x ORL PCON, A SUBWF M, F SUBWF M, F Subtract W from M () No equivalent instruction TBLRD (*+; *-; +*) No equivalent PIC6 instruction Table Read with pointer manipulation TBLWT (*; *+; *-; +*) No equivalent PIC6 instruction Table Write with pointer manipulation No equivalent instruction No equivalent instruction 4 TSTFSZ M No equivalent PIC6 instruction Test M, skip if 0 CJNE M, #0, rel 3 Legend: For PICmicro mnemonics: M = memory location, n = specific bit location, F = file register, addr = full 3-bit or 0-bit address, rel = 8-bit or -bit offset, WREG = W register (equivalent to accumulator in 805 architecture). Note : Direct or indirect addressing version of instruction depending on the registers selected by M and F; equivalent to Direct, Indirect or Indexed Addressing modes in 805 architecture. DS00880A-page Technology Inc.

9 Note the following details of the code protection feature on devices: products meet the specification contained in their particular Data Sheet. believes that its family of products is one of the most secure families 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 products in a manner outside the operating specifications contained in 's Data Sheets. Most likely, the person doing so is engaged in theft of intellectual property. is willing to work with the customer who is concerned about the integrity of their code. Neither 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 are committed to continuously improving the code protection features of our products. Attempts to break microchip s code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act. 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. No representation or warranty is given and no liability is assumed by 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 s products as critical components in life support systems is not authorized except with express written approval by. No licenses are conveyed, implicitly or otherwise, under any intellectual property rights. Trademarks The name and logo, the logo, Accuron, dspic, KEELOQ, MPLAB, PIC, PICmicro, PICSTART, PRO MATE and PowerSmart are registered trademarks of Technology Incorporated in the U.S.A. and other countries. AmpLab, FilterLab, microid, MXDEV, MXLAB, PICMASTER, SEEVAL and The Embedded Control Solutions Company are registered trademarks of Technology Incorporated in the U.S.A. Application Maestro, dspicdem, dspicdem.net, ECAN, ECONOMONITOR, FanSense, FlexROM, fuzzylab, In-Circuit Serial Programming, ICSP, ICEPIC, microport, Migratable Memory, MPASM, MPLIB, MPLINK, MPSIM, PICkit, PICDEM, PICDEM.net, PowerCal, PowerInfo, PowerMate, PowerTool, rflab, rfpic, Select Mode, SmartSensor, SmartShunt, SmartTel and Total Endurance are trademarks of Technology Incorporated in the U.S.A. and other countries. Serialized Quick Turn Programming (SQTP) is a service mark of Technology Incorporated in the U.S.A. All other trademarks mentioned herein are property of their respective companies. 003, Technology Incorporated, Printed in the U.S.A., All Rights Reserved. Printed on recycled paper. received QS-9000 quality system certification for its worldwide headquarters, design and wafer fabrication facilities in Chandler and Tempe, Arizona in July 999 and Mountain View, California in March 00. The Company s quality system processes and procedures are QS-9000 compliant for its PICmicro 8-bit MCUs, KEELOQ code hopping devices, Serial EEPROMs, microperipherals, non-volatile memory and analog products. In addition, s quality system for the design and manufacture of development systems is ISO 900 certified. DS00880A-page Technology Inc.

10 WORLDWIDE SALES AND SERVICE AMERICAS Corporate Office 355 West Chandler Blvd. Chandler, AZ Tel: Fax: Technical Support: Web Address: Atlanta 3780 Mansell Road, Suite 30 Alpharetta, GA 300 Tel: Fax: Boston Lan Drive, Suite 0 Westford, MA 0886 Tel: Fax: Chicago 333 Pierce Road, Suite 80 Itasca, IL 6043 Tel: Fax: Dallas 4570 Westgrove Drive, Suite 60 Addison, TX 7500 Tel: Fax: Detroit Tri-Atria Office Building 355 Northwestern Highway, Suite 90 Farmington Hills, MI Tel: Fax: Kokomo 767 S. Albright Road Kokomo, IN 4690 Tel: Fax: Los Angeles 80 Von Karman, Suite 090 Irvine, CA 96 Tel: Fax: Phoenix 355 West Chandler Blvd. Chandler, AZ Tel: Fax: San Jose 07 North First Street, Suite 590 San Jose, CA 953 Tel: Fax: Toronto 685 Northam Drive, Suite 08 Mississauga, Ontario L4V X5, Canada Tel: Fax: ASIA/PACIFIC Australia Suite, 4 Rawson Street Epping, NSW Australia Tel: Fax: China - Beijing Unit 95 Bei Hai Wan Tai Bldg. No. 6 Chaoyangmen Beidajie Beijing, 0007, No. China Tel: Fax: China - Chengdu Rm , 4th Floor, Ming Xing Financial Tower No. 88 TIDU Street Chengdu 6006, China Tel: Fax: China - Fuzhou Unit 8F, World Trade Plaza No. 7 Wusi Road Fuzhou 35000, China Tel: Fax: China - Hong Kong SAR Unit 90-6, Tower, Metroplaza 3 Hing Fong Road Kwai Fong, N.T., Hong Kong Tel: Fax: China - Shanghai Room 70, Bldg. B Far East International Plaza No. 37 Xian Xia Road Shanghai, 0005 Tel: Fax: China - Shenzhen Rm. 8, 8/F, Building A, United Plaza No. 50 Binhe Road, Futian District Shenzhen 58033, China Tel: Fax: China - Shunde Room 40, Hongjian Building No. Fengxiangnan Road, Ronggui Town Shunde City, Guangdong 58303, China Tel: Fax: China - Qingdao Rm. B505A, Fullhope Plaza, No. Hong Kong Central Rd. Qingdao 6607, China Tel: Fax: India Divyasree Chambers Floor, Wing A (A3/A4) No., O Shaugnessey Road Bangalore, , India Tel: Fax: Japan Benex S- 6F 3-8-0, Shinyokohama Kohoku-Ku, Yokohama-shi Kanagawa, -0033, Japan Tel: Fax: Korea 68-, Youngbo Bldg. 3 Floor Samsung-Dong, Kangnam-Ku Seoul, Korea Tel: Fax: or Singapore 00 Middle Road #07-0 Prime Centre Singapore, Tel: Fax: Taiwan Kaohsiung Branch 30F - No. 8 Min Chuan nd Road Kaohsiung 806, Taiwan Tel: Fax: Taiwan Taiwan Branch F-3, No. 07 Tung Hua North Road Taipei, 05, Taiwan Tel: Fax: EUROPE Austria Durisolstrasse A-4600 Wels Austria Tel: Fax: Denmark Regus Business Centre Lautrup hoj -3 Ballerup DK-750 Denmark Tel: Fax: France Parc d Activite du Moulin de Massy 43 Rue du Saule Trapu Batiment A - ler Etage 9300 Massy, France Tel: Fax: Germany Steinheilstrasse 0 D Ismaning, Germany Tel: Fax: Italy Via Quasimodo, 005 Legnano (MI) Milan, Italy Tel: Fax: Netherlands P. A. De Biesbosch 4 NL-55 SC Drunen, Netherlands Tel: Fax: United Kingdom 505 Eskdale Road Winnersh Triangle Wokingham Berkshire, England RG4 5TU Tel: Fax: /8/03 DS00880A-page 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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Chapter 2: Assembly Language Programming. The PIC18 Microcontroller. Han-Way Huang

Chapter 2: Assembly Language Programming. The PIC18 Microcontroller. Han-Way Huang Chapter 2: Assembly Language Programming The PIC18 Microcontroller Han-Way Huang Minnesota State University, Mankato H. Huang Transparency No.2-1 Components of an Assembly Program - Assembler directives

More information

Quick Reference. B.5 12-Bit Core Instruction Set APPENDICES

Quick Reference. B.5 12-Bit Core Instruction Set APPENDICES Quic Reference B.5 12-Bit ore Instruction Set Microchip s base-line 8-bit microcontroller family uses a 12-bit wide instruction set. All instructions execute in a single instruction cycle unless otherwise

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

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

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

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

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

Flash Microcontroller. Architectural Overview. Features. Block Diagram. Figure 1. Block Diagram of the AT89C core

Flash Microcontroller. Architectural Overview. Features. Block Diagram. Figure 1. Block Diagram of the AT89C core Features 8-Bit CPU Optimized for Control Applications Extensive Boolean Processing Capabilities (Single-Bit Logic) On-Chip Flash Program Memory On-Chip Data RAM Bidirectional and Individually Addressable

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

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

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

25AA640/25LC640. 64K SPI Bus Serial EEPROM. Device Selection Table. Description. Features. Block Diagram. Package Types

25AA640/25LC640. 64K SPI Bus Serial EEPROM. Device Selection Table. Description. Features. Block Diagram. Package Types 64K SPI Bus Serial EEPROM Device Selection Table Part Number Features VCC Range Max Clock Frequency Low-power CMOS technology - Write current: 3 ma typical - Read current: 500 µa typical - Standby current:

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

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

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

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

Instruction Set. Microcontroller Instruction Set. Instructions that Affect Flag Settings (1) The Instruction Set and Addressing Modes

Instruction Set. Microcontroller Instruction Set. Instructions that Affect Flag Settings (1) The Instruction Set and Addressing Modes Microcontroller For interrupt response time information, refer to the hardware description chapter. Instructions that ffect Flag Settings (1) Instruction Flag Instruction Flag C OV C C OV C DD X X X CLR

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

TC4421/TC4422. Functional Block Diagram. TC4421 Inverting. TC4422 Non-Inverting V DD. 300 mv Output. Input 4.7V. GND Effective. Input.

TC4421/TC4422. Functional Block Diagram. TC4421 Inverting. TC4422 Non-Inverting V DD. 300 mv Output. Input 4.7V. GND Effective. Input. 9A High-Speed MOSFET Drivers Features High Peak Output Current: 9A Wide Input Supply Voltage Operating Range: - 4.5V to 18V High Continuous Output Current: 2A Max Fast Rise and Fall Times: - 3 ns with

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

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

Motor Control Sensor Feedback Circuits. Power Management. PICmicro Input Microcontroller Driver Motor. Direction Current Sensor

Motor Control Sensor Feedback Circuits. Power Management. PICmicro Input Microcontroller Driver Motor. Direction Current Sensor M AN894 Motor Control Sensor Feedback Circuits Author: INTRODUCTION Jim Lepkowski Microchip Technology Inc. Sensors are a critical component in a motor control system. They are used to sense the current,

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

AN889. VF Control of 3-Phase Induction Motors Using PIC16F7X7 Microcontrollers VF CONTROL INTRODUCTION. Microchip Technology Inc.

AN889. VF Control of 3-Phase Induction Motors Using PIC16F7X7 Microcontrollers VF CONTROL INTRODUCTION. Microchip Technology Inc. VF Control of 3-Phase Induction Motors Using PIC16F7X7 Microcontrollers AN889 Author: INTRODUCTION Rakesh Parekh Microchip Technology Inc. An induction motor can run only at its rated speed when it is

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

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

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

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

High-Speed CAN Transceiver

High-Speed CAN Transceiver M MCP2551 High-Speed CAN Transceiver Features Package Types Supports 1 Mb/s operation Implements ISO-11898 standard physical layer requirements Suitable for 12V and 24V systems PDIP/SOIC TXD 1 8 RS Externally-controlled

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

AN990. Analog Sensor Conditioning Circuits An Overview INTRODUCTION SENSOR APPLICATIONS. Target Audience. Goals. Description.

AN990. Analog Sensor Conditioning Circuits An Overview INTRODUCTION SENSOR APPLICATIONS. Target Audience. Goals. Description. Analog Conditioning Circuits An Overview Author: INTRODUCTION Target Audience This application note is intended for hardware design engineers that need to condition the output of common analog sensors.

More information

Atmel 8051 Microcontrollers Hardware Manual

Atmel 8051 Microcontrollers Hardware Manual Atmel 8051 Microcontrollers Hardware Manual Table of Contents Section 1 The 8051 Instruction Set... 1-2 1.1 Program Status Word...1-2 1.2 Addressing Modes...1-3 1.3 Arithmetic Instructions...1-5 1.4 Logical

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

8051 hardware summary

8051 hardware summary 8051 hardware summary 8051 block diagram 8051 pinouts + 5V ports port 0 port 1 port 2 port 3 : dual-purpose (general-purpose, external memory address and data) : dedicated (interfacing to external devices)

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

MCP1701A. 2 µa Low-Dropout Positive Voltage Regulator. Features. General Description. Applications. Package Types

MCP1701A. 2 µa Low-Dropout Positive Voltage Regulator. Features. General Description. Applications. Package Types 2 µa Low-Dropout Positive Voltage Regulator Features 2.0 µa Typical Quiescent Current Input Operating Voltage Range up to 10.0V Low-Dropout Voltage (LDO): - 120 mv (typical) @ 100 ma - 380 mv (typical)

More information

Call Subroutine (PC<15:0>) TOS, (W15)+2 W15 (PC<23:16>) TOS, Process data. Write to PC NOP NOP NOP NOP

Call Subroutine (PC<15:0>) TOS, (W15)+2 W15 (PC<23:16>) TOS, Process data. Write to PC NOP NOP NOP NOP Section 3. Descriptions CALL Call Subroutine Syntax: {label:} CALL lit23 CALL.S Operands: lit23 [0... 8388606] (PC)+4 PC, (PC) TOS, (W15)+2 W15 (PC) TOS, (W15)+2 W15 lit23 PC, NOP Register.

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

AN1212. Using USB Keyboard with an Embedded Host INTRODUCTION. USB Keyboard Overview. USB Keyboard with an Embedded Host USB KEYBOARD OUTPUT REPORT

AN1212. Using USB Keyboard with an Embedded Host INTRODUCTION. USB Keyboard Overview. USB Keyboard with an Embedded Host USB KEYBOARD OUTPUT REPORT Using USB Keyboard with an Embedded Host Author: INTRODUCTION Amardeep Gupta Microchip Technology Inc. Microcontroller applications can easily support USB embedded host functionality with the introduction

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

AN1095. Emulating Data EEPROM for PIC18 and PIC24 Microcontrollers and dspic Digital Signal Controllers INTRODUCTION THEORY OF OPERATION

AN1095. Emulating Data EEPROM for PIC18 and PIC24 Microcontrollers and dspic Digital Signal Controllers INTRODUCTION THEORY OF OPERATION A1095 Emulating Data EEPROM for PIC18 and PIC24 Microcontrollers and dspic Digital Signal Controllers Author: ITRODUCTIO Microchip Technology has expanded its product portfolio to include a wide variety

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

How To Program A Microcontroller With Memory On A Microchip Microcontroller

How To Program A Microcontroller With Memory On A Microchip Microcontroller Getting Started with On-chip Memory 2001 Microchip Technology Incorporated. All Rights Reserved. S0001A RAM/ROM(x14) 1 In this Getting Started tutorial you will learn about the various memory types found

More information

MPLAB IDE QUICK START GUIDE

MPLAB IDE QUICK START GUIDE MPLAB IDE QUICK START GUIDE 2004 Microchip Technology Inc. DS51281D Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification contained in

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

Designing A Li-Ion Battery Charger and Load Sharing System With Microchip s Stand-Alone Li-Ion Battery Charge Management Controller

Designing A Li-Ion Battery Charger and Load Sharing System With Microchip s Stand-Alone Li-Ion Battery Charge Management Controller Designing A Li-Ion Battery Charger and Load Sharing System With Microchip s Stand-Alone Li-Ion Battery Charge Management Controller Author: INTRODUCTION Brian Chu Microchip Technology Inc. Batteries often

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

LIN Serial Analyzer User s Guide Rev2.0

LIN Serial Analyzer User s Guide Rev2.0 LIN Serial Analyzer User s Guide Rev2.0 2008 Microchip Technology Inc. DS51675B Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification

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

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

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

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

AN1857. RGBW Color Mixing DALI Control Gear. COLOR MIXING USING RED, GREEN, BLUE AND WHITE LEDs INTRODUCTION HARDWARE

AN1857. RGBW Color Mixing DALI Control Gear. COLOR MIXING USING RED, GREEN, BLUE AND WHITE LEDs INTRODUCTION HARDWARE RGBW Color Mixing DALI Control Gear AN1857 Author: INTRODUCTION Mihai Cuciuc Microchip Technology Inc. This application note provides an example of obtaining custom colors by combining the spectra of the

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

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

PIC10F200/202/204/206 Data Sheet

PIC10F200/202/204/206 Data Sheet Data Sheet 6-Pin, 8-bit Flash Microcontrollers 2007 Microchip Technology Inc. DS41239D Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification

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