- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I'm developing the product program in parallel with the hardware designer. His programs are demo code that test basic functionality. We are using a VDAC8 to drive an LED. The voltage range is 0 - 4V. The demo program can drive a low with a load of 20K pull-up to +4.84V. With my product program, the lowest the output can go is +2V. Looking at the device configuration, they are identical. I've used PSoC Creator 2.0 and the latest 2.2, SP1, components all updated. His is 2.1.
My code does change states every 250mS but I have just tried setting the DAC to zero at start up to see if it made a difference.
That my code and his code have different device behaviors is a little unsettling in that we could be cruising along with everything working fine, then we go into production and get a batch of devices that work with his code but not mine. Other than setting our 2 computers side by side and checking every configuration and pin assignment, I'm not sure what to do.
Nick
- Labels:
-
PSoC 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What to watch for:
- do you use an output buffer for the VDAC?
- To which drive mode is it set?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
No buffer on the PSoC side, goes directly to a pin configured as Analog.
Range: 0 - 4.080
Speed: Slow
Data Source: CPU
Strobe mode: Register Write
Nick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you using the same version of components?
Try your software with 2.2 NOT 2.2SP1, see if there is any difference. I did notice some changes between 2.2SP1 and 2.2.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To Hli's point -
Both output ranges have 255 equal steps. The VDAC8 is implemented by driving the output of
the current DAC through resistors and obtaining a voltage output. Because no buffer is used, any
DC current drawn from the DAC affects the output level. Therefore, in this mode any load
connected to the output should be capacitive.
The output R of the VDAC -
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nick,
Do you use the same hardware just different code from different creator?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I mean SAME PIECE of hardware. Not same circuitry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You do not need to compare your both settings to each other, just swap the projects on your boards and you can see any differences in behaveour.
I am a little bit confused about your circuitry: you are really driving an LED with the VDAC? I'm not sure what you like to perform with that, but the LED will start at ~1.7V to glow (depending on LED colour) and the drive current the VDAC delivers will not be enough to have any linearity in brightness.
Usually you use a PWM-based driver to controll an LED's brightness, like the PRISM usermodule.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Look at the table Dana provided. The VDAC has an output resistance of 16K (in the 4V range). This forms a voltage divider with the load your are attaching to the output. When using a 20k load, this basically halves the output voltage - which is exactly what you are observing.
So the solution is to add a voltage follower as output buffer. This should reduce the output impedance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We are using the same hardware, swapping the programs. The hardware engineer brought me the board, demonstrated his code, gave me the board, I loaded my code and I get the behavior, so there has to be a reason.
My code is compiled in 2.0, then the latest greatest 2.2 SP1. The hardware engineer is in Creator 2.1.
The HW engineer did find the statement in the data sheet about that the load should be purely capacitive.
It certainly makes sense that I'm making a voltage divider between the 4.84 and ground. Doing the math I see that I would get 2.15V.
Thanks for the help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Adding a voltage follower helps...importance of an opamp does not come from any change in voltage, but from the input and output impedances of the op-amp. The input impedance of the op-amp is very high, meaning that the input of the op-amp does not load down the source and draws only minimal current from it.
also i have recently used it... the noise level difference reduced to arnd 100mv (i was getn a 1v o/p)!!!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
H L,
I passed your comment on to the hardware engineer. I think it's worth a try and should put the problem into one camp or the other. Just finding the time to fit it in is the only issue.
The thing is, the results from my code are as expected per the data sheet. It looks like for some reason, there is no voltage divider in his configuration.
Nick