|
本人在使用DAC7621 12bitDAC时,纹波噪声大DA输出在没有滤波电容的时候几乎是方波,加了一颗10uF电容后,纹波为40mV原理图:在图片里
[img]file:///C:\Users\Zhongxy\AppData\Roaming\Tencent\Users\1578550919\QQ\WinTemp\RichOle\MG3UP@IE2[JBJ6AGD%E3R55.png[/img]
程序如下:[img=0,1]file:///C:\Users\Zhongxy\AppData\Roaming\Tencent\Users\1578550919\QQ\WinTemp\RichOle\MG3UP@IE2[JBJ6AGD%E3R55.png[/img]
void dac_set(unsigned int data)
{
unsigned long int xdata;
xdata=(unsigned long int)(428*data)/328;
if(xdata>4095)
xdata=4095;
if(xdata==0)
CLR=0;
else
{
CLR=1;
LOAD=1;
CS=1;
RW=1;
FM3_GPIO->PDOR3=(FM3_GPIO->PDOR3 & 0xF000);
FM3_GPIO->PDOR3=(FM3_GPIO->PDOR3 | xdata);
CS=0;
RW=0;
//LOAD=1;
delay_us(1);
CS=1;
//FM3_GPIO->PDOR3=(FM3_GPIO->PDOR3 & 0xF000);
//FM3_GPIO->PDOR3=(FM3_GPIO->PDOR3 | xdata);
//delay_us(1);
//RW=1;
//LOAD=1;
LOAD=0;
}
}
请大侠们指点一下,是我程序没写对、原理图每涉及正确还是芯片本身纹波就很大?
[img]file:///C:\Users\Zhongxy\AppData\Roaming\Tencent\Users\1578550919\QQ\WinTemp\RichOle\MG3UP@IE2[JBJ6AGD%E3R55.png[/img]
|
|