[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-detail-561825-en":59,"doc-seo-561825-105":98,"doc-similar-561825":162},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":5,"data":60},{"doc_id":61,"user_id":62,"nickname":63,"user_avatar":64,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":66,"doc_content":67,"file_id":68,"file_url":69,"file_type":70,"file_size":71,"view_count":44,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":41,"language":72,"language_code":73,"site_id":74,"html_lang":73,"table_of_contents":75,"faqs":76,"seo_title":77,"seo_description":66,"update_tm":78,"read_time":79,"preview_page_count":19,"preview_urls":80},561825,24464137899374,"Blitz","https://us-avatar.wpscdn.com/davatar_3d24733baf745e90a7e4bdd5f77d97b2","AN557 - Four-Channel Digital Voltmeter with Display and Keyboard","AN557 explains how to implement a four-channel digital voltmeter using the PIC16C71, focusing on multiplexed 7-segment LED displays and user input. It details the PIC16C71 hardware capability for driving LEDs via improved I/O characteristics, optionally using ULN2003 drivers or MOSFET sinking. It provides timing and interrupt-driven software design for 50 Hz display updates, keypad scanning with pull-ups and debouncing, and A/D channel sampling with RC smoothing and conversion results displayed in BCD.","AN557  \nFour-Channel Digital Voltmeter with Display and Keyboard  \nAuthor: Stan D’Souza  \nMicrochip Technology Inc.  \nINTRODUCTION  \nThe PIC16C71 is a member of the mid-range family of 8-bit, high-speed microcontrollers, namely, the PIC16CXXX. The salient features of the PIC16C71 are:  \n• Improved and enhanced instruction set  \n• 14-bit instruction word  \n• Interrupt capability  \n• On-chip, four-channel, 8-bit A/D Converter  \nThis application note demonstrates the capability of the PIC16C71 and has been broken down into four subsections:  \n• Multiplexing Four 7-Segment LED Displays  \n• Multiplexing Four 7-Segment LED Displays and Scanning a 4x4 Keypad  \n• Multiplexing Four 7-Segment LED Displays and the A/D Channel 0  \n• Multiplexing Four 7-Segment LED Displays with a 4x4 Keypad and 4 A/D Channels  \nMULTIPLEXING FOUR 7-SEGMENT LED DISPLAYS  \nHardware  \nThe PIC16C71 device’s I/O ports have an improved sink/source specification. Each I/O pin can sink up to 25 mA and source 20 mA. In addition, total PORTB source current is 100 mA and sink current is 150 mA. PORTA is rated for a 50 mA source current and 80 mA sink current. This makes the PIC16C71 ideal for driving 7-segment LEDs. Since the total number of I/O pins is limited to 13, the 8-bit PORTB is used to drive the 4 LEDs, while external sink transistors, or MOSFETs, are used to sink the digit current (Figure 1) . Another alternative is to use ULN2003 open-collector sink current drivers, which are available in 16-pin DIP or very small 16-pin SOIC packages. Each transistor on the ULN2003 can sink a maximum of 500 mA and the base drive can be directly driven from the PORTA pins.  \nFIGURE 1: MULTIPLEXING FOUR 7-SEGMENT LEDS  \n© 2005 Microchip Technology Inc. DS00557D-page 1  \nAN557  \nSoftware  \nThe multiplexing is achieved by turning on each LED fora 5 ms duration every 20 ms. This gives an update rate of 50 Hz, which is quite acceptable to the human eye asa steady display. The 5 ms time base is generated by dividing the 4.096 MHz oscillator clock. The internal prescaler is configured to be a divide by 32 and assigned to Timer0 . TMR0 is preloaded with a value = 96 . TMR0 will increment to FFh and then roll over to 00h after a period = (256 – 96)•(32 • 4/4096000) = 5 ms.  \nWhen TMR0 rolls over, the T0IF flag bit is set, and because bits T0IE and GIE are enabled, an interrupt is generated.  \nThe software implements a simple timer which increments at a 1-second rate. Every second, the 4 nibbles (two 8-bit registers, MsdTime and LsdTime) are incremented in a BCD format. The lower 4 bits of LsdTime correspond to the Least Significant Digit (LSD) on the display. The high 4 bits of LsdTime correspond to the second significant digit of the display and so on. Depending on which display is turned on, the corresponding 4-bit BCD value is extracted from either MsdTime or LsdTime and decoded to a 7-segment display. The TMR0 interrupt is generated at a steady rate of 5 ms and given an instruction time of 1 μs. The entire display update program can reside in the Interrupt Service Routine with no chance of getting an interrupt within an interrupt. The code listing for this section is in Appendix A: “MPLX.ASM”.  \nMULTIPLEXING FOUR 7-SEGMENT LED DISPLAYS AND SCANNING A 4x4 KEYPAD  \nHardware  \nA 4x4 keypad can very easily be interfaced to the PIC16C71 device’s PORTB (Figure 2) . Internal pull-upson pins RB7:RB4 can be enabled/disabled by clearing/ setting bit RBPU (OPTION\u003C7>) . The internal pull-ups have a value of 20k at 5V (typical) . In order to sense a low level at the input, the switch is “connected” to ground through a 2.2 kΩ resistor. A key hit normally lasts anywhere from 50 ms to as long as a person holds the key down. In order not to miss any key hits, the keypad is sampled every 20 ms (just after the update of the MSD) .  \nSoftware  \nTo sample the keypad, the digit sinks are first disabled. PORTB is then configured with RB7:RB4 as inputs and RB3:RB0 as outputs driven high. The pull-ups o","cbCaivrF0R7NqOcU","https://ap.wps.com/l/cbCaivrF0R7NqOcU","pdf",361297,"English","en",105,"# Introduction\n# Multiplexing Four 7-Segment LED Displays\n## Hardware\n## Software\n# Multiplexing Four 7-Segment LED Displays and Scanning a 4x4 Keypad\n## Hardware\n## Software\n# Multiplexing Four 7-Segment LED Displays and the A/D Channel 0\n## Hardware\n## Software","[{\"question\":\"What key hardware features enable driving four 7-segment LED displays on the PIC16C71?\",\"answer\":\"The PIC16C71 provides improved I/O sink/source specifications for each pin and sufficient total current for PORTB, making it suitable for driving 7-segment LEDs. External sink transistors or ULN2003 open-collector drivers can be used to handle digit current.\"},{\"question\":\"How does the software achieve a steady 50 Hz multiplexed display?\",\"answer\":\"Each LED is turned on for 5 ms every 20 ms, yielding a 50 Hz update rate. Timer0 is configured so that an interrupt occurs every 5 ms, and the display update logic runs in the interrupt service routine.\"},{\"question\":\"How are keypad presses and analog measurements integrated into the multiplexing scheme?\",\"answer\":\"Keypad scanning samples the matrix every 20 ms with pull-ups, uses a 40 ms debounce after detecting a hit, and displays the resulting value as a hexadecimal character. For the A/D channel, analog inputs are buffered and smoothed with an RC network, then sampled every 20 ms with a settling delay before A/D conversion and BCD display.\"}]","AN557 - Four-Channel Digital Voltmeter with Display and Keyboard | PDF",1791807018,76,[81,85,89,94],{"page_no":8,"url":82,"width":83,"height":84},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/e0f1424f554b985e8b44dbaa7083c0ce.webp",983,1272,{"page_no":14,"url":86,"width":87,"height":88},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/9192f8b89bf8ab67f55c3fafb2364bc9.webp",982,1271,{"page_no":90,"url":91,"width":92,"height":93},3,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/37a14d2a61a6c69cb1b910107e90f885.webp",981,1270,{"page_no":19,"url":95,"width":96,"height":97},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/a20dd3bda2db1bb4cbf7a09f32cfc475.webp",980,1268,{"code":4,"msg":99,"data":100},"ok",{"site_id":74,"language":73,"slug":101,"title":65,"keywords":102,"description":66,"schema_data":103,"social_meta":156,"head_meta":158,"extra_data":160,"updated_unix":161},"an557-four-channel-digital-voltmeter-with-display-and-keyboard","",{"@graph":104,"@context":155},[105,118,138],{"@type":106,"itemListElement":107},"BreadcrumbList",[108,112,114,116],{"item":109,"name":110,"@type":111,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":113,"name":9,"@type":111,"position":14},"https://docshare.wps.com/document/",{"item":115,"name":30,"@type":111,"position":90},"https://docshare.wps.com/document/technology/",{"item":117,"name":65,"@type":111,"position":19},"https://docshare.wps.com/document/an557-four-channel-digital-voltmeter-with-display-and-keyboard/561825/",{"url":117,"name":65,"@type":119,"image":120,"author":125,"headline":65,"publisher":127,"fileFormat":130,"inLanguage":73,"description":66,"dateModified":131,"datePublished":132,"encodingFormat":130,"isAccessibleForFree":133,"interactionStatistic":134},"DigitalDocument",{"url":121,"@type":122,"width":123,"height":124},"https://docshare.wps.com/thumbnails/an557-four-channel-digital-voltmeter-with-display-and-keyboard/561825.png","ImageObject",300,407,{"name":63,"@type":126},"Person",{"url":109,"name":128,"@type":129},"DocShare","Organization","application/pdf","2026-11-12","2026-10-12",true,{"@type":135,"interactionType":136,"userInteractionCount":44},"InteractionCounter",{"@type":137},"ViewAction",{"@type":139,"mainEntity":140},"FAQPage",[141,147,151],{"name":142,"@type":143,"acceptedAnswer":144},"What key hardware features enable driving four 7-segment LED displays on the PIC16C71?","Question",{"text":145,"@type":146},"The PIC16C71 provides improved I/O sink/source specifications for each pin and sufficient total current for PORTB, making it suitable for driving 7-segment LEDs. External sink transistors or ULN2003 open-collector drivers can be used to handle digit current.","Answer",{"name":148,"@type":143,"acceptedAnswer":149},"How does the software achieve a steady 50 Hz multiplexed display?",{"text":150,"@type":146},"Each LED is turned on for 5 ms every 20 ms, yielding a 50 Hz update rate. Timer0 is configured so that an interrupt occurs every 5 ms, and the display update logic runs in the interrupt service routine.",{"name":152,"@type":143,"acceptedAnswer":153},"How are keypad presses and analog measurements integrated into the multiplexing scheme?",{"text":154,"@type":146},"Keypad scanning samples the matrix every 20 ms with pull-ups, uses a 40 ms debounce after detecting a hit, and displays the resulting value as a hexadecimal character. For the A/D channel, analog inputs are buffered and smoothed with an RC network, then sampled every 20 ms with a settling delay before A/D conversion and BCD display.","https://schema.org",{"og:url":117,"og:type":157,"og:title":65,"og:site_name":128,"og:description":66},"article",{"robots":159,"canonical":117},"index,follow",{"doc_id":61,"site_id":74},1791850804,{"list":163,"token":102},[164,170,177,183,189,196,203,210,217,224],{"doc_id":165,"doc_title":166,"file_type":70,"home_preview_img_url":167,"slug":168,"view_count":39,"category_name":30,"create_tm":169},690044,"Adafruit I2C to 8 Channel Solenoid Driver - Overview","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230002438306/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796178899&Signature=YbttfNRGp1eSbE1wOz09UM8ci38%3D","adafruit-i2c-to-8-channel-solenoid-driver-overview",1794145761,{"doc_id":171,"doc_title":172,"file_type":70,"home_preview_img_url":173,"slug":174,"view_count":175,"category_name":30,"create_tm":176},561643,"AP3700YT - PMPAK® 3x3 - MOSFET Electrical Characteristics","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229947654731/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796178899&Signature=wNPndfJOKpOv3dqWrNwiUwAHxdQ%3D","ap3700yt-pmpak-3x3-mosfet-electrical-characteristics",17,1791806455,{"doc_id":178,"doc_title":179,"file_type":70,"home_preview_img_url":180,"slug":181,"view_count":44,"category_name":30,"create_tm":182},689890,"PCA9685 16-Channel 12-bit PWM Servo Motor Driver I2C Module","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230002212463/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796178899&Signature=H8BgKPVI8l0yIF8GJffyUfzxpw4%3D","pca9685-16-channel-12-bit-pwm-servo-motor-driver-i2c-module",1794133095,{"doc_id":184,"doc_title":185,"file_type":70,"home_preview_img_url":186,"slug":187,"view_count":39,"category_name":30,"create_tm":188},699810,"Designing a BCM - Pre-Charge Circuit - Application Note AN-037","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230011504422/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796178899&Signature=UiEa1teg7uZwVf81%2F8B9S0TTvWE%3D","designing-a-bcm-pre-charge-circuit-application-note-an-037",1794496005,{"doc_id":190,"doc_title":191,"file_type":70,"home_preview_img_url":192,"slug":193,"view_count":194,"category_name":30,"create_tm":195},562790,"UC1842/3/4/5 - CURRENT MODE PWM CONTROLLER - Features and Absolute Maximum Ratings","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229947832144/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796178899&Signature=tFHI%2BxlVD1c5DOuFx0782jyNNms%3D","uc1842345-current-mode-pwm-controller-features-and-absolute-maximum-ratings",18,1791809733,{"doc_id":197,"doc_title":198,"file_type":70,"home_preview_img_url":199,"slug":200,"view_count":201,"category_name":30,"create_tm":202},115355,"Claude AI Bible - The Complete Guide to Mastering Claude, Claude Code, Claude Cowork, MCP, AI Agents, Automation & Advanced Prompting","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229831893665/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796178899&Signature=T59ITq1IojDnpWD%2FbM4Aaf79G4Y%3D","claude-ai-bible-the-complete-guide-to-mastering-claude-claude-code-claude-cowork-mcp-ai-agents-automation-advanced-prompting",939,1785472614,{"doc_id":204,"doc_title":205,"file_type":70,"home_preview_img_url":206,"slug":207,"view_count":208,"category_name":30,"create_tm":209},185,"XNX Universal Transmitter Installation Manual (Complete Guide) [Honeywell Official]","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229693710157/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796178899&Signature=EaeM%2Fn9Slppk6Or3ClYt9ig%2Bqow%3D","xnx-universal-transmitter-installation-manual",861,1776135954,{"doc_id":211,"doc_title":212,"file_type":70,"home_preview_img_url":213,"slug":214,"view_count":215,"category_name":30,"create_tm":216},299143,"THE CANDLESTICK TRADING BIBLE - Trading Guide","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229905832418/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796178899&Signature=PLR3QuoMylPWfjPIdOTb7SUcaR8%3D","the-candlestick-trading-bible-trading-guide",812,1789767270,{"doc_id":218,"doc_title":219,"file_type":70,"home_preview_img_url":220,"slug":221,"view_count":222,"category_name":30,"create_tm":223},176,"Free Fire Proxy Server","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229693709822/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796178899&Signature=EjH%2FXZsoGNNk%2BGIKKWFWNBEA610%3D","free-fire-proxy-server",568,1776135932,{"doc_id":225,"doc_title":226,"file_type":70,"home_preview_img_url":227,"slug":228,"view_count":229,"category_name":30,"create_tm":230},129220,"Operations and Supply Chain Management - Eleventh Edition - Dedicated to students and faculty","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229840674154/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796178899&Signature=WJOROIvWCo5uzNbvpJKB0kIG%2Bv4%3D","operations-and-supply-chain-management-eleventh-edition-dedicated-to-students-and-faculty",500,1786012506]