9S08 + digital pot internally?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

9S08 + digital pot internally?

3,468 次查看
irob
Contributor V
Anyone have any digital potentiometer ideas for the 9S08? I've got a very small board with not much room for an external digital pot. Wondered if there's a slick way to vary output impedance on a port pin. Hmmm.
标签 (1)
0 项奖励
回复
3 回复数

1,089 次查看
rocco
Senior Contributor II
Hi, Rob:

Are you talking about the impedance to ground? Will a PWM approach work? Will a regular PWM voltage output not work?

I don't know which chip you are using or what you're interfacing to, but if the standard PWM does not get you what you electrically need (varying impedance), you could try modulating the pin impedance in a very crude fashion.

When a pin is an input, it has a very high impedance. When a pin outputs a zero, it has a very low impedance to ground. If the device won't mind the impedance varying between the two extremes in a modulated fashion, you could bit bang the duty cycle.

By putting a zero in the pin's data register and modulating the pin's direction register, you could effect an 'average' impedance over time. You could solicit the help of a timer to bit-bang it, but it may not be very fast.

If you need to vary the impedance to Vcc, simply change the zero in the pin's data register to a one.
0 项奖励
回复

1,089 次查看
irob
Contributor V
I asked the vendor of the chip I'm interfacing to about PWM and they said it was risky (coupling PWM noise into their circuitry). So I guess I'll stick with a tiny 8-pin Microchip DAC.

Thanks for the feedback.
0 项奖励
回复

1,089 次查看
Truk
Contributor I
why don't you use PWM + a cheap Tiny OpAmp + RC at +INP?
On the same way I made 4-20mA Current Outputs.
Truk
 
0 项奖励
回复