PIC: 4-bit DAC

2020-02-08 12:18发布

many PICs do not have hardware DAC. It is only when you move to newer and higher end chips, you get DACs.

however, many PICs have a comparator reference voltage generator for its comparators. Those generators typically have a resolution of 4 - 5 bits. Some of them can have their output (CVref) routed to an output pin. viola! you have a 4-bit dac.

here is an example of generating a ramp on 16F886.



(原文件名:16f886 4-bit dac.PNG)

now, this is nothing to write home about but if you are in need of some quick dac, it may work for you.

enjoy.
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
该问题目前已经被作者或者管理员关闭, 无法添加新回复
8条回答
millwood0
1楼-- · 2020-02-08 13:25
sorry, that was hard to read. here it is, again.



(原文件名:16f886 4-bit dac.PNG)
mowin
2楼-- · 2020-02-08 13:51
好奇的是4-bit DAC能用在什么场合?
ITOP
3楼-- · 2020-02-08 18:49
学习了!!
surf_131
4楼-- · 2020-02-09 00:43
 精彩回答 2  元偷偷看……
wangjiati
5楼-- · 2020-02-09 00:44
位数不高..关键的是思路.   就像用PWM 转 DAC.  学习



many PICs have a comparator reference voltage generator for its comparators. Those generators typically have a resolution of 4 - 5 bits. Some of them can have their output (CVref) routed to an output pin. viola! you have a 4-bit dac.


"许多PIC的比较器都有参考电压发生器,这些发生器通常都有4-5位的分辨.这其中的一些型号可以输出到(CVREF)引脚. 这样你就有一个4位的DAC了."
surf_131
6楼-- · 2020-02-09 02:40
回复【5楼】wangjiati 叶子
位数不高..关键的是思路.   就像用pwm 转 dac.  学习
many pics have a comparator reference voltage generator for its comparators. those generators typically have a resolution of 4 - 5 bits. some of them can have their output (cvref) routed to an output pin. viola! you have a 4-bit dac.
"许多pic的比较器都有参考电压发生器,这些发生器通常都有4-5位的分辨.这其中的一些型号可以输出到(cvref)引脚. 这样你就有一个4位的dac了."

-----------------------------------------------------------------------

其实我想说的是,4/5位DAC能够做到的,PWM基本也差不多能做到。可能PWM的频率范围窄一些。但是高速自控也不是一般单片机适合做的。

一周热门 更多>