【E1710】基于STM32的12位轨对轨DAC MCP4725驱动程序-项目在用的

2021-10-23 18:51:39      索炜达电子      797     

项目编号:E1710

文件大小:282K

源码说明:带中文注释

开发环境:C编译器

简要概述:

此款DAC芯片是SOP6封装的12位的轨对轨片子,正好补偿小容量STM32没有DAC功能的缺陷,IIC接口,外围电路很简单。输出函数直接调用:MCP4725_WriteData_Voltage(u16 Vout) 这个函数。补充一下:最大输出为5V,用到了电平转换。例如:****
头文件/初始化文件忽略
****
int main(void)
{        
         delay_init();            //延时函数初始化         
         MCP4725_Init();   //MCP4725初始化         
         while(1)
        {
   MCP4725_WriteData_Voltage(4095);   //输出最大   一般要求在100-4000之间
        }
}

制作出来的实物图如下:

【E1710】基于STM32的12位轨对轨DAC MCP4725驱动程序-项目在用的

【E1710】基于STM32的12位轨对轨DAC MCP4725驱动程序-项目在用的

目录│文件列表:

 └ MCP4725驱动

    │ keilkilll.bat

    │ README.TXT

    ├ CORE

    │  │ core_cm3.c

    │  │ core_cm3.h

    │  └ startup_stm32f10x_hd.s

    ├ HARDWARE

    │  ├ DAC

    │  │  │ DAC_MCP4725.c

    │  │  └ DAC_MCP4725.h

    │  ├ IIC

    │  │  │ myiic.c

    │  │  └ myiic.h

    │  ├ KEY

    │  │  │ key.c

    │  │  └ key.h

    │  ├ LED

    │  │  │ led.c

    │  │  └ led.h

    │  └ MCP4725

    │     │ MCP4725.c

    │     └ MCP4725.h

    ├ OBJ

    │  └ LED.hex

    ├ STM32F10x_FWLib

    │  ├ inc

    │  │  │ misc.h

    │  │  │ stm32f10x_adc.h

    │  │  │ stm32f10x_bkp.h

    │  │  │ stm32f10x_can.h

    │  │  │ stm32f10x_cec.h

    │  │  │ stm32f10x_crc.h

    │  │  │ stm32f10x_dac.h

    │  │  │ stm32f10x_dbgmcu.h

    │  │  │ stm32f10x_dma.h

    │  │  │ stm32f10x_exti.h

    │  │  │ stm32f10x_flash.h

    │  │  │ stm32f10x_fsmc.h

    │  │  │ stm32f10x_gpio.h

    │  │  │ stm32f10x_i2c.h

    │  │  │ stm32f10x_iwdg.h

    │  │  │ stm32f10x_pwr.h

    │  │  │ stm32f10x_rcc.h

    │  │  │ stm32f10x_rtc.h

    │  │  │ stm32f10x_sdio.h

    │  │  │ stm32f10x_spi.h

    │  │  │ stm32f10x_tim.h

    │  │  │ stm32f10x_usart.h

    │  │  └ stm32f10x_wwdg.h

    │  └ src

    │     │ misc.c

    │     │ stm32f10x_adc.c

    │     │ stm32f10x_bkp.c

    │     │ stm32f10x_can.c

    │     │ stm32f10x_cec.c

    │     │ stm32f10x_crc.c

    │     │ stm32f10x_dac.c

    │     │ stm32f10x_dbgmcu.c

    │     │ stm32f10x_dma.c

    │     │ stm32f10x_exti.c

    │     │ stm32f10x_flash.c

    │     │ stm32f10x_fsmc.c

    │     │ stm32f10x_gpio.c

    │     │ stm32f10x_i2c.c

    │     │ stm32f10x_iwdg.c

    │     │ stm32f10x_pwr.c

    │     │ stm32f10x_rcc.c

    │     │ stm32f10x_rtc.c

    │     │ stm32f10x_sdio.c

    │     │ stm32f10x_spi.c

    │     │ stm32f10x_tim.c

    │     │ stm32f10x_usart.c

    │     └ stm32f10x_wwdg.c

    ├ SYSTEM

    │  ├ delay

    │  │  │ delay.c

    │  │  └ delay.h

    │  ├ sys

    │  │  │ sys.c

    │  │  └ sys.h

    │  └ usart

    │     │ usart.c

    │     └ usart.h

    └ USER

       │ JLinkSettings.ini

       │ LED.uvguix.A

       │ LED.uvguix.Administrator

       │ LED.uvoptx

       │ LED.uvprojx

       │ main.c

       │ stm32f10x.h

       │ stm32f10x_conf.h

       │ stm32f10x_it.c

       │ stm32f10x_it.h

       │ system_stm32f10x.c

       │ system_stm32f10x.h

TAGMCP4725
  • 10 次
  • 1 分