| Datasheets.org.uk - 100 Million Datasheets from 7500 Manufacturers. |
DS00711A
Top Searches for this datasheetZPD ITT 10 - ZPD ITT 10 ZPD ITT - ZPD ITT zener ITT Industries - zener ITT Industries zener diode ITT through hole 15V - zener diode ITT through hole 15V zener diode ITT - zener diode ITT XL202* - XL202* veritas r8 - veritas r8 ULTRASONIC METER PIC - ULTRASONIC METER PIC ULTRASONIC fuzzy microcontroller car distance - ULTRASONIC fuzzy microcontroller car distance UF 3004 - UF 3004 tsop 00389 - tsop 00389 TRIAC TAG 256 - TRIAC TAG 256 triac tag - triac tag Triac Heat Sink Asm. - Triac Heat Sink Asm. Transponder Texas 4C Fixed Code - Transponder Texas 4C Fixed Code Transponder PPM - Transponder PPM TP 170B - TP 170B TLE 4726 G - TLE 4726 G ti 349b - ti 349b Texas Instruments TTL data book 1985 - Texas Instruments TTL data book 1985 TEA 320t - TEA 320t tb024 - tb024 TB017 - TB017 TB008 - TB008 tad 0233 - tad 0233 Switchmode Pulse Width Modulation Control "analo - Switchmode Pulse Width Modulation Control "analo ST L6203 application note - ST L6203 application note st 7805 5V REGULATOR IC - st 7805 5V REGULATOR IC ST 1803 DHI - ST 1803 DHI DS00711A - DS00711A Embedded Control Handbook Update 2000 1999 Microchip Technology Inc. DS00711A "All rights reserved. Copyright 1999, Microchip Technology Incorporated, USA. Information contained this publication regarding device applications like intended through suggestion only superseded updates. representation warranty given liability assumed Microchip Technology Incorporated with respect accuracy such information, infringement patents other intellectual property rights arising from such otherwise. Microchip's products critical components life support systems authorized except with express written approval Microchip. licenses conveyed, implicitly otherwise, under intellectual property rights. Microchip logo name registered trademarks Microchip Technology Inc. U.S.A. other countries. rights reserved. other trademarks mentioned herein property their respective companies. licenses conveyed, implicitly otherwise, under intellectual property rights." Trademarks Microchip name, logo, KEELOQ, PIC, PICMASTER, PICmicro, MATE, PICSTART, MPLAB, SEEVAL registered trademarks Microchip Technology Incorporated U.S.A. other countries. Total Endurance, In-Circuit Serial Programming (ICSP), microID, FilterLab trademarks Microchip Technology Incorporated U.S.A. Serialized Quick Term Programming (SQTP) service mark Microchip Technology Incorporated U.S.A. other trademarks mentioned herein property their respective companies. 1999, Microchip Technology Incorporated, Printed U.S.A., Rights Reserved. DS00711A page 1999 Microchip Technology Inc. VALUED CUSTOMERS: Welcome Embedded Control Handbook (ECHB) Update 2000. ECHB Update 2000 third series application-orientated publications from Microchip Technology Inc. includes application notes, technical briefs reference designs which have been written published since Embedded Control Handbook, Volumes were released. Embedded Control Handbook (ECHB) Volume ECHB Volume first `Volume' library system PICmicro® 8-Bit microcontroller, Nonvolatile Memory, Secure Data Products, other product application notes, technical briefs, reference designs. Volume replaces 1994/1995 ECHB (released September 1994) 1995/ 1996 ECHB Update (released September 1995). Embedded Control Handbook (ECHB) Volume Math Library. This book second `Volume' library system product application notes. Volume contains compilation fixed-point, floating-point trigonometry function application notes help designers PICmicro® microcontroller library functions program. Microchip will continue publishing application notes, technical briefs reference designs series supplemental handbooks called `Updates'. Updates will published annually, providing uninterrupted flow current application notes, technical briefs reference designs customers' convenience use. These Updates, with revised documents, will incorporated into future Volumes appropriate. course, individual application notes become available, they will posted site download www.microchip.com. intention provide valued customers with best documentation possible ensure successful your Microchip products. this end, will continue improve publications better suit your needs. publications will refined enhanced Volumes Updates introduced. welcome your feedback. have questions comments regarding this publication, please contact Marketing Communications Department 480.917.4150. 1999 Microchip Technology Inc. DS00711A-page DS00711A-page 1999 Microchip Technology Inc. Table Contents PAGE UPDATE 2000 SUBJECT INDEX. VOLUME APPLICATION NOTES ALPHABETICAL xiii VOLUME APPLICATION NOTES ALPHABETICAL VOLUME APPLICATION NOTES NUMERICAL xvii VOLUME APPLICATION NOTES NUMERICAL SECTION COMPANY PROFILE Company Profile. SECTION PICmicro® 8-BIT MICROCONTROLLER APPLICATION NOTES TECHNICAL BRIEFS Engineer's Assistant Using PIC16F84A AN689. Make Delta-Sigma Converter Using Microcontroller's Analog Comparator Module AN700 2-53 Switch Mode Battery Eliminator Based PIC16C72A AN701 2-61 RS-232 Autobaud PIC16C5X Devices AN712. 2-81 Measure Tilt Using PIC16F84A ADXL202 AN715. 2-97 Migrating Designs from PIC16C74A/74B PIC18C442 AN716 2-131 Brush-DC Servomotor Implementation using PIC17C756A AN718. 2-143 System Design Considerations Implementing Microcontroller AN721 2-173 Using PICmicro® MCUs Connect Internet AN724. 2-177 PIC17CXXX PIC18CXXX Migration AN726. 2-205 Implement ICSPUsing PIC16CXXX MCUs TB013 2-241 Implement ICSPUsing PIC17CXXX MCUs TB015 2-247 Implement ICSPUsing PIC16F8X FLASH MCUs TB016 2-253 Implement ICSPUsing PIC12C5XX MCUs TB017. 2-257 PIC12C67X Emulation Using PIC16C72 PICMASTER® Emulator Probe TB020. 2-265 Downloading Files External FLASH Memory Using PIC17CXXX PICmicro® Microcontrollers TB024 2-273 Downloading Files PIC16F87X PICmicro® Microcontrollers TB025. 2-281 Calculating Program Memory Checksums Using PIC16F87X TB026 2-289 Simplifying External Memory Connections PIC17CXXX PICmicro® Microcontrollers TB027. 2-295 Technique Calculate Week TB028 2-301 Complementary Drive TB029. 2-311 Using PIC16F877 Develop Code PIC16CXXX Devices TB033 2-315 SECTION SECURE DATA PRODUCT APPLICATION NOTES TECHNICAL BRIEFS Designing Transponder Coil HCS410 AN650. PICmicro® Mid-Range Code Hopping Decoder AN672. 3-11 HCS410 Transponder Decoder Using PIC16C56 AN675. 3-23 Designing Base Station Coil HCS410 AN677. 3-39 Wireless Home Security Implementing KEELOQ® PICmicro® Microcontroller AN714 3-47 Guide Designing EuroHomelink® Compatibility TB021 3-121 1999 Microchip Technology Inc. DS00711A-page Table Contents (continued) PAGE SECTION ANALOG/INTERFACE PRODUCT APPLICATION NOTES TECHNICAL BRIEFS Temperature Sensing Technologies AN679 Using Single Supply Operational Amplifiers Embedded Systems AN682. 4-11 Single Supply Temperature Sensing with Thermocouples AN684 4-19 Thermistors Single Supply Temperature Sensing Circuits AN685. 4-35 Understanding Using Supervisory Circuits AN686. 4-45 Precision Temperature Sensing with Circuits AN687 4-49 Layout Tips 12-Bit Converter Application AN688. 4-53 Anti-Aliasing, Analog Filters Data Acquisition Systems AN699 4-59 Interfacing Microchip MCP3201 Converter 8051-Based Microcontroller AN702 4-69 Using MCP320X 12-Bit Serial Converter with Microchip PICmicro® Devices AN703. 4-81 Interfacing Microchip's MCP3201 Analog/Digital (A/D) Converter MC68HC11E9-Based Microcontroller AN704 4-103 Controller Area Network (CAN) Basics AN713 4-113 Building 10-bit Bridge Sensing Circuit using PIC16C6XX MCP601 Operational Amplifier AN717. 4-121 Interfacing Microchip's MCP3201 Analog-to-Digital Converter PICmicro® Microcontroller AN719 4-129 Operational Amplifier Topologies Specifications AN722. 4-149 SECTION NON-VOLATILE MEMORY APPLICATION NOTES TECHNICAL BRIEFS Interfacing Microchip PIC16C92x Microchip SPISerial EEPROMs AN668 Converting from 93LC56/56B/66/66B Devices 93LC56A/56B/66A/66B Devices AN671 Solving Second Sourcing Issues with 24LC00 Device SOT-23 Package AN674 Physical Slot Identification Techniques 24LCS61/62 AN676. 5-11 24LCS61/62 Software Addressable Serial EEPROM AN683. 5-17 I2CMemory Autodetect AN690 5-25 Microchip Series Serial EEPROM Compatibility AN698 5-39 System Level Design Considerations When Using I2CSerial EEPROM Devices AN709 5-43 SPI25XX080/160 Mode Write Operation TB012 5-45 Operational Differences Between 24LCS21 24LCS21A TB014 5-47 SECTION RFID APPLICATION NOTES TECHNICAL BRIEFS RFID Coil Design AN678 Passive RFID Basics AN680. 6-19 MCRF 355/360 Applications AN707 6-25 Antenna Circuit Design AN710 6-31 Optimizing Read-Range 13.56 Demonstration Reader AN725 6-51 Contactless Programmer Interface Protocol TB019. 6-53 Contact Programming Support TB023 6-57 Microchip Development Sample Format TB031 6-59 MCRF355/360 Factory Programming Support (SQTPSM) TB032 6-61 DS00711A-page 1999 Microchip Technology Inc. Table Contents (continued) PAGE SECTION REFERENCE DESIGNS Uninterruptible Power Supply Reference Design PICREF-1 Intelligent Battery Charger Reference Design PICREF-2 Watt-Hour Meter Reference Design PICREF-3 PICDIM Lamp Dimmer PIC12C508 PICREF-4. 13.56 Reader Reference Design microID13.56 Design Guide. Reader Reference Design microID125 Design Guide 7-11 Reader Reference Design microID125 Design Guide 7-13 Reader Reference Design microID125 Design Guide 7-15 Anticollision Reader Reference Design microID125 Design Guide 7-17 SECTION DEVELOPMENT SYSTEMS Development Tools Selection Chart Microchip Internet Connections 8-15 Integrated Development Environment 8-17 Universal PICmicro® Microcontroller Assembler Software 8-19 In-Circuit Debugger 8-21 In-Circuit Emulator 8-23 Software Simulator. 8-25 ANSI-Compliant Compiler PIC17CXXX Microcontrollers 8-27 ANSI-Compliant Compiler PIC18CXXX Microcontrollers 8-29 Low-Cost PIC16CXXX In-Circuit Emulator 8-31 Universal Microchip Device Programmer. 8-33 Low-cost Development Supports PICmicro® MCUs 8-35 Evaluation 8-37 Transponder Evaluation Kit. 8-39 Low-Cost PICmicro® Demonstration Board 8-41 Low-Cost PIC16CXX Demonstration Board 8-43 Low-Cost PIC16C9XX Demonstration Board 8-45 PICmicro® Demonstration Board 8-47 Development 8-49 Programmer Kit. 8-51 microID Developer's 8-53 Anticollision microID Developer's 8-55 13.56 Anticollision microID Developer's 8-57 Active Filter Software Design Tool 8-59 Microchip Serial EEPROM Designer's Kit. 8-61 Microchip Serial EEPROM Endurance Model. 8-63 System Support On-Line Support MPLAB® MPASM MPLAB®-ICD MPLAB®-ICE MPLAB®-SIM MPLAB®-C17 MPLAB®-C18 ICEPIC MATE® PICSTART® Plus KEELOQ® KEELOQ® PICDEM-1 PICDEM-2 PICDEM-3 PICDEM-17 MCP2510 Designer's Total Endurance WORLDWIDE SALES SERVICE. 8-67 1999 Microchip Technology Inc. DS00711A-page PAGE DS00711A-page viii 1999 Microchip Technology Inc. Update 2000 Subject Index following alphabetical subject index application notes, technical briefs reference designs that ONLY available Embedded Control Handbook Update 2000. complete listings other application notes, technical briefs reference designs available, please refer "Volume Application Notes" page xiii, "Volume Application Notes" page directly following subject index. Miscellaneous 12-bit ADC: AN704 4-103 AN719 4-129 16F87X: TB033 2-315 24LC00: AN674 24LCS21: TB014 5-47 24LCS21A: TB014 5-47 24LCS61/62: AN676 5-11 AN683 5-17 24LCS61: AN676 5-11 AN683 5-17 24LCS62: AN676 5-11 AN683 5-17 8051 Interface: AN702 4-69 Series Compatability: AN671 AN698 5-39 93LC56/56B/66/66B: AN671 93LC56A/56B/66A/66B: AN671 93XX46: AN698 5-39 93XX56: AN698 5-39 93XX66: AN698 5-39 Accelerometer: AN715 2-97 Analog-to-Digital (A/D) Converter: AN684 4-19 AN685 4-35 AN687 4-49 AN688 4-53 AN699 4-59 AN700 2-53 AN702 4-69 AN703 4-81 AN704 4-103 AN716 2-131 AN719 4-129 Antenna: AN678 AN680 6-19 AN707 6-25 AN710 6-31 AN725 6-51 TB019 6-53 TB023 6-57 TB031 6-59 TB032 6-61 Anti-Aliasing filter: AN699 4-59 Anticollision: AN678 AN680 6-19 AN707 6-25 AN710 6-31 AN725 6-51 TB019 6-53 TB023 6-57 TB031 6-59 TB032 6-61 Autobaud Detector: AN712 2-81 Autodetect: AN690 5-25 Automotive: AN713 4-113 Battery Charging: PICREF-2 Battery Eliminator: AN701 2-61 Battery: AN714 3-47 PICREF-2 Baud Rate Detection: AN712 2-81 Boot Loader Program: TB025 2-281 TB027 2-295 Bridge Sensor: AN717 4-121 Brown-out detect (BOD): AN686 4-45 Buck Converter: PICREF-2 Calendar: TB028 2-301 CAN: AN713 4-113 Checksums: TB026 2-289 Code Development: TB033 2-315 Code Hopping: Decoders, KEELOQ® Compatability: AN726 2-205 Conversion: AN726 2-205 1999 Microchip Technology Inc. DS00711A-page Update 2000 Subject Index (continued) Day-of-Week: TB028 2-301 Motor: AN718 2-143 Decoders: Code Hopping, KEELOQ® KEELOQ®, KEELOQ® Delta-Sigma Converter: AN700 2-53 Design Considerations: AN709 5-43 Difference Amplifier: AN682 4-11 Differences: AN726 2-205 Downloader Program: TB024 2-273 TB025 2-281 Emulator: TB020 2-265 Energy: PICREF-3 Engineer's Assistant: AN689 Enhancements: AN726 2-205 EPROM: AN721 2-173 EuroHomelink: KEELOQ® 3-121 External Memory: TB024 2-273 TB027 2-295 Filter: Analog: AN682 4-11 AN699 4-59 FilterLabTM: AN699 4-59 FLASH Memory: TB016 2-253 TB024 2-273 TB025 2-281 TB026 2-289 TB027 2-295 TB033 2-315 Frames: AN713 4-113 Frequency Counter: AN689 HCS515: AN714 3-47 Files: TB024 2-273 TB025 2-281 I2C: AN709 5-43 Multiplexing: TB029 2-311 I2C: AN674 AN676 5-11 AN683 5-17 AN690 5-25 AN709 5-43 AN716 2-131 TB014 5-47 ICEPIC PIC16CXXX In-Circuit Emulator 8-31 ICSP: TB013 2-241 TB015 2-247 TB016 2-253 TB017 2-257 In-Circuit Debugger: TB033 2-315 In-Circuit Serial Programming (ICSP): TB013 2-241 TB015 2-247 TB016 2-253 TB017 2-257 Industrial: AN713 4-113 Instrument: AN689 Instrumentation Amplifier: AN682 4-11 Internet: AN724 2-177 Inverter: PICREF-1 KEELOQ® Evaluation 8-37 KEELOQ® Transponder Evaluation 8-39 KEELOQ®: Decoder, Midrange: AN672 3-11 Decoder, transponder: AN675 3-23 EuroHomelink: TB021 3-121 Wireless Home Security: AN714 3-47 Keypad: AN714 3-47 Display: AN689 AN714 3-47 Drive: TB029 2-311 Lighting: PICREF-4 Logic Analyzer: AN689 Pass Filter: AN699 4-59 MC68HC11: AN704 4-103 MCP130: AN704 4-103 AN719 4-129 MCP2510 Development 8-49 MCP320x: AN703 4-81 Memory Autodetect: AN690 5-25 Microcontroller (MCU): AN721 2-173 AN724 2-177 DS00711A-page 1999 Microchip Technology Inc. Update 2000 Subject Index (continued) microID125 Anticollision Developer's 8-55 microID125 Design Guide: Reader Reference Design 7-15 Anticollision Reader Reference Design 7-17 Reader Reference Design 7-11 Reader Reference Design 7-13 microID125 Developer's 8-53 microID13.56 Design Guide: 13.56 Reader Reference Design microIDProgrammer 8-51 Migration: AN716 2-131 AN726 2-205 Mode 1,1: TB012 5-45 MPLAB® 8-17 MPLAB®-C17 8-27 MPLAB®-C18 8-29 MPLAB®-ICD 8-21 MPLAB®-ICE 8-23 MPLAB®-SIM 8-25 Noise: AN688 4-53 AN717 4-121 On-Line Support 8-15 Operational Amplifier: AN682 4-11 AN684 4-19 AN685 4-35 AN687 4-49 AN699 4-59 AN717 4-121 AN722 4-149 Memory: AN721 2-173 TB013 2-241 TB015 2-247 TB017 2-257 Layout: AN688 4-53 Photo Detector Pre-Amp: AN682 4-11 PIC12C508: PICREF-4 PIC12C508A: AN714 3-47 PIC12C5XX:TB017 2-257 PIC12C67X: TB020 2-265 PIC16C62A: AN703 4-81 PIC16C67: AN719 4-129 PIC16C74A/74B: AN716 2-131 PIC16C77: AN714 3-47 PIC16C7X: PICREF-2 PIC16C924: AN668 PIC16C92X: AN668 PICREF-3 PIC16CF87X: TB026 2-289 PIC16CXXX: TB013 2-241 PIC16F84: AN715 2-97 PIC16F87X: TB016 2-253 TB025 2-281 PIC17C43: PICREF-1 PIC17C4X:TB015 2-247 PIC17C756: AN718 2-143 PIC17C75X:TB015 2-247 PIC17CXXX: AN726 2-205 TB015 2-247 TB024 2-273 TB027 2-295 PIC18C442: AN716 2-131 PIC18CXXX: AN726 2-205 PICDEM-1 8-41 PICDEM-17 8-47 PICDEM-2 8-43 PICDEM-2: AN719 4-129 PICDEM-3 8-45 PICMASTER®: TB020 2-265 PICmicro®: AN724 2-177 PICSTART® Plus 8-35 Algorithm: AN718 2-143 Plug Play: AN676 5-11 AN683 5-17 Power reset (POR): AN686 4-45 Power Supply: PICREF-1 Power: PICREF-3 PPP: AN724 2-177 MATE® 8-33 Program Memory: TB026 2-289 Protocol: AN713 4-113 Pulse Width Modulation: AN701 2-61 AN718 2-143 Read Range: AN678 AN680 6-19 AN707 6-25 1999 Microchip Technology Inc. DS00711A-page Update 2000 Subject Index (continued) AN710 6-31 AN725 6-51 TB019 6-53 TB023 6-57 TB031 6-59 TB032 6-61 Remote Keyless Entry (RKE): AN714 3-47 RFID Applications: AN678 AN680 6-19 AN707 6-25 AN710 6-31 AN725 6-51 TB019 6-53 TB023 6-57 TB031 6-59 TB032 6-61 ROM: AN721 2-173 RTD: AN679 AN687 4-49 Security: KEELOQ® Wireless 3-47 Sensor: AN715 2-97 Serial Communication: AN712 2-81 Serial EEPROM: Software Addressable: AN676 5-11 AN683 5-17 TB014 5-47 Servomotor: AN718 2-143 Sigma-Delta Converter: AN700 2-53 SOT-23: AN674 SPI: AN668 AN700 4-103 TB012 5-45 Supervisory Circuit: AN686 4-45 Switchmode Power Supply: AN701 2-61 System Support Tag: AN678 AN680 6-19 AN707 6-25 AN710 6-31 AN725 6-51 TB019 6-53 TB023 6-57 TB031 6-59 TB032 6-61 Temperature Sensing: AN679 AN684 4-19 AN685 4-35 AN687 4-49 Thermistor: AN679 AN685 4-35 Thermocouple: AN679 AN684 4-19 Tilt Measurement: AN715 2-97 Transponder: Coil Design, base station: AN677 3-39 Coil Design, HCS410: AN650 Decoder: AN675 3-23 Triac Control: PICREF-4 UPS: PICREF-1 Utility Meter: PICREF-3 VESA: TB014 5-47 Vibration: AN715 2-97 Voltage Regulator: AN701 2-61 Watt: PICREF-3 Wireless Security: AN714 3-47 Zero Crossing Detect: PICREF-4 DS00711A-page 1999 Microchip Technology Inc. Volume Application Notes Alphabetical following alphabetical list application notes, technical briefs reference designs that available Microchip Technology Inc. Embedded Control Handbook, Volume Please your local Microchip Sales Representative, Distributor Sales Office latest copy (order number DS00092). PAGE Volt Technology Benefits AN550. 7-67 24C01A Compatibility Issue Mobility Memory Upgrade AN517. 7-11 PC-Based Development Programmer PIC16C84 AN589. 3-237 Clock Design Using PIC16C54 Displays Switch Inputs. AN590. 2-197 Comparison 8-Bit Microcontrollers. AN520. 2-69 Real-Time Operating System PIC16/17 AN585. 5-105 Adaptive Differential Pulse Code Modulation using PIC16/17 Microcontrollers. AN643. 3-451 Adding Simple 4-channel 8-bit PIC17C4X .TB010. 9-33 Flow Control Using Fuzzy Logic AN600. 3-319 Introduction KEELOQ® Code Hopping .TB003. Analog Digital Conversion Using PIC16C54 AN513 2-47 Apple® Desktop (ADB). AN591. 3-243 Automatic Calibration Time-out Period .TB004. 9-17 Basic Serial EEPROM Operation. AN536. 7-45 Clock Design Using Power/Cost Techniques AN615. 5-199 Code Development PIC16C52. AN641. 2-235 Code Hopping Decoder Using PIC16C56. AN661. 6-19 Code Hopping Decoder Using Secure Learn. AN662. 6-33 Communicating with I2CBus Using PIC16C5X AN515. Continuous Improvement AN603. 8-27 Converting NTQ104/105/106 Designs HCS200/300s. AN644. Converting 24LCXXB 93LCXX Serial EEPROMs AN608. 7-183 Conversion Using R-2R Ladders Generate Sine DTMF Waveforms AN655. 2-237 Decoding Infrared Remote Controls Using PIC16C5X Microcontroller AN657. 2-255 Digital Signal Processing with PIC16C74 AN616. 3-373 EEPROM Endurance Tutorial AN601. 7-177 Four Channel Digital Voltmeter with Display Keyboard AN557. 3-121 Frequency Resolution Options Outputs AN539. 4-145 Frequency Counter Using PIC16C5X AN592. 2-209 Million Cycles Your Microchip Serial EEPROM AN602. 7-181 Implementation Asynchronous Serial I/O. AN510. Implementation Fast Fourier Transforms AN542. 4-177 Implementation Data Encryption Standard Using PIC17C42. AN583. 4-311 Implementing Simple Serial Mouse Controller AN519. 2-57 Implementing Table Read AN556. 5-95 Implementing Digital Filters AN540. 4-157 Implementing Long Calls AN581. 2-171 Implementing Ohmmeter/Temperature Sensor. AN512. 2-41 Implementing Table Read Table Write. AN548. 4-295 Implementing Ultrasonic Ranging AN597. 3-301 Implementing Wake-up Stroke. AN528. 2-89 Implementing Wake-up Stroke. AN552. 3-21 Improving Susceptibility Application AN595. In-Circuit Serial Programming Calibration Parameters Using PIC16CXXX AN656. 3-535 Intelligent Battery Charger Reference Design Based PIC16C7X RD002. 10-3 Intelligent Remote Positioner (Motor Control) AN531. 2-121 1999 Microchip Technology Inc. DS00711A-page xiii Volume Application Notes Alphabetical (continued) PAGE Interfacing 93CX6 Serial EEPROMs PIC16C5X Microcontrollers AN530. 7-13 Interfacing Microchip PIC16C54 Microchip SPISerial EEPROMs. AN648. 7-235 Interfacing Microchip PIC16C64/74 Microchip SPISerial EEPROMs AN647. 7-231 Interfacing Microchip Serial EEPROMs Motorola® 68HC11 Microcontroller AN609. 7-185 Interfacing Motorola 68HC11 Microchip SPISerial EEPROMs. AN646. 7-225 Interfacing 24LCXXB Serial EEPROMs PIC16C54 AN567. 7-145 Interfacing 8051 with 2-wire Serial EEPROMs. AN614. 7-213 Interfacing 93XX76 93XX86 PIC16C5X. AN619. 7-223 Interfacing Power Lines AN521. 2-79 Interfacing Module AN587. 3-205 Fundamentals Using PIC16C92X Microcontrollers. AN658. 3-557 Lead-Acid Battery Charger Implementation Using PIC14C000 AN626. 3-421 Logic Powered Serial EEPROMs. AN535. 7-35 Power Design Using PIC16/17 AN606. 5-161 Low-Power Real-Time Clock. AN582. 3-181 Macros Page Bank Switching AN586. 2-175 Math Utility Routines AN544. 4-209 Modifying PIC16C54A Code PIC16C58A AN618. 2-227 Multiplexing Drive Keypad Sampling. AN529. 2-95 Optimizing Serial Operations with Proper Write Cycle Times. AN559. 7-117 PIC14C000 Theory Implementation. AN624. 3-411 PIC14C000 Calibration Parameters. AN621. 3-405 PIC16/17 Oscillator Design Guide AN588. 5-143 PIC16C54A Results. AN577. 2-165 PIC16C57 Based Code Hopping Security System AN645. PIC16C5X PIC16CXXX Math Utility Routines AN526. Plastic Packaging Effects Surface Mount Soldering Techniques. AN598. 8-19 Replacement AN511. 2-19 Power-up Considerations. AN522. 2-81 Power-up Trouble Shooting AN607. 5-177 PWM, Software Solution PIC16CXXX AN654 3-523 Questions Answers Concerning Serial EEPROMs AN572. 7-173 Resistance Capacitance Meter Using PIC16C622 AN611. 3-339 Saving Restoring Status Interrupt (Implementing Parameter Stack) AN534. 4-141 Secure Learning Systems Using KEELOQ® Encoders .TB001. Serial EEPROM Endurance AN537. 7-59 Serial EEPROM Solutions Parallel Solutions AN551. 7-69 Serial Port Routines Without Using Timer0. AN593. 2-221 Serial Port Utilities. AN547. 4-283 Servo Control DC-Brush Motor AN532. Simple Code Hopping Decoder. AN663. 6-49 Sine DTMF Waveforms. AN655. 2-237 Smart Battery Charger with SMBus Interface AN667. 3-579 Software Implementation Asynchronous Serial I/O. AN555. 3-85 Software Implementation Master AN554. 3-25 Software Interrupt Techniques AN514. 2-53 Software Stack Management AN527. 2-85 Techniques Disable Global Interrupts AN576. 5-99 Tone Generation AN543. 4-199 Transformerless Power Supply .TB008. 9-31 Uninterruptible Power Supply Reference Design Based PIC17C43 RD001. 10-1 Module Multi-Master Environment AN578. 3-153 Using PIC16C5X Smart Peripheral AN541. 2-135 DS00711A-page 1999 Microchip Technology Inc. Volume Application Notes Alphabetical (continued) PAGE Using External with PIC17CXX Devices .TB005. 9-23 Using KEELOQ Generate Hopping Passwords AN665. 6-63 Using Microchip Series Serial EEPROMs with Microcontroller SPIPorts AN613. 7-199 Using PIC16C5X Microcontrollers Drivers AN563. 2-151 Using Generate Analog Output AN538. 4-143 Using SRAM With PIC16CXX.TB011. 9-45 Using 24LC21 Dual Mode Serial EEPROM AN610. 7-193 Using 24xx65 25xx32 with Stand-alone PIC16C54 Code. AN558. 7-73 Using 8-Bit Parallel Slave Port AN579. 3-169 Using 93LC56 93LC66. AN560. 7-121 Using Analog-to-Digital (A/D) Converter AN546. Using Capture Module AN545. 4-259 Using Module(s) AN594. 3-277 Using Microchip Endurance Predictive Software AN562. 7-141 Using PORTB Interrupt Change External Interrupt AN566. 3-149 Using AN564. 4-299 Using Timer1 Asynchronous Clock Mode AN580. 3-177 Watt-Hour Meter Reference Design Based PIC16C924 RD003. 10-5 Another Clock Featuring PIC16C924 AN649. 3-491 1999 Microchip Technology Inc. DS00711A-page Volume Application Notes Alphabetical following alphabetical list application notes that available Microchip Technology Inc. Embedded Control Handbook, Volume Math Library. Please your local Microchip Sales Representative, Distributor Sales Office latest copy (order number DS00167). PAGE Embedding Assembly Routines into Language Using Floating Point Routine ExampleAN669 Fixed Point Routines AN617. Floating Point Math Functions AN660. Floating Point ASCII Conversion. AN670. IEEE Compliant Floating Point Routines. AN575. 1999 Microchip Technology Inc. DS00711A-page Volume Application Notes Numerical following numerical list application notes, technical briefs reference designs that available Microchip Technology Inc. Embedded Control Handbook, Volume Please your local Microchip Sales Representative, Distributor Sales Office latest copy (order number DS00092). PAGE AN510 AN511 AN512 AN513 AN514 AN515 AN517 AN519 AN520 AN521 AN522 AN526 AN527 AN528 AN529 AN530 AN531 AN532 AN534 AN535 AN536 AN537 AN538 AN539 AN540 AN541 AN542 AN543 AN544 AN545 AN546 AN547 AN548 AN550 AN551 AN552 AN554 AN555 AN556 AN557 AN558 AN559 AN560 AN562 AN563 AN564 Implementation Asynchronous Serial Replacement. 2-19 Implementing Ohmmeter/Temperature Sensor 2-41 Analog Digital Conversion Using PIC16C54. 2-47 Software Interrupt Techniques. 2-53 Communicating with I2CBus Using PIC16C5X 24C01A Compatibility Issue Mobility Memory Upgrade. 7-11 Implementing Simple Serial Mouse Controller. 2-57 Comparison 8-Bit Microcontrollers 2-69 Interfacing Power Lines 2-79 Power-up Considerations 2-81 PIC16C5X PIC16CXXX Math Utility Routines Software Stack Management. 2-85 Implementing Wake-up Stroke 2-89 Multiplexing Drive Keypad Sampling 2-95 Interfacing 93CX6 Serial EEPROMs PIC16C5X Microcontrollers 7-13 Intelligent Remote Positioner (Motor Control). 2-121 Servo Control DC-Brush Motor Saving Restoring Status Interrupt (Implementing Parameter Stack) 4-141 Logic Powered Serial EEPROMs 7-35 Basic Serial EEPROM Operation 7-45 Serial EEPROM Endurance. 7-59 Using Generate Analog Output 4-143 Frequency Resolution Options Outputs 4-145 Implementing Digital Filters 4-157 Using PIC16C5X Smart Peripheral 2-135 Implementation Fast Fourier Transforms. 4-177 Tone Generation. 4-199 Math Utility Routines 4-209 Using Capture Module 4-259 Using Analog-to-Digital (A/D) Converter Serial Port Utilities 4-283 Implementing Table Read Table Write 4-295 Volt Technology Benefits 7-67 Serial EEPROM Solutions Parallel Solutions 7-69 Implementing Wake-up Stroke 3-21 Software Implementation Master. 3-25 Software Implementation Asynchronous Serial 3-85 Implementing Table Read. 5-95 Four Channel Digital Voltmeter with Display Keyboard 3-121 Using 24xx65 25xx32 with Stand-alone PIC16C54 Code 7-73 Optimizing Serial Operations with Proper Write Cycle Times. 7-117 Using 93LC56 93LC66 7-121 Using Microchip Endurance Predictive Software 7-141 Using PIC16C5X Microcontrollers Drivers 2-151 Using 4-299 1999 Microchip Technology Inc. DS00711A-page xvii Volume Application Notes Numerical (continued) PAGE AN566 AN567 AN572 AN576 AN577 AN578 AN579 AN580 AN581 AN582 AN583 AN585 AN586 AN587 AN588 AN589 AN590 AN591 AN592 AN593 AN594 AN595 AN597 AN598 AN600 AN601 AN602 AN603 AN606 AN607 AN608 AN609 AN610 AN611 AN613 AN614 AN615 AN616 AN618 AN619 AN621 AN624 AN626 AN641 AN643 AN644 AN645 AN646 AN647 AN648 AN649 AN654 AN655 Using PORTB Interrupt Change External Interrupt 3-149 Interfacing 24LCXXB Serial EEPROMs PIC16C54 7-145 Questions Answers Concerning Serial EEPROMs 7-173 Techniques Disable Global Interrupts. 5-99 PIC16C54A Results 2-165 Module Multi-Master Environment. 3-153 Using 8-Bit Parallel Slave Port. 3-169 Using Timer1 Asynchronous Clock Mode 3-177 Implementing Long Calls 2-171 Low-Power Real-Time Clock 3-181 Implementation Data Encryption Standard Using PIC17C42 4-311 Real-Time Operating System PIC16/17 5-105 Macros Page Bank Switching 2-175 Interfacing Module 3-205 PIC16/17 Oscillator Design Guide 5-143 PC-Based Development Programmer PIC16C84 3-237 Clock Design Using PIC16C54 Displays Switch Inputs 2-197 Apple® Desktop (ADB). 3-243 Frequency Counter Using PIC16C5X 2-209 Serial Port Routines Without Using Timer0 2-221 Using Module(s) 3-277 Improving Susceptibility Application Implementing Ultrasonic Ranging 3-301 Plastic Packaging Effects Surface Mount Soldering Techniques 8-19 Flow Control Using Fuzzy Logic 3-319 EEPROM Endurance Tutorial 7-177 Million Cycles Your Microchip Serial EEPROM 7-181 Continuous Improvement. 8-27 Power Design Using PIC16/17. 5-161 Power-up Trouble Shooting 5-177 Converting 24LCXXB 93LCXX Serial EEPROMs. 7-183 Interfacing Microchip Serial EEPROMs Motorola® 68HC11 Microcontroller 7-185 Using 24LC21 Dual Mode Serial EEPROM 7-193 Resistance Capacitance Meter Using PIC16C622 3-339 Using Microchip Series Serial EEPROMs with Microcontroller SPIPorts. 7-199 Interfacing 8051 with 2-wire Serial EEPROMs 7-213 Clock Design Using Power/Cost Techniques. 5-199 Digital Signal Processing with PIC16C74 3-373 Modifying PIC16C54A Code PIC16C58A. 2-227 Interfacing 93XX76 93XX86 PIC16C5X 7-223 PIC14C000 Calibration Parameters 3-405 PIC14C000 Theory Implementation 3-411 Lead-Acid Battery Charger Implementation Using PIC14C000 3-421 Code Development PIC16C52 2-235 Adaptive Differential Pulse Code Modulation using PIC16/17 Microcontrollers. 3-451 Converting NTQ104/105/106 Designs HCS200/300s PIC16C57 Based Code Hopping Security System Interfacing Motorola 68HC11 Microchip SPISerial EEPROMs. 7-225 Interfacing Microchip PIC16C64/74 Microchip SPISerial EEPROMs. 7-231 Interfacing Microchip PIC16C54 Microchip SPISerial EEPROMs 7-235 Another Clock Featuring PIC16C924 3-491 PWM, Software Solution PIC16CXXX 3-523 Conversion Using R-2R Ladders Generate Sine DTMF Waveforms 2-237 DS00711A-page xviii 1999 Microchip Technology Inc. Volume Application Notes Numerical (continued) PAGE AN656 AN657 AN658 AN661 AN662 AN663 AN665 AN667 RD001 RD002 RD003 TB001 TB003 TB004 TB005 TB008 TB010 TB011 In-Circuit Serial Programming Calibration Parameters Using PIC16CXXX 3-535 Decoding Infrared Remote Controls Using PIC16C5X Microcontroller. 2-255 Fundamentals Using PIC16C92X Microcontrollers 3-557 Code Hopping Decoder Using PIC16C56 6-19 Code Hopping Decoder Using Secure Learn 6-33 Simple Code Hopping Decoder 6-49 Using KEELOQ Generate Hopping Passwords 6-63 Smart Battery Charger with SMBus Interface 3-579 Uninterruptible Power Supply Reference Design Based PIC17C43. 10-1 Intelligent Battery Charger Reference Design Based PIC16C7X 10-3 Watt-Hour Meter Reference Design Based PIC16C924. 10-5 Secure Learning Systems Using KEELOQ® Encoders Introduction KEELOQ® Code Hopping. Automatic Calibration Time-out Period 9-17 Using External with PIC17CXX Devices 9-23 Transformerless Power Supply. 9-31 Adding Simple 4-channel 8-bit PIC17C4X 9-33 Using SRAM With PIC16CXXX 9-45 1999 Microchip Technology Inc. DS00711A-page Volume Application Notes Numerical following numerical list application notes that available Microchip Technology Inc. Embedded Control Handbook, Volume Math Library. Please your local Microchip Sales Representative, Distributor Sales Office latest copy (order number DS00167). PAGE AN575 AN617 AN660 AN669 AN670 IEEE Compliant Floating Point Routines Fixed Point Routines. Floating Point Math Functions Embedding Assembly Routines into Language Using Floating Point Routine Example. Floating Point ASCII Conversion 1999 Microchip Technology Inc. DS00711A-page Company Profile SECTION MICROCHIP TECHNOLOGY INC. COMPANY PROFILE Company Profile. 1999 Microchip Technology Inc. DS00711A-page DS00711A-page 1-ii 1999 Microchip Technology Inc. Microchip Technology Inc. Company Profile Embedded Control Solutions Company Since inception, Microchip Technology focused resources delivering innovative semiconductor products global embedded control marketplace. this, have focused technology, engineering, manufacturing marketing resources synergistic product lines: PICmicro® 8-bit microcontrollers (MCUs), high-endurance Serial EEPROMs, expanding product portfolio analog/ interface products, RFID tags KEELOQ® security devices aimed delivering comprehensive, high-value embedded control solutions growing base customers. Inside Microchip Technology will find: experienced executive team focused innovation committed listening customers focus providing high-performance, cost-effective embedded control solutions Fully integrated manufacturing capabilities global network manufacturing customer support facilities unique corporate culture dedicated continuous improvement Distributor network support worldwide including certified distribution FAEs Complete Product Solution including: 8-bit RISC OTP, FLASH, EEPROM MCUs full family advanced analog 8-bit MCUs KEELOQ security devices featuring patented code hopping technology Stand-alone analog interface products plus microIDRFID tagging devices complete line high-endurance Serial EEPROMs World-class, easy-to-use development tools Automotive Products Group engage with automotive accounts provide necessary application expertise customer service Company Profile Business Scope Microchip Technology Inc. designs, manufacturers markets variety CMOS semiconductor components support market cost-effective embedded control solutions. Microchip's products feature compact size, integrated functionality, ease development technical support essential timely cost-effective product development customers. Chandler, Arizona: Company headquarters near Phoenix, Arizona; executive offices, wafer fabrication occupy this 242,000-square-foot multi-building campus. 1999 Microchip Technology Inc. Tempe, Arizona: Microchip's 200,000-square-foot wafer fabrication facility provides increased manufacturing capacity today future. DS00027T-page Microchip Technology Inc. Market Focus Microchip targets select markets where advanced designs, progressive process technology industry-leading product performance enables deliver decidedly superior performance. Company positioned provide complete product solution embedded control applications found throughout consumer, automotive, telecommunication, office automation industrial control markets. Microchip products also meeting unique design requirements targeted embedded applications including internet, safety security. Certified Quality Systems Microchip received QS-9000 Quality System certification worldwide headquarters wafer fabrication facilities September 1999. Microchip's quality system processes procedures QS-9000 compliant Company's devices, including PICmicro 8-bit MCUs, serial EEPROMs, KEELOQ code hopping devices microperipheral products. Bangkok, Thailand: Microchip's 200,000-square-foot manufacturing facility houses technology assembly/test equipment high speed testing packaging. Global Network Plants Facilities Microchip global competitor providing local services world's technology centers. Company's design technology advancement facilities, wafer fabrication sites located Chandler Tempe, Arizona. Tempe facility provides additional 200,000 square feet manufacturing space that meets increased production requirements growing customer base, provides production capacity which more than doubles that Chandler. QS-9000 developed Chrysler, Ford General Motors establish fundamental quality systems that provide continuous improvement, emphasizing defect prevention reduction variation waste supply chain. Microchip audited QS-9000 registrar Norske Veritas Certification Inc. Houston, same firm which granted Microchip 9001 Quality System certification 1997. QS-9000 certification recognizes Microchip's quality systems conform stringent standards forth automotive industry, benefiting customers. Microchip facilities Bangkok, Thailand, Shanghai, China, serve foundation Microchip's extensive assembly test capability located throughout Asia. multiple fabrication, assembly test sites, with more than 640,000-square-feet facilities worldwide, ensures Microchip's ability meet increased production requirements fast growing customer base. Microchip supports global customer base from direct sales engineering offices Asia, North America, Europe Japan. Offices staffed meet high quality expectations customers, accessed technical business support. Company also franchises more than distributors network technical manufacturer's representatives serving countries worldwide. Fully Integrated Manufacturing Microchip delivers fast turnaround consistent quality through total control over phases production. Research development, design, mask making, wafer fabrication, major part assembly quality assurance testing conducted facilities wholly-owned operated Microchip. integrated approach manufacturing along with rigorous advanced Statistical Process Control (SPC) continuous improvement culture resulted high consistent yields which have positioned Microchip quality leader global markets. Microchip's unique approach provides customers with excellent pricing, quality, reliability on-time delivery. DS00027T-page 1999 Microchip Technology Inc. Microchip Technology Inc. Embedded Control Overview Unlike "processor" applications such personal computers workstations, computing controlling elements embedded control applications embedded inside application. consumer only concerned with very top-level user interface such keypads, displays high-level commands. Very rarely does end-user know care know) embedded controller inside (unlike conscientious users, intimately familiar only with processor type, also clock speed, capabilities on). however, most vital designers embedded control products select most suitable controller companion devices. Embedded control products found market segments: consumer, commercial, peripherals, telecommunications, automotive industrial. Most embedded control products must meet special requirements: cost effectiveness, low-power, small-footprint high level system integration. Typically, most embedded control systems designed around which integrates on-chip program memory, data memory (RAM) various peripheral functions, such timers serial communication. addition, these systems usually require complementary Serial EEPROM, analog/interface devices, display drivers, keypads small displays. Microchip established itself leading supplier embedded control solutions. combination high-performance PIC12CXXX, PIC16C5X, PIC16CXXX, PIC17CXXX PIC18CXXX families with Migratable Memorytechnology, along with non-volatile memory products, provide basis this leadership. further expanding product portfolio provide precision analog interface products, Microchip committed continuous innovation improvement design, manufacturing technical support provide best possible embedded control solutions you. PIC12CXXX: 8-Pin, 8-Bit Family PIC12CXXX family packs Microchip's powerful RISC-based PICmicro architecture into 8-pin SOIC packages. These PIC12CXXX products available with either 12-bit 14-bit wide instruction set, operating voltage 2.5V, small package footprints, interrupt handling, deeper hardware stack, multiple channels EEPROM data memory. these features provide intelligence level previously available applications because cost size considerations. PIC16C5X: 12-Bit Architecture Family PIC16C5X well-established base-line family that offers most cost-effective solution. These PIC16C5X products have 12-bit wide instruction currently offered 14-, 18-, 28-pin packages. SOIC SSOP packaging options, these devices among smallest footprint MCUs industry. Low-voltage operation, down 2.0V MCUs, makes this family ideal battery operated applications. Additionally, PIC16HV5XX operate volts directly with battery. PIC16CXXX: 14-Bit Architecture Family With introduction PIC16CXXX family members, Microchip provides industry's highest performance Analog-to-Digital Converter capability 12-bits 8-bit MCU. PIC16CXXX family offers wide-range options, from 68-pin packages well high levels peripheral integration. This family 14-bit wide instruction set, interrupt handling capability deep, 8-level hardware stack. PIC16CXXX family provides performance versatility meet more demanding requirements today's cost-sensitive marketplace mid-range 8-bit applications. PIC17CXXX: 16-Bit Architecture Family PIC17CXXX family offers world's fastest execution performance 8-bit family industry. PIC17CXXX family extends PICmicro MCU's high-performance RISC architecture with 16-bit instruction word, enhanced instruction powerful vectored interrupt handling capabilities. powerful array precise on-chip peripheral features provides performance most demanding 8-bit applications. PIC18CXXX: 16-Bit Enhanced Architecture Family PIC18CXXX family high performance, CMOS, fully static, 16-bit MCUs with integrated analog-to-digital (A/D) converter. PIC18CXXX MCUs incorporate advanced RISC architecture. PIC18CXXX enhanced core features, level-deep stack, multiple internal external interrupts sources. separate instruction data busses Harvard architecture allow 16-bit wide instruction word with separate 8-bit wide data. two-stage instruction pipeline allows instructions execute single cycle, except program branches, which require cycles. total instructions (reduced instruction set) available. Additionally, large register gives some architectural DS00027T-page Company Profile PICmicro Overview Roadmap Microchip PICmicro MCUs combine high-performance, low-cost, small package size, offering best price/performance ratio industry. More than million these devices have shipped customers worldwide since 1990. Microchip offers five families 8-bit MCUs best your application needs: PIC12CXXX 8-pin 12-bit/14-bit program word PIC16C5X 12-bit program word PIC16CXXX 14-bit program word PIC17CXXX 16-bit program word PIC18CXXX enhanced 16-bit program word families offer OTP, low-voltage low-power options, with variety package options. Selected members available ROM, EEPROM reprogrammable FLASH versions. 1999 Microchip Technology Inc. Microchip Technology Inc. innovations used achieve very high performance 10MIPS 8-bit MCU. PIC18CXXX family special features reduce external components, thus reducing cost, enhancing system reliability reducing power consumption. These include programmable Voltage Detect (LVD) programmable Brown-Out Detect (BOD). world, with design engineers right front lines: make smarter, make smaller, make more, make cost less manufacture make snappy. meet needs this growing customer base, Microchip rapidly expanding already broad line 8-bit PICmicro MCUs. PIC12CXXX family's size opens possibilities product design. Mechatronics Revolution living through revolutionary period that impacting almost every aspect lives. nature revolution momentous shift from analog/electro-mechanical timing control digital electronics. called Mechatronics Revolution, being staged companies throughout PICmicro Naming Convention PICmicro architecture offers users wider range cost/performance options than 8-bit family. order identify families, following naming conventions have been applied PICmicro MCUs: TABLE PICmicro NAMING CONVENTION* Family 8-bit HigherPerformance Family Architectural Features MIPS clock 16-bit wide instruction compiler efficient instruction Internal/external vectored interrupts 16-bit wide instruction Internal/external vectored interrupts clock speed instruction cycle MHz) 8-bit Mid-Range Family Hardware multiply 14-bit wide instruction Internal/external interrupts clock speed (Note instruction cycle MHz) PIC16CXXX PIC14CXXX PIC16C55X PIC16C6X PIC16CR6X PIC16C62X PIC16CR62X PIC16CE62X program memory with functions program memory, digital only program memory, digital only program memory, digital only program memory with comparators program memory with comparators program memory with comparators EEPROM data memory PIC16F62X FLASH program memory with comparators EEPROM data memory PIC16C64X program memory with comparators PIC16C66X program memory with comparators PIC16C7X program memory with analog functions (i.e. A/D) PIC16CR7X program memory with analog functions PIC16C7XX program memory with higher resolution analog functions PIC16F8X FLASH program memory EEPROM data memory PIC16CR8X program memory EEPROM data memory PIC16F87X FLASH program memory with higher resolution analog functions PIC16C9XX program memory, driver PIC16C5X program memory, digital only PIC16CR5X program memory, digital only PIC16C505 program memory, digital only, internal 4MHz oscillator PIC16HV540 program memory with high voltage operation program memory, digital only program memory, digital only with EEPROM data memory program memory, digital only program memory with analog functions program memory with analog functions EEPROM data memory Name PIC18Cxx2 Technology program memory with higher resolution analog functions PIC18CXXX PIC17CXXX 8-bit High-Performance Family PIC17C4X PIC17CR4X PIC17C7XX program memory, digital only program memory, digital only program memory with mixed-signal functions PIC16C5X 8-bit Base-Line Family 8-bit, 8-pin Family 12-bit wide instruction clock speed instruction cycle MHz) 14-bit wide instruction clock speed instruction cycle MHz) PIC12CXXX PIC12C5XX PIC12CE5XX PIC12CR5XX PIC12C67X PIC12CE67X Note Internal 4MHz oscillator maximum clock speed some devices less than MHz. *Please check with your local Microchip distributor, sales representative sales office latest product information. DS00027T-page 1999 Microchip Technology Inc. Microchip Technology Inc. Development Systems Microchip committed providing useful innovative solutions your embedded system designs. installed base application development systems grown impressive 150,000 systems worldwide. Among support products offered MPLABTM-ICE 2000 In-Circuit Emulator running under Windows environment. This real-time emulator supports low-voltage emulation, volts, full-speed emulation. MPLAB, complete Integrated Development Environment (IDE), provided with MPLAB-ICE 2000. MPLAB allows user edit, compile emulate from single user interface, making developer productive very quickly. MPLAB-ICE 2000 designed provide product development engineers with optimized design tool developing target applications. This universal in-circuit emulator provides complete design toolset PICmicro MCUs PIC12CXXX, PIC16C5X, PIC16CXXX, PIC17CXXX PIC18CXXX families. MPLAB-ICE 2000 compliant. Microchip's newest development tool, MPLAB In-Circuit Debugger (ICD) Evaluation Kit, uses in-circuit debugging capabilities PIC16F87X family Microchip's ICSPcapability debug source code application, debug hardware real time program target PIC16F87X device. MATE full-featured, modular device programmer, enables quickly easily program user software into PICmicro MCUs, products Serial EEPROMs. MATE runs under MPLAB operates stand-alone unit conjunction with PC-compatible host system. PICSTART Plus development kit, low-cost development system PIC12CXXX, PIC16C5X, PIC16CXXX PIC17CXXX MCUs. PICDEM low-cost demonstration boards simple boards which demonstrate basic capabilities full range Microchip's MCUs. Users program sample MCUs provided with PICDEM boards, MATE PICSTART Plus programmer, easily test firmware. KEELOQ Evaluation Tools support Microchip's Secure Data Products. Serial EEPROM Designer's includes everything necessary read, write, erase program special features Microchip Serial EEPROMs. Total Endurance Disk included trade-off analysis reliability calculations. total significantly reduce time-to-market result optimized system. Company Profile TABLE PICmicro SYNERGISTIC DEVELOPMENT TOOLS Development Tool Integrated Development Environment (IDE) Compiler Compiler Full-Featured, Modular In-Circuit Emulator In-Circuit Debugger Evaluation Full-Featured, Modular Device Programmer Entry-Level Development with Programmer Name MPLAB MPLAB-C17 MPLAB-C18 MPLAB-ICE 2000 MPLAB-ICD MATE PICSTART Plus PIC12CXXX PIC16C5X PIC16CXXX PIC16F87X PIC17CXXX PIC18CXXX 1999 Microchip Technology Inc. DS00027T-page Microchip Technology Inc. Software Support MPLAB Integrated Development Environment (IDE) Windows-based development platform Microchip's PICmicro MCUs. MPLAB offers project manager program text editor, user-configurable toolbar containing four pre-defined sets status which communicates editing debugging information. MPLAB-IDE common user interface Microchip development systems tools including MPLAB Editor, MPASM Assembler, MPLAB-SIM Software Simulator, MPLIB, MPLINK, MPLAB-C17 Compiler, MPLAB-C18 Compiler, MPLAB-ICE 2000, MATE Programmer PICSTART Plus Development Programmer. Microchip endeavors times provide best service responsiveness possible customers. Microchip Internet site provide with latest technical information, production released software development tools, application notes promotional news Microchip products technology. Microchip World Wide address http://www.microchip.com. KEELOQ Encoder Devices Transmission Code Length Bits Code Hopping Bits Prog. Encryption Bits Product Seed Length Operating Voltage 3.5V 13.0V 3.5V 13.0V 3.5V 13.0V 2.0V 6.3V 3.5V 13.0V 3.5V 13.0V 2.0V 6.6V 2.0V 6.6V 2.0V 6.6V 2.0V 6.6V 2.0V 6.6V 2.0V 6.6V 2.0V 6.6V HCS101* HCS200 HCS201* HCS300 HCS301 HCS320 HCS360 HCS361 HCS365* HCS370* HCS410 HCS412* HCS470* KEELOQ Decoder Devices TransmitReception ters SupProduct Length Bits ported HCS500 HCS512 HCS515 Functions Serial Functions (S0, S3); VLOW, Serial Serial; Parallel Operating Voltage 4.5V 5.5V 3.0V 6.0V 4.5V 5.5V *Contact Microchip Technology Inc. availability. Analog/Interface Products Using technology achievements developing analog circuity PICmicro family, Company launched complementary line stand-alone analog interface products. Many these stand-alone devices support functionality that currently available PICmicro MCUs. Stand-alone analog products currently offered include: Analog-to-Digital Converters Operational Amplifiers System Supervisors Microchip also offers innovative silicon products support variety interfaces used transmit data from embedded control systems. first interface products support Controller Area Network (CAN), protocol highly integrated into variety networked applications including automotive. Secure Data Products Overview Microchip's patented KEELOQ® code hopping technology perfect solution remote keyless entry logical/physical access control systems. initial device family, HCS300 encoder, replaces current fixed code encoders transmitter applications providing cost, integrated solution. KEELOQ family continuing expand with HCS301 (high voltage encoder), HCS200 (low-end, low-cost encoder), high-end encoders (HCS360 HCS361) that meet specifications requirements. HCS410, self-powered transponder superset HCS360, initial device expanding encoder/transponder family. Microchip provides flexible decoder solutions providing optimized routines Microchip's PICmicro MCUs. This allows designer combine decoder system functionality MCU. decoder routines available under license agreement. HCS500, HCS512 HCS515 first decoder devices KEELOQ family. These devices single chip decoder solutions simplify designs handling learning decoding transmitters. KEELOQ product family expanding include enhanced encoders decoders. Typical applications include automotive RKE, alarm immobilizer systems, garage door openers home security systems. High-Performance 12-Bit Analog-to-Digital Converters MCP320X 12-bit analog-to-digital converter (ADC) family based successive approximation register architecture. first four members include: MCP3201, MCP3202, MCP3204 MCP3208. MCP320X family features 100K samples second throughput, power microamps active nanoamps standby, wide supply voltage 2.7-5.5 volts, extended industrial temperature range max. ksps., guaranteed missing codes, serial output with industry-standard SPI® interface. MCP320X available 8-input channel versions (the MCP3201, MPC3202, MCP3204 MCP3208, respectively). devices offered DS00027T-page 1999 Microchip Technology Inc. Microchip Technology Inc. PDIP, SOIC TSSOP packages. Applications include data acquisition, instrumentation measurement, multi-channel data loggers, industrial PCs, motor control, robotics, industrial automation, smart sensors, portable instrumentation, home medical appliances. 13.56 tags upgrade migration path virtually application with higher performance features. Company Profile Serial EEPROM Overview Microchip offers broadest selections CMOS Serial EEPROMs market embedded control systems. Serial EEPROMs available variety densities, operating voltages, interface protocols, operating temperature ranges space saving packages. Controller Area Network (CAN) Microchip enhancing product portfolio introducing Product Family. MCP2510 smallest, easiest-to-use, controller market today. Combining MCP2510 with Microchip's broad range high-performance PICmicro MCUs enables Microchip support virtually today's CAN-based applications. Other potential benefits having separate controller include ability system designers select from much wider variety MCUs optimal performance solution. Additional products planned Microchip's product portfolio include other peripherals family PICmicro MCUs with integrated support. Future support applications includes family PICmicro MCUs additional peripheral devices. Densities: Currently range from bits 256K bits with higher density devices development. Interface Protocols: offer popular protocols: I2CTM, Microwire SPI. Operating Voltages: addition standard devices there voltage families. "LC" devices operate down 2.5V, while breakthrough "AA" family operates, both read write mode, down 1.8V, making these devices highly suitable alkaline NiCd battery powered applications. Operational Amplifiers Microchip MCP60X Operational Amplifier family includes four devices: MCP601, MCP602, MCP603 MCP604. These devices Microchip's first volt single supply operational amplifier products. MCP60X family offers gain bandwidth product 2.8MHz with typical operating current 230µA. MCP60X devices Microchip's advanced CMOS technology which provides bias current, high speed operation, high open-loop gain rail-to-rail output swing. Temperature Ranges: Like Microchip devices, many Serial EEPROMs offered Commercial (0°C +70°C), Industrial (-40°C +85°C) Extended (-40°C +125°C) operating temperature ranges. Packages: Small footprint packages include: industry standard 5-lead SOT-23, 8-lead DIP, 8-lead SOIC JEDEC EIAJ body widths, 14-lead SOIC. SOIC comes body widths; mil. System Supervisors Microchip offers complete family system supervisor products. devices include MCP809/810 MCP100/101 supervisory circuits with push-pull output MCP120/130 supervisory circuits with open drain output. devices functionally pin-out comparable products from other analog suppliers. Technology Leadership: Selected Microchip Serial EEPROMs backed million Erase/Write cycle guarantee. Microchip's erase/write cycle endurance among best world, only Microchip offers such unique powerful development tools Total Endurance disk. This mathematical software model innovative tool used system designers optimize Serial EEPROM performance reliability within application. Microchip offers Plug-and-Play DIMM module market with 24LCS52, special function single-chip EEPROM that available space saving packages. Plug-and-Play video monitor applications, Microchip offers 24LC21, single-chip DDC1TM/DDC2-compatible solution. addition, Microchip released high-speed 2-wire Serial EEPROM device ideal high-performance embedded systems. microIDRFID Tagging Devices Only Microchip manufactures world-class components every application radio frequency identification (RFID) system. From advanced, feature-packed microID family RFID tags high-endurance Serial EEPROMs high performance PICmicro MCUs KEELOQ code hopping encoders Microchip's full range RFID solutions available your tag, peripheral reader application designs. microID family emulate almost standard market today. provides drop-in compatible solutions most commonly used 125kHz 1999 Microchip Technology Inc. DS00027T-page Microchip Technology Inc. Microchip high-volume supplier Serial EEPROMs major markets worldwide. Company continues develop Serial EEPROM solutions embedded control applications. stock reprogrammable one-time programmable inventory, allowing customers respond immediate sales opportunities accommodate engineering changes shelf. FLASH (electrically reprogrammable) PICmicro FLASH MCUs allow erase reprogramming program memory. Reprogrammability offers highly flexible solution today's ever-changing market demands substantially reduce time market. Users program their systems very late manufacturing process update systems field. This allows easy code revisions, system parameterization customer-specific options with scrappage. Reprogrammability also reduces design verification cycle. One-Time Programmable (OTP) PICmicro MCUs manufactured high volumes without customer specific software shipped immediately custom programming. This useful customers need rapid time market flexibility frequent software updates. In-Circuit Serial Programming(ICSPTM) Microchip's PICmicro FLASH MCUs feature ICSP capability. ICSP allows programmed after being placed circuit board, offering tremendous flexibility, reduced development time, increased manufacturing efficiency improved time market. This popular technology also enables reduced cost field upgrades, system calibration during manufacturing, addition unique identification codes system system calibration. Requiring only pins most devices, Microchip offers most non-intrusive programming methodology industry. Self Programming Microchip's PIC16F87X family features self programming capability. Self programming enables remote upgrades FLASH program memory equipment through variety medium ranging from Internet Modem Infrared. setup self programming, designer programs simple boot loader algorithm code protected area FLASH program memory. Through selected medium, secure command allows entry into PIC16F87X through USART, serial communication ports. boot loader then enabled reprogram PIC16F87X FLASH program memory with data received over desired medium. And, course, self programming accomplished without need external components without limitations PIC16F87X's operating speed voltage. Quick-Turn Programming (QTP) EPROM Overview Microchip's CMOS EPROM devices produced densities from 512K. Typical applications include computer peripherals, instrumentation, automotive devices. Microchip's expertise surface mount packaging SOIC TSOP packages development surface mount EPROM market where Microchip leading supplier today. Microchip also leading supplier low-voltage EPROMs battery powered applications. MIGRATABLE MEMORYTECHNOLOGY Microchip's innovative Migratable Memory technology (MMT) provides socket software compatibility among equivalent ROM, one-time-programmable (OTP) FLASH memory MCUs. allows customers match selection memory technology product life cycle their application, providing easy migration path lower cost solution whenever appropriate. FLASH memory ideal solution engineers designing products embedded systems especially during development early stages product. certain products applications, FLASH memory used life product because advantages field upgradability where product inventory flexibility required. Once design enters pre-production stage continues through introduction growth stages, program memory provides maximum programming flexibility minimum inventory scrappage. device socket compatible with FLASH device providing lower cost, high-volume flexible solution. design enters mature stage program code stabilizes, lower cost, socket compatible memory device could used. some cases, memory still used most cost-effective memory technology product. Compatibility flexibility success PICmicro product family, ultimately success customers. FLEXIBLE PROGRAMMING OPTIONS meet stringent design requirements placed customers, following innovative programming options offered. These programming options address procurement issues reducing limiting work-in-process liability facilitating finished goods code revisions. Microchip's worldwide distributors DS00027T-page 1999 Microchip Technology Inc. Microchip Technology Inc. Microchip offers programming service factory production orders. This service ideal customers choose program medium high unit volume their factories, whose production code patterns have stabilized. Serialized Quick-Turn Programming (SQTPSM) SQTP unique, flexible programming option that allows Microchip program serialized, random pseudo-random numbers into each device. Serial programming allows each device have unique number which serve entry-code, password number. Masked Microchip offers Masked versions many most popular PICmicro MCUs, giving customers lowest cost option high volume products with stable firmware. Future Products Technology Microchip constantly developing advanced process technology modules products that utilize advanced manufacturing capabilities. Current production technology utilizes lithography dimensions down micron. Microchip's research development activities include exploring process technologies products that have industry leadership potential. Particular emphasis placed products that work high-performance broad-based markets. Equipment continually updated bring most sophisticated process, testing tools online. Cycle times technology development continuously reduced using in-house mask generation, high-speed pilot line within manufacturing facility continuously improving methodologies. Objective specifications products developed listening customers close co-operation with many customer-partners worldwide. Company Profile 1999 Microchip Technology Inc. DS00027T-page Microchip Technology Inc. NOTES: DS00027T-page 1-10 1999 Microchip Technology Inc. PICmicro® SECTION 8-BIT MICROCONTROLLER APPLICATION NOTES TECHNICAL BRIEFS PICmicro® 8-Bit Microcontroller Engineer's Assistant Using PIC16F84A AN689. Make Delta-Sigma Converter Using Microcontroller's Analog Comparator Module AN700 2-53 Switch Mode Battery Eliminator Based PIC16C72A AN701 2-61 RS-232 Autobaud PIC16C5X Devices AN712. 2-81 Measure Tilt Using PIC16F84A ADXL202 AN715. 2-97 Migrating Designs from PIC16C74A/74B PIC18C442 AN716 2-131 Brush-DC Servomotor Implementation using PIC17C756A AN718. 2-143 System Design Considerations Implementing Microcontroller AN721 2-173 Using PICmicro® MCUs Connect Internet AN724. 2-177 PIC17CXXX PIC18CXXX Migration AN726. 2-205 Implement ICSPUsing PIC16CXXX MCUs TB013 2-241 Implement ICSPUsing PIC17CXXX MCUs TB015 2-247 Implement ICSPUsing PIC16F8X FLASH MCUs TB016 2-253 Implement ICSPUsing PIC12C5XX MCUs TB017. 2-257 PIC12C67X Emulation Using PIC16C72 PICMASTER® Emulator Probe TB020. 2-265 Downloading Files External FLASH Memory Using PIC17CXXX PICmicro® Microcontrollers TB024. 2-273 Downloading Files PIC16F87X PICmicro® Microcontrollers TB025 2-281 Calculating Program Memory Checksums Using PIC16F87X TB026 2-289 Simplifying External Memory Connections PIC17CXXX PICmicro® Microcontrollers TB027 2-295 Technique Calculate Week TB028 2-301 Complementary Drive TB029. 2-311 Using PIC16F877 Develop Code PIC16CXXX Devices TB033 2-315 1999 Microchip Technology Inc. DS00711A-page DS00711A-page 2-ii 1999 Microchip Technology Inc. AN689 Engineer's Assistant Using PIC16F84A Author: Voja Antonic Press FEATURES Stand-alone hand-held instrument Single chip design Built-in rechargeable power supply Easy assemble ready use, adjustment needed User interface with output command input keys CMOS input, direct input from RS-232C +/-12V signals INTRODUCTION This compact instrument intended digital laboratory tool hardware and, some cases, software debugging. contains four instruments unit: logic probe, single channel logic state analyzer, frequency counter serial code receiver. only chip used PIC16F84A running MHz. display unit matrix alphanumeric module with rows characters. used display device functions, except logic probe which indicates low, high pulse logic states individual LEDs. Mode select, parameter change, function execute ON/OFF switching activated keys. probe common input functions, cable used connection tested circuit. Although there functions integrated single chip unit, increase complexity hardware, functions implemented software. This enables very good price/performance ratio. power supply obtained four 1.2V/180 NiCd batteries LR03 (AAA) size. instrument also battery manager, which supports automatic battery discharging charging. source code written MPASM. highly optimized code space, most code could written modular format. same reason, subroutines have more than entry point some them terminated GOTO instruction instead using RETURN instruction. PICmicro® 8-Bit Microcontroller SPECIFIC FEATURES INDIVIDUAL FUNCTIONS Logic Probe high logic levels displayed LEDs, which probe floating connected hi-impedance (>220k) output. pulse transition detected indicated turning Logic State Analyzer analyzer fetches single samples selectable rate steps from MHz). programmable start High-to-Low Low-to-High transition input. Digital waveforms displayed pseudographic mode LCD. Serial Code Receiver Serial Code Receiver receives bytes displays them both ASCII. baud rate selectable steps, from 1200 115200. selectable format bits with without parity which displayed. Signal polarity also selectable. Direct signal stealing from RS-232 RS-232C interface possible. Frequency Counter Frequency Counter counts frequency displays 8-digit decimal format with refresh rate There four ranges, from MHz, which affect count resolution (from 32). Battery Manager Battery Manager provides discharging with automatic switch that changes charge mode battery voltage, charging with constant current automatic power after hours. source between 30V, polarity, used charging. 1900 Microchip Technology Inc. DS00689A-page AN689 SYSTEM FUNCTIONS User Interface There four modes operation: Analyzer, Serial Code Receiver, Frequency Counter Battery Manager. logic probe function transparent modes except Frequency Counter. modes, submodes listed lower LCD. submodes list cycled through pressing right key, which moves cursor (blinking block) right. left activates selected submode (executes function changes parameter state/value). right-most submode (right arrow symbol) acts shortcut jump next mode. After power-on pressing key), mode chosen pressing left key, then submode right key, then eventual parameter change command execution left again. only exception Logic Probe function, only action needed switch instrument logic probe ready use. Analyzer Serial Code Receiver mode, asterisk special symbol "Start" command. When executed (left pressed while cursor asterisk), causes program wait start condition start bit. Although there manual Switch command (accessible Battery mode), there also automatic power after approximately minutes inactivity pressed. Note that down counter automatic power-off "frozen", while instrument waiting start condition analyzer mode start serial code receiver mode. course, same applies discharging charging processes, another conditions used define those processes. Figure represents functions diagram. dotted line represents actions taken when right pressed, solid line left key. cursor, which blinking block LCD, represented solid block Figure moved down drawing clarity. variable (named REL) assembler source code, defines position cursor LCD. (default), cursor will placed first character command parameter). '0', code will assembled that cursor will moved preceding location exists) before command. DS00689A-page 1900 Microchip Technology Inc. AN689 FIGURE HIGH LEVEL FUNCTION FLOWCHART break Analyzer 01MHz/01ms 01MHz 01ms Sample rate 1MHz/1ms 500kHz/2ms 228kHz/4.4ms 100kHz/10ms 50kHz/20ms 38.4kHz/26ms 25kHz/40ms 19.2kHz/52ms 10kHz/100ms 9.6kHz/104ms 4.8kHz/208ms 2.4kHz/417ms 1kHz/1ms 400Hz/2.5ms 100Hz/10ms 40Hz/25ms Start Display group 1-60 group 61-120 group 121-180 waiting starting condition output example while depressed Display Group submode (group samples 121-180) ^125 ^140 ^155 ^170 output example while released (group samples 181-240) iiiiiii.iii.iii.iiiiiii. 01MHz 01ms Starting condition start falling edge start rising edge group 181-240 group 241-300 PICmicro® 8-Bit Microcontroller break Display group group 8-14 group 15-21 group 22-28 group 29-35 group 36-42 Serial 19.2 Baud rate select 1200 2400 4800 9600 19200 38400 57600 115200 7-bit word 8-bit word 7-bits +parity 8-bits +parity 7-bit inverse 8-bit inverse 7-bits inverse +parity 8-bits inverse +parity 19.2 Start receive bytes output example Break command bytes were received Break 19.2 output example Break command taken after reception five bytes 19.2 Frequency 20MHz/R16 12345678 Frequency counter range range MHz/resolution range MHz/resolution range MHz/resolution range MHz/resolution Battery Disch 00:00 Charge Power Discharge break Charge Hours break 1900 Microchip Technology Inc. DS00689A-page AN689 Logic Probe typical hardware solution logic probe shown Figure inverters, high indication, monostables, pulse detection, commonly used most low-cost logic probes. This solution will display unconnected probe high logic level. There some better versions which detect floating input turn LEDS detected. Figure represents common solution such functions, where analog comparators employed detect low, high floating inputs. FIGURE TYPICAL LOGIC PROBE SCHEMATIC "High" "Low" MONOSTABLE Probe Trigger falling edge "Pulse" MONOSTABLE Trigger falling edge FIGURE IMPROVED LOGIC PROBE SCHEMATIC "High" MONOSTABLE Trigger falling edge "Low" MONOSTABLE Trigger falling edge "Pulse" High Resistance Probe Instead using such approaches, logic probe function this instrument software aided, floating input detected dynamic instead static one. equivalent hardware schematic diagram this solution shown Figure (Pulse detection circuit shown). hardware detail which supports operation logic probe used this unit represented Figure microcontroller polls input services LEDs transition detected, switched down counter switches after additional transition detected. This approach disadvantages. Logic state latching uniform rate cause visible interference frequency monitored signal near latching rate. This problem minimized adding self-variable extra delay software, which makes latching frequency unstable. This makes range critical frequencies much wider, interference appears very short burst pauses activity, which completely avoided adding extra debouncer only microseconds. Although unnoticeable, this delay helps prevent level instability while monitoring critical frequencies. DS00689A-page 1900 Microchip Technology Inc. AN689 FIGURE FUNCTIONAL SCHEMATIC PIC16F84A LOGIC PROBE Probe High Resistance "High" "Low" CLOCK GENERATOR FIGURE SUPPORTING PIC16F84A LOGIC PROBE CIRCUITS PICmicro® 8-Bit Microcontroller OUTPUT PORTB.2 OUTPUT PORTB.7 OUTPUT PORTB.6 OUTPUT PORTB.5 220k Probe 1.5k INPUT PORTA.4 "Low" "High" "Pulse" Another disadvantage related pulse indication case very short pulse, likely that microcontroller, which polls input, omit between input reads. Instead simple polling, internal counter, TMR0, used here that instead testing logic state input, state TMR0 tested. this way, pulses short might detected. reality, minimal pulse width limited resistor input capacitance. T0SE OPTION_REG register properly updated each pass, that first incoming transition will increment TMR0. logic probe software support integrated keyboard routine. LEDs active only while instrument idle (doing nothing waiting some pressed), which time while unit except frequency counter mode, during battery discharging charging, START command issued analyzer serial receiver mode (300 samples fetched bytes received) finished. output which generates square-wave pulses. These pulses through probe tip. resistance high enough affect tested circuit, except tested point floating input. However, that case will probably make circuit unstable thus help locating floating input. This pulse stream also used software detect floating probe tip, this case switch LEDS off. This saves energy batteries helps detect probe validly connected point under test. simplified flow chart logic probe represented Figure this subroutine integral part scan routine, (debouncers shown detail) time-out testing (which employs 16-bit counter, "Time-out Counter") also provided. Counter" free running counter which enables execution second part subroutine performed each 256th pass. "Down Counter" timing base Pulse. state this counter greater than zero High Pulse will turned program exits only some pressed (flag STATUS,C denotes which) when time-out counter reaches zero. 1900 Microchip Technology Inc. DS00689A-page AN689 FIGURE LOGIC PROBE FLOWCHART Logic Probe Preset time-out counter Increment counter Self-variable timing loop Decrement down counter counter Down counter TMR0 Clear TMR0 Preset down counter "high" "low" Turn "pulse" Input low? Clear T0SE Turn "pulse" T0SE Left falling edge? flag STATUS,C Output low? Hi-imp output Right falling edge? Decrement time-out counter Return Clear flag STATUS,C Clear Hi-imp output Input low? Input high? Turn "low" Turn "low" Turn-on 'high" Turn-off 'high" Time-out counter Switch power supply Logic State Analyzer Stop commonly used hardware concept logic analyzer design represented Figure those functions realized software, which much easier implement, results loss sampling speed. software solution briefly represented flow chart Figure analyzer mode, sequence one-bit fetches performed. Samples stored internal (actually, samples read, last dummy reads). upper used display samples. (Hitachi's LM032L) graphic capabilities possible address single dot), this simulated eight special user-defined characters (which stored character generator RAM), each group 3-bit samples. This enables pseudo-graphic mode which, this case, looks pixels were individually addressed. display shows window samples. five windows selected placing cursor group number advancing pressing left key. While pressed, lower displays numeric pointers, which help counting sample number calculating timings recorded sequence. When released, normal restored. uniform clock, sample rate, internally generated. selectable steps. frequency period both displayed. following list available sample rates: 38.4 19.2 sampling sequence does start immediately after command issued, after selected transition detected. While waiting transition occur, output continuously held state which opposite triggering logic level. This enables application wired-or logic, even without pull-ups. this condition never occurs, possible escape pressing right key. this case, message "Break" displayed upper row. DS00689A-page 1900 Microchip Technology Inc. AN689 additional function while sampling analyzer mode. turned when start command issued, then turned when sampling receiving condition met, then again when samples fetched. slower rates, noticeable that blinks while sampling. blinking period equal sampling periods. FIGURE LOGIC ANALYZER SCHEMATIC .Parallel Outputs Probe Serial N-bit Shift Register Clock Start/Stop Flip Flop Starting Transition Select Ready/Busy Flip Flop 'Start' Command 'Break' Command Clock Clock Generator Reset Clock Counter N-th Count Serial PICmicro® 8-Bit Microcontroller 1900 Microchip Technology Inc. DS00689A-page AN689 FIGURE LOGIC ANALYZER FLOWCHART Analyzer Point Buffer Right pressed? Start condition met? Break handling sample rates generated software, three highest ones individual subroutines. sample rate MHz, which very beginning program, fetch memorize single sample rotating into buffer, change destination address after every samples exit loop after samples. this while keeping uniform timing (alternated, which gives average 2.5) instruction cycles fetch. That could realized conventional manner, location-sensitive structure. Upon exit, jumps address (which from subroutine itself). modify anything this program, take care affect this location. analyzer have some unpredictable delays between external starting event (rising falling edge) first sample. cases, this delay vary from microseconds, have some significance only highest sample rates. reasons this delay time which microcontroller requires test, which enables manual break this event never comes. Also, there some minor jitter analyzer sample rate. worst case, might Turn "pulse" input flag Rotate INDF through Timing loop bits fetched? Advance buffer? Display buffer graphic mode Return DS00689A-page 1900 Microchip Technology Inc. AN689 Serial Code Receiver this mode, total bytes received displayed both ASCII. acceptable format Start Data Bits Parity more Stop Bits. possible connect probe directly RS-232 RS-232C voltage levels, RS-422 RS-485, logic. available baud rates are: 1200 2400 4800 9600 19200 38400 57600 115200 (1.2) (2.4) (4.8) (9.6) (19.2) (38.4) (57.6) (115) data bits selected adjust desired data format. Parity parity (suffix "p"). This affects only proper timing this during reception. neither tested validity displayed. Standard RS232C inverse polarity. prefix displayed, then inverse polarity active (low start bit, inverted data optional parity bits high stop bit). This useful serial message must fetched before RS-232C drivers after buffers (which both inverters). Received bytes displayed both ASCII groups bytes each. ASCII representation with cleared, non-printable characters (00h-1Fh) represented dots. other codes standard ASCII. string received serial codes bytes long. string shorter, instrument will wait next start bit, look like stuck without message. that case, reception stopped pressing right key. bytes were received, message "Break" will displayed, least byte received, received sequence will displayed with unreceived bytes represented zeros. Similar analyzer mode, will turned when first start detected. This helps detect sequences less than bytes length. error test performed during reception. Figure represents flowchart serial code receiver. PICmicro® 8-Bit Microcontroller 1900 Microchip Technology Inc. DS00689A-page AN689 FIGURE SERIAL CODE RECEIVER FLOWCHART Serial Code Receiver Clear buffer point buffer Preset counter Inverse signal mode? Clear hi-impedance output hi-impedance output Parity received? Rotate left INDF Input low? Right pressed? Input high? Input high? Right pressed? Inverse signal mode? Complement INDF 7-bit data mode? Rotate right INDF Input low? Turn "pulse" Loop periods Advance buffer? byte received? Display buffer ASCII mode Loop period input flag Rotate INDF through Decrement counter counter Display "Break" Turn "pulse" Return DS00689A-page 2-10 1900 Microchip Technology Inc. AN689 Frequency Counter Figure shows standard structure hardware solution frequency counter. this substituted software PICmicro® microcontroller (MCU) aided existing TMR0. counters binary, counter state displayed after 4-byte binary 8-digit decimal conversion. display refresh rate flow chart frequency counter represented Figure this real-time function, existing keyboard subroutine might used, separate time-out tests written. logic probe function disabled this mode. There "Start" command here, this function active time while instrument Frequency Counter mode. There only submode, range select, pressing right button used stepping through submodes, changes range immediately. Internal counter TMR0 used, program expands width counter additional bytes. fourth byte added after counting multiplying 24-bit counter state constant, which depends which prescaler factor used. prescaler also affects counter resolution. Here counter ranges corresponding resolutions: Range Resolution Range Resolution Range Resolution Range Resolution resolution surely affects reading error frequency counter, this error still less than error which caused initial non-accuracy industrial class quartz crystals. FIGURE FREQUENCY COUNTER FLOWCHART Frequency counter Adjust display prescaler Both keys released? Clear TMR0 Clear software counter Advance prescaler factor PICmicro® 8-Bit Microcontroller TMR0 overflow? Advance software counter Right pressed? Left pressed? time-out? Battery manager mode FIGURE FREQUENCY COUNTER SCHEMATIC Display Multiply counter prescaler factor Binary decimal conversion Display counter state Latch Decoder Parallel Register Probe Prescaler Clock (Optional) Counter Decrement time-out counter Reset Time-out counter Time-base Switch power supply Stop 1900 Microchip Technology Inc. DS00689A-page 2-11 AN689 Battery Manager battery manager three submodes. first manual power-off, although there also automatic power after approximately minutes inactivity pressed). second submode discharging. performed with current through resistors. voltage monitor informs PICmicro battery voltage lower than mode automatically switched charging. recommended that external power supply connected before discharging command issued. This will decrease resulting discharging current about when instrument supply connected charging current flows independently mode selected. Charge submode, when started, displays time HH:MM format, starting from 00:00, switches instrument (and charging current also) 14:00. also possible charge NiCd battery even discharged, this recommended, unintentional overcharging affect capacity life. unit ready charge battery time switched even command charge active. enough connect external supply turn instrument were counted, more than half hardware used discharging charging. Figure explains structure battery manager hardware simplified form, where transistors replaced switches, clarity. flow chart battery discharger charger shown Figure FIGURE BATTERY MANAGEMENT SCHEMATIC Unit Supply Constant current source hours time-out Discharge Command Voltage External .30V Power NiCd Battery 1.25V Discharging resistor FIGURE BATTERY MANAGER FLOWCHART Discharge Switch discharging resistor Charge TImer 00:00 Right pressed? Voltage Break handling Display timer format hh:mm Right pressed? minute passed? Advance timer minute hours passed? Switch power supply Stop Break handling DS00689A-page 2-12 1900 Microchip Technology Inc. AN689 HARDWARE OVERVIEW complete schematic diagram shown Figure only used PIC16F84A-10/P, running MHz. controls intelligent module pins RB4-RB7, using additional ports (RB0 RB1) Enable signal Register Select (Control/Data). FIGURE PIC16F84A PROBE SCHEMATIC BC338 1.5k MCLR 5.6k BC338 2.7k Discharge Charge D12: 1N4148 PICmicro® 8-Bit LED3 2.7k LED2 LED1 Microcontroller Reset PIC16F84A Charge BC328 2.7k 220k 1.5k 1.5k 10MHz BC328 Probe Input Ground Connection Left Right BC338 NiCd 1.2V module LM032L controlled 4-bit parallel mode, which used this project. That pins 7-10 used. LEDs share same outputs with data bus. only consequence that some very minor short flashing visible while PICmicro accessing (mostly when some pressed). also functions. controls Enable signal module transistor which used discharging function. eliminate current spikes through while accessing LCD, capacitor added, which disables activating short Enable pulses. main discharging resistors (R20 R21) intentionally located distant places minimize heat dissipation small area. Inputs used read same signal, which necessary because only port which directed TMR0 counter, "edge bit" port. analyzer fetch routine highest rate must rotate PORTA bits single instruction perform transfers from input STATUS,C flag. Resistors used signal voltage limitation, with internal reverse diodes PIC16F84A. This enables connecting probe directly RS-232C connector, which voltage range. Resistor disables input floating while unit OFF. voltage monitor (transistor with ZD1) acts comparator which holds input port battery voltage higher than This used automatically detect discharging process. value resistor modified fine trim this cut-off voltage Transistor main ON-OFF switch. controls this transistor through also activated pressing left right key. Diodes disable false activation through internal diodes PICmicro when powered OFF. 1900 Microchip Technology Inc. DS00689A-page 2-13 AN689 Transistor constant current regulator, which enables supply between battery charging. Diodes D9-D12 allow application voltage polarity. Zener diode voltage stabilizer, protects hardware from overvoltage battery contacts properly tied while charging. RESET key, which mounted solder side PCB, accessible from lower side instrument through small hole bottom plane package. used drops into deadlock state some reason when unit switched first time after assembly. (Vo) connector driving voltage. manufacturer recommends potentiometer (10-20k) voltage adjustment this input fine trim contrast, cases contrast optimal when potentiometer lower-most position shortened GND). rejected connected final version this instrument. Charging current will flow time while supply connected unit even unit Charge mode. When unit (e.g. when charging 14-hour process finished), charging current stopped. Both charging discharging indicated individual LEDs. voltage will sufficient then unit will probably need reset pressing normal charging process should then used executing Charge command Battery mode. contrast voltage-dependent, there voltage stabilizer, appears little darker immediately after full charge. battery voltage will slightly over This will affect readability. After minutes operation, battery voltage stabilizes appears normal. Note: Data EEPROM used some lookup tables. This read-only data Data EEPROM must programmed before unit ready use. will affect data EEPROM contents. your programmer does support automatic loading Data EEPROM contents from file, must loaded manually total bytes used, last three bytes don't care). following will help that case (all values hexadecimal): addr 00-07h: addr 08-0Fh: addr 10-17h: addr 18-1Fh: addr 20-27h: addr 28-2Fh: addr 30-37h: addr 38-3Ch: MECHANICAL CONSTRUCTION components layout shown Figure components placed component side PCB, except (reset), which solder side. NiCd batteries, which placed specially shaped edges soldered directly PCB. module placed spacers, long, which tightened long spacers bottom side PCB. This leaves enough room batteries which diameter. should higher than recommended height keys about keys listed parts list 14.5 high, they should mounted extra spacer about thick, non-conductive material. probe fixed using three wire loops soldered tip. possible connector supply which fits pads, also possible (across dotted line components layout) make enough space some other type connector, which tightened package. Pads wires, needed this case, provided PCB. polarity significant. possible build package same material which used printed circuit boards, easily joints soldered. Figure shows package detail. Note: module used Hitachi's LM032L. Type LM032LT also used, recommended, transflective type contains integrated illumination (which used this case, requires high voltage). modules LM032H LM032HT they require dual voltage supply (+5/-5V). FIRST SWITCHING AFTER ASSEMBLING batteries should connected last, there easy disconnect them once they soldered, also recommended assemble hardware while voltage present. best test instrument with some external power supply, when completely debugged tested, batteries soldered. connect external supply charging batteries batteries safely their places! Zener diode will reduce voltage 6.8V, avoid testing efficiency this protection avoidable. NiCd batteries discharged point PICmicro cannot operate, will necessary keep left right pressed some time (while supply connected charging), pressing makes hardware bypass charging current. After about minute such charging, battery DS00689A-page 2-14 1900 Microchip Technology Inc. FIGURE Battery lower part case Upper part case soldered LED2 LED1 PICmicro® 8-Bit Microcontroller 1900 Microchip Technology Inc. main 20.5 soldered Disch LED4 LED3 Connector Charge LED5 CASE/PCB CONSTRUCTION FIGURE D9D10 PIC16F84A Charge PARTS LAYOUT DS00689A-page 2-15 AN689 AN689 PARTS LIST module type LM032L (Hitachi) PCB. Microcontroller PIC16F84A-10/P (Microchip). Transistors: BC338 small signal silicon SOT-54, BC328 small signal silicon SOT-54, pinning CBE)3 pinning CBE)2 Diodes: 1N4148 small signal silicon diode)12 power 6.8V zener diode)1 power 3.3V zener diode)1 Resistors: 1/4W axial1 1/4W axial1 120R 1/4W axial 1/4W axial5 330R 1/4W axial 1/4W axial2 1/4W axial3 220K 1/4W axial1 1/4W axial3 Capacitors: ceramic2 tantal1 ceramic1 Quartz: LEDs: red, diameter yellow, diameter1 green, diameter2 I.C. socket: 18-pin Keys: (raster 14.5 high) (raster 5.5*3) (raster 7.5*5)1 Connectors: pins male connector PCB, raster 2.54 cable-end crocodil-grip connection1 (100 mils)1 coaxial female connector PG2031 pins female connector PCB, raster 2.54 (100 mils)1 Mechanical parts: spacer high spacer high DS00689A-page 2-16 1900 Microchip Technology Inc. AN689 Please check Microchip's Worldwide Website www.microchip.com latest version source code. OBJECT CODE VALUE 00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 00030 00031 00032 00033 00034 00035 00036 00037 00038 00039 00040 00041 00042 00043 00044 00045 00046 00047 00048 00049 00001 00002 00136 00050 00051 00052 00053 00054 00055 00056 00057 00058 LINE SOURCE TEXT Filename: PROBE.ASM Author: Voja Antonic Company: Press Revision: RevA1 Date: 07-09-98 Assembled using MPASM 01.50 Include files: p16f84.inc This program multi-purpose laboratory instrument which consists logic probe, single-channel logic state analyzer, serial code receiver frequency counter. this single-chip instrument, functions supported software. module used Hitachi's LM032L with lines columns. Note: code optimized code space, that reason most code could written modular format. same reason subroutines have more than entry point some them terminated GOTO instead RETURN. port usage (all PORTA bits inputs, PORTB bits outputs) (note: bits port have functions each): PORTA,0 (input) probe input PORTA,1 (input) voltage monitor (high battery voltage PORTA,2 (input) left (key (low pressed) PORTA,3 (input) right (key (low pressed) PORTA,4 (input) probe input PORTB,0 (output) enable (high=select LCD),discharge (high=on) PORTB,1 (output) register select (low=instruction,high=data) PORTB,2 (output) hi-imp output probe PORTB,3 (output) current hold supply (low off) PORTB,4 (output) module PORTB,5 (output) module (high PORTB,6 (output) module (high PORTB,7 (output) module (high External Clock Frequency: Config Settings: CP=OFF, PWRTE=ON, WDT=OFF, OSC=HS Program Memory Usage: 1023 words Data Usage: bytes Data EEPROM Usage: bytes Note: This read-only data, Data EEPROM must programmed before unit used. will affect data EEPROM contents. list p=16f84, f=inhx8m, include "p16f84.inc" LIST P16F84.INC Standard Header File, 2.00 Microchip Technology, Inc. LIST FLAG RXBITS DJNZ SCRATCH PCOUNT SUBMODE DEBO1 DEBO2 flag register bit0=parity,bit1=7/8 bits,bit 2=inverse general purpose, e.g. loop counter general purpose scratchpad timing count (monostable sim) submode (cursor horizontal position) rotor debouncing rotor debouncing PICmicro® 8-Bit Microcontroller 0000000C 0000000D 0000000E 0000000F 00000010 00000011 00000012 00000013 1900 Microchip Technology Inc. DS00689A-page 2-17 AN689 00000014 00000015 00000016 00000017 00000018 00000019 0000001A 0000001B 0000001C 0000001D 0000001E 00000022 00000026 00000001 00059 00060 00061 00062 00063 00064 00065 00066 00067 00068 00069 00070 00071 00072 00073 00074 00075 00076 00077 00078 00079 00080 00081 00082 00083 00084 00085 00086 00087 00088 00089 00090 00091 00092 00093 00094 00095 00096 00097 00098 00099 00100 00101 00102 00103 00104 00105 00106 00107 00108 00109 00110 00111 00112 00113 00114 00115 00116 00117 00118 00119 00120 00121 00122 00123 00124 COUNT RATE CHARCOU SHOWCOU DELAYL DELAYH PRESC TIMOUTL TIMOUTH RXRATE BIN4 CMP4 BUFFER general purpose counter analyzer sample rate, 0.15 char counter fixed format display 1-4, which group samples shown delay when delay when prescaler rate frequency counter timeout counter auto power timeout counter auto power baud rate, arith value, byte first arith comparing, byte first receive analyzer cursor char command cursor before command 00000001 00000002 00000003 00000004 00000005 00000006 00000007 Bits definitions FLAG register (bit used): decimal point 3-digit bin2dec conv PTIP prev.state probe input (for edge detect) RIPPLE zero blanking XTOX analyzer start 1=rising, 0=falling edge LEDP Pulse, 1=on LEDH High, 1=on LEDL Low, 1=on Reset vector goto Start Get1MHz This subroutine fetches samples (last will ignored) from PORTA.0 rotating through CARRY rate instr. cycles each sample, realized mostly cycles alternatively, following order: 4t-2t-2t (not main loop, executed only once), then (repeat times) Call Common inits loop counter (COUNT) make cycles before exiting samples fetched each pass), point BUFF. also presets T0SE depending XTOX FLAG reg) enable proper edge detect, will affect TMR0 state. State (Break) tested while waiting start condition. Write incremented after every samples. COUNT initial value 01101101, after ANDing 0c0h subtracting from makes 0dh, even COUNT incremented times. After passes, COUNT incremented b'10000000', which after 0c0h makes 4dh. Those jumps location sensitive, makes whole subroutine unrelocateable. Between this subroutine instruction goto Finished (below), which must loc. 4dh, there free locations. They used tables DecTab CurTab, which causes that those tables must have fixed length. anything relocates here, take care affect location instruction goto Finished. Input/Output variables: None this subroutine must start addr Get1MHz movlw call GetEdge btfss PORTA,3 test status and. 80h-.19 Common read cycle loop cyc(38 by=304 smpls) initialize COUNT, FSR, hi-imp out. .bit XTOX T0SE 0000 28A8 0001 0001 0001 306D 0002 226F 0003 0003 1D85 DS00689A-page 2-18 1900 Microchip Technology Inc. AN689 0004 28CC 0005 0801 0006 0C85 0007 1903 0008 2803 0009 000A 000B 000C 0C80 0C85 0C80 0C85 00125 00126 00127 00128 00129 00130 00131 00132 00133 00134 00135 00136 00137 00138 00139 00140 00141 00142 00143 00144 00145 00146 00147 00148 00149 00150 00151 00152 00153 00154 00155 00156 00157 00158 00159 00160 00161 00162 00163 00164 00165 00166 00167 00168 00169 00170 00171 00172 00173 00174 00175 00176 00177 00178 00179 00180 00181 00182 00183 00184 00185 00186 00187 00188 00189 00190 goto movf btfsc goto Break TMR0,W PORTA,F .jump Break routine pressed TMR0 logic level edge detector first sample little earlier compensate starting delay test there egde. .and loop STATUS,Z GetEdge INDF,F PORTA,F INDF,F PORTA,F 000D 000E 000F 0010 0011 0012 0013 0C80 0C85 0C80 0C85 0C80 0C85 0C80 incf incf movf andlw addlw incf movwf INDF,F PORTA,F INDF,F PORTA,F INDF,F PORTA,F INDF,F COUNT,F PORTA,F INDF,F PORTA,F INDF,F FSR,F PORTA,F INDF,F PORTA,F INDF,F COUNT,W PORTA,F INDF,F PORTA,F INDF,F 0c0h PORTA,F INDF,F PORTA,F INDF,F -33h PORTA,F INDF,F PORTA,F INDF,F FSR,F PORTA,F INDF,F PORTA,F INDF,F PORTA,F rotate into destination byte from input rotate into destination byte from input movwf will jump here passes .@addr 0100 0000 (40h) rotate into destination byte from input rotate into destination byte from input rotate into destination byte from input rotate into destination byte PICmicro® 8-Bit Microcontroller 0014 0A94 0015 0016 0017 0018 0C85 0C80 0C85 0C80 COUNT loop counter <-get from input rotate into destination byte <-get from input rotate into destination byte must exactly read cycles apart between incrementing <-get from input rotate into destination byte <-get from input rotate into destination byte COUNT loop counter from input rotate into destination byte <-get from input rotate into destination byte this will make first jumps 0dh, .and 19th <-get from input rotate into destination byte <-get from input rotate into destination byte this will make first jumps 0dh, .and 19th <-get from input rotate into destination byte <-get from input rotate into destination byte must exactly read cycles apart between incrementing <-get from input rotate into destination byte <-get from input rotate into destination byte <-get from input jumps first passes 0019 0A84 001A 001B 001C 001D 0C85 0C80 0C85 0C80 001E 0814 001F 0020 0021 0022 0C85 0C80 0C85 0C80 0023 39C0 0024 0025 0026 0027 0C85 0C80 0C85 0C80 0028 3ECD 0029 002A 002B 002C 0C85 0C80 0C85 0C80 002D 0A84 002E 002F 0030 0031 0032 0C85 0C80 0C85 0C80 0C85 0033 0082 1900 Microchip Technology Inc. DS00689A-page 2-19 AN689 00191 jumps 19th pass 00192 00193 00194 This table used bin2ascii (4-byte 8-digit) conversion 00195 0034 00196 DecTab 0034 3498 3496 3480 00197 098h,096h,080h decimal 0037 340F 3442 3440 00198 00fh,042h,040h decimal 003A 3401 3486 34A0 00199 001h,086h,0a0h decimal 003D 3400 3427 3410 00200 000h,027h,010h decimal 0040 3400 3403 34E8 00201 000h,003h,0e8h decimal 0043 3400 3400 3464 00202 000h,000h,064h decimal 0046 3400 3400 340A 00203 000h,000h,00ah decimal 00204 00205 00206 Cursor position table SUBMODEs mode (battery manager) 00207 0049 00208 CurTab4 0049 34D3 34C0 34C4 00209 0d2h+REL,0c0h,0c3h+REL,0cah+REL 34CB 00210 00211 00212 This exit point subroutine Get1MHz. move this 00213 instruction, must address 4dh! 00214 004D 00215 80h-33h addr 1000 0000 (80h) 00216 Get1MHz jumps here 004D 2A6A 00217 goto Finished 00218 00219 00220 Table module character generator redefinition, enable 00221 pseudographic representation samples analyzer mode. 00222 defines first characters, which stored module's RAM. 00223 004E 00224 Graphs 00225 004E 3400 3401 3404 00226 00h, 01h, 04h, 05h, 10h, 11h, 14h, 3405 3410 3411 3414 3415 00227 00228 00229 Cursor position table SUBMODEs mode (Analyzer) 00230 0056 00231 CurTab1 0056 34D3 34C0 34CD0 00232 34CF 34D1 00233 00234 00235 Cursor position table SUBMODEs mode (Serial rcvr) 00236 005B 00237 CurTab2 005B 34D3 34C8 34CD 00238 34CF 34D1 00239 00240 00241 Prescaler table resolution display mode (freq counter) 00242 0060 00243 PrescTab 0060 3404 3408 3410 00244 .16, 3420 00245 00246 00247 Range table max. frequency display mode (freq counter) DS00689A-page 2-20 1900 Microchip Technology Inc. AN689 0064 0064 3405 340A 3414 3428 00248 00249 RangeTab 00250 .10, .20, 00251 00252 00253 00254 00255 Timing constants serial code receiver BaudRate .188, .94, .46, .23, .11, 0068 0068 34BC 345E 342E 3417 340B 3405 3403 3401 0070 0070 344D 34AF 0074 0074 344F 3420 3473 342E 3468 3467 0085 0085 3441 346C 3465 008D 008D 3453 3469 0093 0093 3446 3471 346E 009C 009C 3442 3474 34F9 00A3 00A3 3442 3461 3448 347A 00256 00257 00258 00259 00260 00261 Text strings (terminator last character with set) TxtHz "MHz",'/'+80h PICmicro® 8-Bit 3466 3444 3463 3420 3461 34E5 3466 3469 3468 3443 3472 00262 DisTxt 00263 "Off Disch. Charg",'e'+80h Microcontroller 346E 3461 3479 347A 34F2 3465 3472 3461 34EC 3472 3465 3475 3465 3463 34F9 3461 3474 3465 3472 00264 Head1 00265 "Analyze",'r'+80h 00266 Head2 00267 00268 Head3 00269 "Seria",'l'+80h "Frequenc",'y'+80h 00270 Head4 00271 "Batter",'y'+80h 3472 3465 34EB 00272 BrkMes 00273 00274 00275 00276 00277 00278 00279 00280 00281 00282 00283 00284 00285 00286 00287 00288 00289 00290 00291 00292 00293 00294 00295 00296 "Brea",'k'+80h 00A8 00A8 00A9 00AA 00AB 00AC 00AD 1683 0186 1283 300C 0086 23B8 ;******* START Power sequence:I/O port defined outputs,PORTB,3 switch power supply internal Data cleared Start STATUS,RP0 clrf TRISB portb: bits outputs,port a:inputs STATUS,RP0 movlw start clr, PORTB output byte movwf PORTB switch power supply (set PORTB,3) call ClrRam clear internal wait 33.8 module initialization. 4-bit mode selected, display data cleared cursor blink mode, pseudographics character character 00h-07h preset from table Graphs. PORTB,1 (instruction) movlw 4-bit mode call Nibble write 4-bit mode command movlw func set: mode,2 lines,5*7 dots 00AE 00AF 00B0 00B1 1086 3002 23E9 3028 1900 Microchip Technology Inc. DS00689A-page 2-21 AN689 00B2 00B3 00B4 00B5 00B6 00B7 00B8 00B9 00BA 00BB 23CF 3006 23CF 300D 23CF 3040 23CF 304E 008F 3020 00297 00298 00299 00300 00301 00302 00303 00304 00305 00306 00307 00308 00309 00310 00311 00312 00313 00314 00315 00316 00317 00318 00319 00320 00321 00322 00323 00324 00325 00326 00327 00328 00329 00330 00331 00332 00333 00334 00335 00336 00337 00338 00339 00340 00341 00342 00343 00344 00345 00346 00347 00348 00349 00350 00351 00352 00353 00354 00355 00356 00357 00358 00359 00360 00361 00362 call movlw call movlw call movlw call movlw movwf movlw WrComL WrComL WrComL WrComL Graphs SCRATCH .8*.4 write command wait modeset: cursor moves right, shift write command wait disp cursor,blink cursor write command wait addr write address wait start addr graph disp move start address pointer special characters define CHARCOU decremented Char routine, .that here loop counter special characters five rows equal counter rows inner loop: rows equal move SCRATCH rows from table five passes over? loop 6:all dots set,row 7:all dots dots cleared characters defined? loop 00BC 00BD 00BD 00BE 00BF 00BF 00C0 00C1 00C2 00C3 00C4 00C5 00C6 00C7 00C8 0096 3005 0094 23B5 23D9 0B94 28BF 3015 23D6 23D7 0A8F 0B96 28BD movwf CHARCOU GoGraph movlw movwf COUNT FiveRows call PclSub1 call CharNCC decfsz COUNT,F goto FiveRows movlw call call incf decfsz goto CharBl Blank SCRATCH,F CHARCOU,F GoGraph 00C9 00C9 00CA 00CB 00CC 00CC 00CD 00CD 00CE 00CE 00CF 3084 235F 28CD 23DB 227D 3056 2170 ;******* USER INTERFACE This home point mode 1(Analyzer): prints text"Analyzer" command line line w/cursor location variable SUBMODE. Then keyboard routine called, where waits pressed. Break entry point prints message Break line redraws line Mode1 Mode Analyzer movlw Head1-1 start address string call Headline print "Analyzer" goto Farm1 avoid "Break" message Break Break entry Break Mode call PrintBrk print "Break" Farm1 call PrintM1 print string line Farm1B movlw CurTab1 cursor table addr analyze mode call CurPosKb place cursor proper position test keys probe input,service leds return press (C:key1,NC:key2) pressed (C),SUBMODE advanced (range 0.4,then wrapto pressed (NC), program vectors corresponding routine ;*(except SUBMODE=1,then sample rate advanced displayed) btfsc STATUS,C test which pressed goto Key1A jump continue pressed call Range5 advance SUBMODE range goto Farm1B wait next Key1A pressed decfsz SUBMODE,W test SUBMODE (set SUBMODE=1) goto NoRate jump SUBMODE continue SUBMODE=1 00D0 1803 00D1 28D4 00D2 00D3 00D4 00D4 00D5 212A 28CE 0B11 28DF DS00689A-page 2-22 1900 Microchip Technology Inc. AN689 00D6 0A95 00D7 1215 00D8 00D9 00DA 00DB 00DC 00DC 00DD 00DE 00DF 00DF 00E0 00E1 00E2 00E3 00E4 22B7 0A15 2370 28CD 00363 00364 00365 00366 00367 00368 00369 00370 00371 00372 00373 00374 00375 00376 00377 00378 00379 00380 00381 00382 00383 00384 00385 00386 00387 00388 00389 00390 00391 00392 00393 00394 00395 00396 00397 00398 00399 00400 00401 00402 00403 00404 00405 00406 00407 00408 00409 00410 00411 00412 00413 00414 00415 00416 00417 00418 00419 00420 00421 00422 00423 00424 00425 00426 00427 00428 incf call incf call goto EdgeSet movlw xorwf goto NoRate btfsc goto btfsc goto btfsc goto SUBMODE,0 Mode1Go SUBMODE,1 EdgeSet SUBMODE,2 Mode1Show will SUBMODE=3 will SUBMODE=2 will SUBMODE=4 SUBMODE=0, only SUBMODE=3 only SUBMODE=2 only SUBMODE=4 program drops Mode2. FLAG,F Farm1 RATE,F RATE,4 ClrRow1 RATE,W Print255 Farm1 advance sample rate RATE range 0.15 prepare line print sample rate readjust RATE from 0.15 1.16 print serial sample rate 1.16 redraw wait next command Change start cond(L-2-H H-2-L) flag XTOX change flag redraw wait next command 3010 068C 28CD 1811 2A0E 1891 28DC 1911 29D4 PICmicro® 8-Bit Microcontroller 00E5 00E5 00E6 00E7 00E8 00E8 00E9 00EA 00EB 00EC 308C 235F 28ED 0804 3A26 1D03 2AC6 23DB This home mode (RS232 receiver): prints text "Serial" command line line 2,cursor placed depended variable SUBMODE. BrkRS entry point prints message Break line redraws line bytes received, display first bytes byte received Mode2 mode Serial receiver movlw Head2-1 start address string call Headline print "Serial" goto Farm2 avoid "Break" message BrkRS Break entry Break mode movf FSR,W points write next rcvd byte xorlw BUFFER FSR=literal BUFF bytes rcvd btfss STATUS,Z test literal BUFFER goto Show2 -some bytes received,show them call PrintBrk bytes received, print "Break" Prints baud rate KBaud Input variables: RXRATE range Output variables: CHARCOU decremented characters printed Farm2 movlw 0c8h baud rate position call WrComL move cursor command clrf incf movwf movlw btfsc goto movlw incf btfsc goto clrf FLAG,DP BIN4+1 RXRATE,W DJNZ .115 DJNZ,3 Lth256 FLAG,DP BIN4+1,1 .576-.512 DJNZ,F DJNZ,3 Lth256 BIN4+1 decimal point printing RATE=0 BIN4+1 high byte baudrate disp move RXRATE from range DJNZ RXRATE+1 case RXRATE=7:then Baudrate=115 Kbaud test DJNZ=8 (same RXRATE=7) yes, case 115.2 (RXRATE=7) rete there decimal point case RXRATE=6:is byte 57.6 case RXRATE=6:is byte 57.6 DJNZ=RXRATE+2 test DJNZ=8 (same RXRATE=6) yes, case 57.6 (RXRATE=6) 00ED 00ED 30C8 00EE 23CF 00EF 108C 00F0 019F 00F1 0A1D 00F2 008E 00F3 3073 00F4 198E 00F5 2905 00F6 00F7 00F8 00F9 00FA 00FB 148C 149F 3040 0A8E 198E 2905 00FC 019F rates byte zero 1900 Microchip Technology Inc. DS00689A-page 2-23 AN689 00FD 3003 00FE 009E 00429 00430 00431 00432 00433 00434 00435 00436 00437 00438 00439 00440 00441 00442 00443 00444 00445 00446 00447 00448 00449 00450 00451 00452 00453 00454 00455 00456 00457 00458 00459 00460 00461 00462 00463 00464 00465 00466 00467 00468 00469 00470 00471 00472 00473 00474 00475 00476 00477 00478 00479 00480 00481 00482 00483 00484 00485 00486 00487 00488 00489 00490 00491 00492 00493 00494 movlw movwf BIN4 constant rates BIN4 will rotated (mult RXRATE+2 times 19.2 38.4 clear multiplying multiply byte multiply hibyte,that 16-bit rotate test RXRATE+2 times multiplied loop yes, result print 00FF 00FF 0100 0101 0102 0103 0104 0105 0105 0106 X2Loop decfsz goto movf Lth256 call call PrintBR Blank print baud rate,incl. decimal point delete last from previous rate STATUS,C BIN4,F BIN4+1,F DJNZ,F X2Loop BIN4,W 1003 0D9E 0D9F 0B8E 28FF 081E 2372 23D7 0107 30CC 0108 23CF 0109 010A 010B 010C 010D 010E 010F 0110 0111 0112 0113 0114 3020 190D 3069 23D8 3037 1C8D 3038 23D8 3020 180D 3070 23D8 Prints bits received with suffix parity will received (not written RAM!), with prefix inverse input polarity expected. Input variable RXBITS, bit0 parity expected, 8-bit word inverse polarity start bit,inverse data bits high stop bit) movlw 0cch bit# (7/8/7p/8p/i7/i8/i7p/i8p) call WrComL write command movlw btfsc movlw call movlw btfss movlw call movlw btfsc movlw call RXBITS,2 Char RXBITS,1 Char RXBITS,0 Char space: true polarity space RXBITS,2 cleared "i": inverse polarity print blank "7": bits RXBITS,1 "8": bits print (bits) space: parity space RXBITS,0 cleared "p": parity exists print (parity bit) blank 0115 22A5 This call prints number group displayed (execution) symb call KaoAna print rest line same mode (analyzer) Places cursor proper position (input variable SUBMODE) calls keyboard subroutine, where will wait pressed movlw CurTab2 table with cursor positions call CurPosKb place cursor proper test keys probe input,service leds return press (C:key1,NC:key2) key1 pressed (C), SUBMODE advanced (range 0.4, then wrap pressed (NC), program vectors corresponding routine (except SUBMODE=1, then Baud rate advanced displayed) btfsc STATUS,C test which pressed goto Key1B jump set, means pressed pressed call Range5 increment SUBMODE range goto Farm2 redraw row2, wait next command Key1B pressed 0116 305B 0117 2170 0118 1803 0119 291C 011A 212A 011B 28ED 011C DS00689A-page 2-24 1900 Microchip Technology Inc. AN689 011C 1911 011D 2AC1 011E 1C91 011F 2925 0120 1811 0121 2AEA 0122 0123 0124 0125 0125 0126 0A8D 118D 28ED 1C11 2B28 00495 00496 00497 00498 00499 00500 00501 00502 00503 00504 00505 00506 005 Other recent searchesTC74HC161 - TC74HC161 TC74HC161 Datasheet TC74HC161AP - TC74HC161AP TC74HC161AP Datasheet TC74HC161AF - TC74HC161AF TC74HC161AF Datasheet TC74HC163AP - TC74HC163AP TC74HC163AP Datasheet TC74HC163AF - TC74HC163AF TC74HC163AF Datasheet TC74HC161AP - TC74HC161AP TC74HC161AP Datasheet TC74HC163AP - TC74HC163AP TC74HC163AP Datasheet NTE1408 - NTE1408 NTE1408 Datasheet MSC1230 - MSC1230 MSC1230 Datasheet MICRF102 - MICRF102 MICRF102 Datasheet ICS870919I-01 - ICS870919I-01 ICS870919I-01 Datasheet CY7B9331 - CY7B9331 CY7B9331 Datasheet C8051F333 - C8051F333 C8051F333 Datasheet
Privacy Policy | Disclaimer |