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

Save this PDF as:
 WORD  PNG  TXT  JPG

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

TC1047/TC1047A. Precision Temperature-to-Voltage Converter TC1047A. 3-Pin SOT-23B* TC1047 TC1047A. General Description. Features.

TC1047/TC1047A. Precision Temperature-to-Voltage Converter TC1047A. 3-Pin SOT-23B* TC1047 TC1047A. General Description. Features. Precision Temperature-to-Voltage Converter Features Supply Voltage Range: - TC1047: 2.7V to 4.4V - TC1047A: 2.5V to 5.5V Wide Temperature Measurement Range: -40 o Cto+125 o C High Temperature Converter

More information

Suppressing Acoustic Noise in PWM Fan Speed Control Systems. Stator Assembly. Wire Harness Stator Coil (4) Axle. Rear Center Bearing.

Suppressing Acoustic Noise in PWM Fan Speed Control Systems. Stator Assembly. Wire Harness Stator Coil (4) Axle. Rear Center Bearing. M AN771 Suppressing Acoustic Noise in PWM Fan Speed Control Systems Author: INTRODUCTION Kyle Gaede Microchip Technology Inc. Fan speed control extends fan service life and decreases acoustic airflow noise

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

TB054. An Introduction to USB Descriptors with a Game Port to USB Game Pad Translator Example INTRODUCTION. Descriptors. USB Basics GENERAL

TB054. An Introduction to USB Descriptors with a Game Port to USB Game Pad Translator Example INTRODUCTION. Descriptors. USB Basics GENERAL An Introduction to USB Descriptors with a Game Port to USB Game Pad Translator Example Author: INTRODUCTION This Technical Brief demonstrates the translation of a game port game pad to a USB game pad using

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

AN916. Comparing CAN and ECAN Modules ECAN INTERFACE CHARACTERISTICS CAN INTERFACE CHARACTERISTICS. Microchip Technology Inc.

AN916. Comparing CAN and ECAN Modules ECAN INTERFACE CHARACTERISTICS CAN INTERFACE CHARACTERISTICS. Microchip Technology Inc. Comparing CAN and ECAN Modules AN916 Author: Caio Gübel Microchip Technology Inc. With the arrival of the PIC18FXX8X family of microcontrollers featuring the Enhanced Control Area Network (ECAN) module,

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

Stepper Motor Control Using the PIC16F684 +3S +6S +9S. Angular Position (S = rated step size)

Stepper Motor Control Using the PIC16F684 +3S +6S +9S. Angular Position (S = rated step size) Stepper Motor Control Using the PICF8 AN90 Author: INTRODUCTION This application note describes how to drive a bipolar stepping motor with the PICF8. The Enhanced Capture Compare PWM (ECCP) module is used

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

PIC Microcontroller - 3

PIC Microcontroller - 3 - 3 PIC Instruction Set (I) Prof. Yan Luo, UMass Lowell 1 Review: Data Memory Organization Made up of SFRs and GFRs Banking: 7Fh (128) bytes chunks Addressing Modes Direct addressing: 7 bit address (within

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

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

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

A Simple Circuit for Driving Microcontroller Friendly PWM Generators TYPICAL SWITCH MODE POWER SUPPLY BLOCK DIAGRAM. MCP1630 Flip-Flop.

A Simple Circuit for Driving Microcontroller Friendly PWM Generators TYPICAL SWITCH MODE POWER SUPPLY BLOCK DIAGRAM. MCP1630 Flip-Flop. A Simple Circuit for Driving Microcontroller Friendly PWM Generators TB085 Author: Keith Curtis Microchip Technology Inc. INTRODUCTION The recent interest in intelligent power supplies has driven the development

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

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

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

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

TC1682/TC1683/TC1684. Obsolete Device. Inverting Charge Pump Voltage Doublers with Active High Shutdown. General Description. Features.

TC1682/TC1683/TC1684. Obsolete Device. Inverting Charge Pump Voltage Doublers with Active High Shutdown. General Description. Features. Obsolete Device // Inverting Charge Pump Voltage Doublers with Active High Shutdown Features Small 8-Pin MSOP Package Operates from 1.8V to 5.5V 120 Ohms (typ) Output Resistance 99% Voltage Conversion

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

Transformerless Power Supplies: Resistive and Capacitive

Transformerless Power Supplies: Resistive and Capacitive Transformerless Power Supplies: Resistive and Capacitive Author: Reston Condit Microchip Technology Inc. INTRODUCTION There are several ways to convert an AC voltage at a wall receptacle into the DC voltage

More information

TC55. 1 µa Low Dropout Positive Voltage Regulator. General Description. Features. Functional Block Diagram. Applications.

TC55. 1 µa Low Dropout Positive Voltage Regulator. General Description. Features. Functional Block Diagram. Applications. M 1 µa Low Dropout Positive Regulator TC Features Low Dropout : 120 mv (typ) at 100 ma, 80 mv (typ) at 200 ma High Output Current: 20 ma (V OUT =.0V) High Accuracy Output : ±2% (max) (±1% Semi-Custom Version)

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

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

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

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

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

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

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

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

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

AN693. Understanding A/D Converter Performance Specifications INTRODUCTION THE IDEAL A/D CONVERTER MEASUREMENT CIRCUIT. OutputCode = F.

AN693. Understanding A/D Converter Performance Specifications INTRODUCTION THE IDEAL A/D CONVERTER MEASUREMENT CIRCUIT. OutputCode = F. Understanding A/D Converter Performance Specifications Authors: INTRODUCTION The purpose of this application note is to describe the specifications used to quantify the performance of A/D converters and

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

Achieving Higher ADC Resolution Using Oversampling. Voltage Resolution = 1 Least Significant bit (LSb) value =

Achieving Higher ADC Resolution Using Oversampling. Voltage Resolution = 1 Least Significant bit (LSb) value = Achieving Higher ADC Resolution Using Oversampling Author: INTRODUCTION Jayanth Murthy Madapura Microchip Technology Inc. An Analog-to-Digital Converter (ADC) is an active interface between the analog

More information

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

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

More information

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

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

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

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

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

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

TC74. Tiny Serial Digital Thermal Sensor. General Description. Features. Applications. Functional Block Diagram. Package Types

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

More information

TB3067. MCP2003 Power-Down Mode and Wake-Up Handling in the Case of LIN Bus Loss INTRODUCTION THEORY OF OPERATION. MCP2003 Block Diagram.

TB3067. MCP2003 Power-Down Mode and Wake-Up Handling in the Case of LIN Bus Loss INTRODUCTION THEORY OF OPERATION. MCP2003 Block Diagram. MCP2003 Power-Down and Wake-Up Handling in the Case of LIN Bus Loss Author: INTRODUCTION Frank Ziegenhorn Microchip Technology Inc. This technical brief gives a description of how to set the MCP2003 in

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

AN589. A PC-Based Development Programmer for the PIC16C84 INTRODUCTION PROGRAMMING DESCRIPTION. Analog Design Specialist, Inc.

AN589. A PC-Based Development Programmer for the PIC16C84 INTRODUCTION PROGRAMMING DESCRIPTION. Analog Design Specialist, Inc. M AN589 A PC-Based Development Programmer for the PIC16C84 Author: INTRODUCTION Robert Spur Analog Design Specialist, Inc. This application note describes the construction of a low cost serial programmer

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

TCM850 TCM851 TCM852 TCM853. 5V TO ±10V VOLTAGE CONVERTER +B122+B124 REGULATED GaAs FET BIAS SUPPLY GENERAL DESCRIPTION FEATURES ORDERING INFORMATION

TCM850 TCM851 TCM852 TCM853. 5V TO ±10V VOLTAGE CONVERTER +B122+B124 REGULATED GaAs FET BIAS SUPPLY GENERAL DESCRIPTION FEATURES ORDERING INFORMATION EVALUATION KIT AVAILABLE V TO ±0V VOLTAGE CONVERTER +B22+B24 REGULATED GaAs FEATURES Fixed 4.V or Adjustable 0.V to 9V Output at ma 4.V to 0V Input Voltage Range Low Output Voltage Ripple -82... 2mVp-p...

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

TYPES OF UTILITY METERS TABLE

TYPES OF UTILITY METERS TABLE AN0 Gas and Water Metering with the PIC6F9X Family Author: INTRODUCTION Electronic utility meters are an important step towards automating the utility metering process. Automated utility meters allow many

More information

PIC32 USB Plug-In Module for the Explorer 16 Development Board FIGURE 1: USB PIM INTERCONNECT DIAGRAM FOR PIC32MX460F512 DEVICES.

PIC32 USB Plug-In Module for the Explorer 16 Development Board FIGURE 1: USB PIM INTERCONNECT DIAGRAM FOR PIC32MX460F512 DEVICES. PIC32 USB Plug-In Module for the Explorer 16 Development Board PIC32MX Overview The PIC32 USB Plug-In Module (PIM) demonstrates the capabilities of PIC32MX460F512 and PIC32MX795F512 microcontrollers using

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

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

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

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

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

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

Using the 8-Bit Parallel Slave Port

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

More information

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

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

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

AN587. Interfacing PICmicro MCUs to an LCD Module INTRODUCTION OPERATION CONTROL SIGNAL FUNCTIONS CONDITIONAL ASSEMBLY FLAGS

AN587. Interfacing PICmicro MCUs to an LCD Module INTRODUCTION OPERATION CONTROL SIGNAL FUNCTIONS CONDITIONAL ASSEMBLY FLAGS Interfacing PICmicro MCUs to an LCD Module Author: Code: INTRODUCTION This application note interfaces a midrange PICmicro device to a Hitachi LM32L LCD character display module, with a two line by twenty

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

Hi Hsiao-Lung Chan Dept Electrical Engineering Chang Gung University, Taiwan

Hi Hsiao-Lung Chan Dept Electrical Engineering Chang Gung University, Taiwan Introduction to the PIC18 Microcontroller Hi Hsiao-Lung Chan Dept Electrical Engineering Chang Gung University, Taiwan chanhl@mail.cgu.edu.twcgu Outline Introduction to the PIC18 microcontroller PIC18

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

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

AN1288. Design Practices for Low-Power External Oscillators PROBING THE CIRCUIT INTRODUCTION OUTLINE. Dry and Moisture-Free Circuit Boards

AN1288. Design Practices for Low-Power External Oscillators PROBING THE CIRCUIT INTRODUCTION OUTLINE. Dry and Moisture-Free Circuit Boards Design Practices for Low-Power External Oscillators Author: INTRODUCTION Many Microchip microcontrollers have internal circuitry to drive a 32.768 khz external crystal to provide an asynchronous clock

More information

AN546. Using the Analog-to-Digital (A/D) Converter INTRODUCTION COMMONLY USED A/D TERMINOLOGY. Transition Point. Code Width

AN546. Using the Analog-to-Digital (A/D) Converter INTRODUCTION COMMONLY USED A/D TERMINOLOGY. Transition Point. Code Width M AN546 Using the Analog-to-Digital (A/D) Converter Authors: INTRODUCTION Sumit Mitra, Stan D Souza, and Russ Cooper Microchip Technology Inc. This application note is intended for PIC16C7X users with

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

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

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

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

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

Issue 1, November 2004

Issue 1, November 2004 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

AN843. Speed Control of 3-Phase Induction Motor Using PIC18 Microcontrollers INTRODUCTION. Induction Motor Basics NAMEPLATE PARAMETERS MOTOR ROTATION

AN843. Speed Control of 3-Phase Induction Motor Using PIC18 Microcontrollers INTRODUCTION. Induction Motor Basics NAMEPLATE PARAMETERS MOTOR ROTATION M AN84 Speed Control of -Phase Induction Motor Using PIC8 Microcontrollers Author: Padmaraja Yedamale Microchip Technology Inc. Induction Motor Basics NAMEPLATE PARAMETERS INTRODUCTION Induction motors

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

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

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

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

AN967. Bidirectional VF Control of Single and 3-Phase Induction Motors Using the PIC16F72 INTRODUCTION THEORY OF OPERATION

AN967. Bidirectional VF Control of Single and 3-Phase Induction Motors Using the PIC16F72 INTRODUCTION THEORY OF OPERATION Bidirectional VF Control of Single and -Phase Induction Motors Using the PIC6F7 Author: INTRODUCTION Padmaraja Yedamale Microchip Technology Inc. Single-phase induction motors are extensively used in appliances

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

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

AN682. in Embedded Systems FUNDAMENTAL OPERATIONAL AMPLIFIER CIRCUITS INTRODUCTION. Voltage Follower Amplifier. Microchip Technology Inc.

AN682. in Embedded Systems FUNDAMENTAL OPERATIONAL AMPLIFIER CIRCUITS INTRODUCTION. Voltage Follower Amplifier. Microchip Technology Inc. Using Single Supply Operational Amplifiers in Embedded Systems AN682 Author: Bonnie Baker INTRODUCTION Beyond the primitive transistor, the operational amplifier is the most basic building block for analog

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

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

AN678. RFID Coil Design REVIEW OF A BASIC THEORY FOR ANTENNA COIL DESIGN INTRODUCTION. Current and Magnetic Fields EQUATION 1: EQUATION 2:

AN678. RFID Coil Design REVIEW OF A BASIC THEORY FOR ANTENNA COIL DESIGN INTRODUCTION. Current and Magnetic Fields EQUATION 1: EQUATION 2: M RFID Coil Design AN678 Author: Youbok Lee Microchip Technology Inc. INTRODUCTION In a Radio Frequency Identification (RFID) application, an antenna coil is needed for two main reasons: To transmit the

More information