[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-720587-105":3,"detail-sidebar-cat-0-en-105":85,"doc-detail-720587-en":134,"doc-similar-720587":166},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":78,"head_meta":80,"extra_data":82,"updated_unix":84},105,"en","mcp4725-12-bit-dac-tutorial-720587","MCP4725 12-Bit DAC Tutorial","","MCP4725 12-bit DAC 教程，说明如何通过 I2C 控制该 12 位数模转换器模块并输出所需模拟电压。内容涵盖模块接线要点（VDD/GND、SDA/SCL、A0 改变 I2C 地址、VOUT 输出范围）、使用 Adafruit MCP4725 库的下载与安装步骤，并给出 begin(addr) 与 setVoltage(value, storeflag) 的用法。文档还介绍通过调整 TWBR 提升传输速度的方法，并提供示例波形（如三角波与查表生成正弦波）。",{"@graph":14,"@context":77},[15,34,56],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/technology/","Technology",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/mcp4725-12-bit-dac-tutorial-720587/720587/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/mcp4725-12-bit-dac-tutorial-720587/720587.png","ImageObject",300,407,{"name":42,"@type":43},"sagouaw","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-29","2026-11-18",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",7,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69,73],{"name":60,"@type":61,"acceptedAnswer":62},"MCP4725 使用哪种接口与如何控制？","Question",{"text":63,"@type":64},"MCP4725 使用 I2C 接口，通过发送目标输出值来控制 VOUT 引脚输出的模拟电压。","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"A0 引脚如何影响 MCP4725 的 I2C 地址？",{"text":68,"@type":64},"默认情况下 A0 悬空时地址为 0x62；若 A0 接到 VDD/VCC，则地址为 0x63，从而可在同一 SDA/SCL 总线上连接两块板卡。",{"name":70,"@type":61,"acceptedAnswer":71},"使用库时 setVoltage 的 value 和 storeflag 分别表示什么？",{"text":72,"@type":64},"value 取值范围为 0 到 0x0FFF，用于设定 DAC 输出；storeflag 用于决定是否把该值写入 EEPROM，以便断电后恢复输出。",{"name":74,"@type":61,"acceptedAnswer":75},"如何提高在 MCP4725 传输中的速度？",{"text":76,"@type":64},"文档指出 Arduino Wire 默认 100KHz，可在 MCP4725 库中通过设置 TWBR（例如 TWBR = 12 对应约 400KHz）提升速度，并可参考 ATmega328 数据手册计算更合适的寄存器值。","https://schema.org",{"og:url":32,"og:type":79,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":81,"canonical":32},"index,follow",{"doc_id":83,"site_id":7},720587,1795038313,{"code":4,"msg":86,"data":87},"success",[88,92,96,100,105,109,113,118,123,126,130],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":89,"show_sort_weight":90,"slug":91},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":93,"show_sort_weight":94,"slug":95},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":97,"show_sort_weight":98,"slug":99},"Exam",70,"exam",{"id":101,"doc_module":4,"doc_module_name":25,"category_name":102,"show_sort_weight":103,"slug":104},5,"Comic",60,"comic",{"id":106,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":107,"slug":108},6,50,"technology",{"id":55,"doc_module":4,"doc_module_name":25,"category_name":110,"show_sort_weight":111,"slug":112},"Healthcare",40,"healthcare",{"id":114,"doc_module":4,"doc_module_name":25,"category_name":115,"show_sort_weight":116,"slug":117},8,"Research & Report",30,"research-report",{"id":119,"doc_module":4,"doc_module_name":25,"category_name":120,"show_sort_weight":121,"slug":122},9,"Religion & Spirituality",20,"religion-spirituality",{"id":121,"doc_module":4,"doc_module_name":25,"category_name":124,"show_sort_weight":121,"slug":125},"World Cup","world-cup",{"id":127,"doc_module":4,"doc_module_name":25,"category_name":128,"show_sort_weight":127,"slug":129},10,"Lifestyle","lifestyle",{"id":131,"doc_module":4,"doc_module_name":25,"category_name":132,"show_sort_weight":101,"slug":133},19,"General","general",{"code":4,"msg":86,"data":135},{"doc_id":83,"user_id":136,"nickname":42,"user_avatar":137,"doc_module":4,"category_id":106,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":138,"file_id":139,"file_url":140,"file_type":141,"file_size":142,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":143,"language":144,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":145,"faqs":146,"seo_title":147,"seo_description":12,"update_tm":84,"read_time":148,"preview_page_count":33,"preview_urls":149},3985747862151,"https://ap-avatar.wpscdn.com/davatar_a8503ba1806abce46bf441b54a3ca4cd","MCP4725 12-Bit DAC Tutorial  \nCreated by lady ada  \nLast updated on 2018-03-05 10:51: 16 PM UTC  \nGuide Contents  \nGuide Contents 2  \nOverview 3  \nWiring 4  \nArd ui no Code 7  \nUsing the library 7  \nIncreasing the speed 8  \nCircuitPython Code 9  \nUsage 10  \nDownload 13  \nFiles 13  \nSchematic & Fabrication Print 13  \n© Adafruit Industries [https://learn.adafruit.com/mcp4725-12-bit-dac-tutorial](https://learn.adafruit.com/mcp4725-12-bit-dac-tutorial) Page 2 of 14  \nOverview  \nYour microcontroller probably has an ADC (analog-> digital converter) but does it have a DAC (digital -> analog converter)??? Now it can! This breakout board features the easy-to-use MCP4725 12-bit DAC. Control it via I2C and send it the value you want it to output, and the VOUT pin will have it. Great for audio / analog projects, such as when you can't use PWM but need a sine wave or adjustable bias point.  \nWe break out the ADDR pin so you can connect two of these DACs on one I2C bus, just tie the ADDR pin of one high to keep it from conflicting. Also included is a 6-pin header, for use in a breadboard. Works with both 3.3V or 5V logic.  \nSome nice extras with this chip: for chips that have 3.4 Mbps Fast Mode I2C (Ard uino's don't) you can update the Vout at ~200 KHz. There's an EEPROM so if you write the output voltage, you can 'store it' so if the device is power cycled it will restore that voltage. The output voltage is rail-to-rail and proportional to the power pin so if you run it from 3.3V, the output range is 0-3.3V. If you run it from 5V the output range is 0-5V.  \nAvailable from the Adafruit shop!  \n© Adafruit Industries [https://learn.adafruit.com/mcp4725-12-bit-dac-tutorial](https://learn.adafruit.com/mcp4725-12-bit-dac-tutorial) Page 3 of 14  \nWiring  \n\n| Wiring up the MCP4725 breakout PCB is super easy. To start, we'll attach the breakout headers so we can plug it into abreadboard.\u003Cbr>Break off a strip of 6-pins of 0.1\" male header and stick the LONG pins down into a breadboard |  |\n| --- | --- |\n| | Break off a strip of 6-pins of 0.1\" male header and stick the LONG pins down into a breadboard |\n| | Place the breakout board on top so the short ends of the header stick up through the pads |\n\n© Adafruit Industries [https://learn.adafruit.com/mcp4725-12-bit-dac-tutorial](https://learn.adafruit.com/mcp4725-12-bit-dac-tutorial) Page 4 of 14  \nSolder each pin using a soldering iron and solder, to make solid connection on each pin.  \nThis part is not optional! You cannot 'press fit' the header on, it must be attached permanently  \nNow that the header is attached, we can wire it up. We'll demonstrate using an Ard uino.  \nFIrst, connect VDD (power) to a 3-5V power supply, and GND to ground.  \nThe DAC uses I2C, a two-pin interface that can have up to 127 unique sensors attached (each must have a different ADDRESS) .  \n© Adafruit Industries [https://learn.adafruit.com/mcp4725-12-bit-dac-tutorial](https://learn.adafruit.com/mcp4725-12-bit-dac-tutorial) Page 5 of 14  \n SDA to I2C Data (on the Uno, this is A4 on the Mega it is 20 and on the Leonardo digital 2)  \n SCL to I2C Clock(on the Uno, this is A5 on the Mega it is 21 and on the Leonardo digital 3) There's two other pins remaining.  \n A0 allow you to change the I2C address. By default (nothing attached to A0) the address is hex 0x62. If A0 is connected to VDD the address is 0x63. This lets you have two DAC boards connected to the same SDA/SCL I2C bus pins.  \n VOUT is the voltage out from the DAC! The voltage will range from 0V (when the DAC value is 0) to VDD (when the DAC 'value' is the max 12-bit number: 0xFFF)  \n© Adafruit Industries [https://learn.adafruit.com/mcp4725-12-bit-dac-tutorial](https://learn.adafruit.com/mcp4725-12-bit-dac-tutorial) Page 6 of 14  \nNext up, download the Adafruit MCP4725 library. This library does all of the interfacing, so you can just \"set and forget\"the DAC output. It also has some examples to get you started  \nThe library is available on GitHub. You can download it by","cbCaijHcUDpM7K30","https://ap.wps.com/l/cbCaijHcUDpM7K30","pdf",987424,14,"English","# Overview\n# Wiring\n## Power and ground connections\n## I2C address and signal pins\n# Download and install the library\n# Using the library\n## begin(addr)\n## setVoltage(value, storeflag)\n# Increasing the speed\n# CircuitPython Code\n# Usage\n## Example waveforms","[{\"question\":\"MCP4725 使用哪种接口与如何控制？\",\"answer\":\"MCP4725 使用 I2C 接口，通过发送目标输出值来控制 VOUT 引脚输出的模拟电压。\"},{\"question\":\"A0 引脚如何影响 MCP4725 的 I2C 地址？\",\"answer\":\"默认情况下 A0 悬空时地址为 0x62；若 A0 接到 VDD/VCC，则地址为 0x63，从而可在同一 SDA/SCL 总线上连接两块板卡。\"},{\"question\":\"使用库时 setVoltage 的 value 和 storeflag 分别表示什么？\",\"answer\":\"value 取值范围为 0 到 0x0FFF，用于设定 DAC 输出；storeflag 用于决定是否把该值写入 EEPROM，以便断电后恢复输出。\"},{\"question\":\"如何提高在 MCP4725 传输中的速度？\",\"answer\":\"文档指出 Arduino Wire 默认 100KHz，可在 MCP4725 库中通过设置 TWBR（例如 TWBR = 12 对应约 400KHz）提升速度，并可参考 ATmega328 数据手册计算更合适的寄存器值。\"}]","MCP4725 12-Bit DAC Tutorial | PDF",35,[150,154,158,162],{"page_no":22,"url":151,"width":152,"height":153},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/b2c33eea3d23fbea8c1d632c3031dfc4.webp",983,1272,{"page_no":26,"url":155,"width":156,"height":157},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/54cd03bda1539647841a111f530ade2a.webp",982,1270,{"page_no":30,"url":159,"width":160,"height":161},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/4b18d857e6fa6c26b282f274574cb960.webp",981,1269,{"page_no":33,"url":163,"width":164,"height":165},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/4a8cbb4afb6f8103cedba096d848ab96.webp",980,1268,{"list":167,"token":11},[168,174,180,187,193,199,206,212,218,224],{"doc_id":169,"doc_title":170,"file_type":141,"home_preview_img_url":171,"slug":172,"view_count":127,"category_name":29,"create_tm":173},700171,"selec - PRODUCT CATALOG - 4 Temperature Controllers - 4 Counters - 4 Process Indicators - 4 Protection Relays - 4 Meters - 4 Timers - 4 PLCs","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230012013965/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111699&Signature=Eg6vEVAraDQiP%2FhinSt4NM1sFaE%3D","selec-product-catalog-4-temperature-controllers-4-counters-4-process-indicators-4-protection-relays-4-meters-4-timers-4-plcs",1794516392,{"doc_id":175,"doc_title":176,"file_type":141,"home_preview_img_url":177,"slug":178,"view_count":114,"category_name":29,"create_tm":179},648970,"SOLIDWORKS Parts and Features Practice - Parts and Features Practice Series","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229972133657/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111699&Signature=Uo2jGhtzdZsEt%2FPsqb1zMA3iEO8%3D","solidworks-parts-and-features-practice-parts-and-features-practice-series",1792796366,{"doc_id":181,"doc_title":182,"file_type":141,"home_preview_img_url":183,"slug":184,"view_count":185,"category_name":29,"create_tm":186},558930,"MEGMEET MLT666T 电源规格书 - SPECIFICATION FOR APPROVAL","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229947440754/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111699&Signature=enpxIzAf%2FrwNEi64ZrEE4HZkcJI%3D","megmeet-mlt666t-power-supply-specification-specification-for-approval",12,1791800049,{"doc_id":188,"doc_title":189,"file_type":141,"home_preview_img_url":190,"slug":191,"view_count":33,"category_name":29,"create_tm":192},689888,"PCA9685 - 16-channel, 12-bit PWM Fm+ I2C-bus LED controller - Product data sheet","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230002212408/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111699&Signature=ohdfL0rMrvvc57z%2FuvZqODE7Amk%3D","pca9685-16-channel-12-bit-pwm-fm-i2c-bus-led-controller-product-data-sheet",1794133090,{"doc_id":194,"doc_title":195,"file_type":141,"home_preview_img_url":196,"slug":197,"view_count":119,"category_name":29,"create_tm":198},562488,"TOP264-271 - TOPSwitch™-JX Family - Integrated Off-Line Switcher with EcoSmart™ Technology for Highly Efficient Power Supplies","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229947681781/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111699&Signature=Bq74BecD%2BSaf87SNAoCHWeULQsM%3D","top264-271-topswitch-jx-family-integrated-off-line-switcher-with-ecosmart-technology-for-highly-efficient-power-supplies",1791808748,{"doc_id":200,"doc_title":201,"file_type":141,"home_preview_img_url":202,"slug":203,"view_count":204,"category_name":29,"create_tm":205},562466,"ME8206 应用指导书 - 版本 V1.0","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229947812342/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111699&Signature=aE5TpoQHbTsskHPXi%2F8Pqg52Qs0%3D","me8206-application-guide-version-v10",18,1791808697,{"doc_id":207,"doc_title":208,"file_type":141,"home_preview_img_url":209,"slug":210,"view_count":30,"category_name":29,"create_tm":211},720440,"DHT11 Temperature and Humidity Sensor - Specification - Connecting Diagram - Sample Code","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230024396067/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111699&Signature=4mJ01JtNctpDUqbZ8xCCfLXy1GY%3D","dht11-temperature-and-humidity-sensor-specification-connecting-diagram-sample-code",1795037377,{"doc_id":213,"doc_title":214,"file_type":141,"home_preview_img_url":215,"slug":216,"view_count":127,"category_name":29,"create_tm":217},671793,"PYTHON - Introduction to the Basics","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229988403949/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111699&Signature=o%2FK1F9iT5t3mNTPqFelgt9C65fE%3D","python-introduction-to-the-basics",1793580647,{"doc_id":219,"doc_title":220,"file_type":141,"home_preview_img_url":221,"slug":222,"view_count":26,"category_name":29,"create_tm":223},720572,"Adafruit 9-DOF Orientation IMU Fusion Breakout-BNO085","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230024400333/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111699&Signature=m%2B6o34NoQJIeCRLM3zoIr6yL0Xo%3D","adafruit-9-dof-orientation-imu-fusion-breakout-bno085",1795038225,{"doc_id":225,"doc_title":226,"file_type":141,"home_preview_img_url":227,"slug":228,"view_count":55,"category_name":29,"create_tm":229},720327,"CC256x Dual-Mode Bluetooth Controller - SWRS121 - July 2012, Revised January 2016","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230023672101/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111699&Signature=%2B%2BcvO41lOnHBkuODdjEaQ%2FwQmME%3D","cc256x-dual-mode-bluetooth-controller-swrs121-july-2012-revised-january-2016",1795036588]