Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

UPDATED: 12.30.2021

Hi,

I'm attaching a project which includes a pre-component version of a 14-bit VDAC using the dithering method to generate the extra bits of resolution beyond the inherent 8-bits provided by the Cypress VDAC8 component.

In principle it is identical to the Cypress DVDAC (12-bits max resolution) in theory of operation.  It even has the same API calls.

Besides having 2 additional bits of resolution (max 14-bits), it doesn't use the DMA to operate the dithering.  Instead it uses a 100% HW state machine created with UDBs.  Therefore, the dithering is always in-sync to the VDAC clock and is not prone to DMA latencies.  In fact, it uses 0% CPU cycles to keep it running!

Project SW Requirements:

  • PSoC Creator 4.2.

PSoC5LP Requirements:

  • Use project DVDAC14_Demo_PSoC5
  • The project supplied is designed to run on a stock CY8CKIT-059 with NO EXTERNAL components!
  • The project can be modified to run on other PSoC5LP-based designs. (eg CY8CKIT-050, SparkFun boards, etc.)

PSoC3 Requirements:

  • Use project DVDAC14_Demo_PSoC3
  • The project supplied is designed to run on a stock CY8CKIT-030 with the addition on one small capacitor.
  • The project can be modified to run on other PSoC3-based designs. 

he project attached is a Demo code example that allows for user modify the DVDAC14 'component' parameters through the API calls to the included pre-component.

The Demo project uses my Term, MenuCmds and String_Funcs components to simplify the user access to the run-time features. 

I have include the needed component libraries as imported into the project for your convenience.

Here is a link to my component library: Terminal-Support-Component-Library  if you'd prefer to use these components as a shared resource for your other projects.

Why do this?

Because you (more specifically ... I) can.   Cypress demonstrated that this is possible with their DVDAC12.  I extended their idea to a HW-only solution as a learning experience and possibly a teaching tool to help show the value of the PSoCs that have UDBs.  It has been my experience as an engineer that if you can move highly repetitive operations into a HW state-machine, you can achieve significant performance gains.

There might be some of you that ask:  Can the DVDAC be made to support 16-bits?  The short answer is yes.  However, in this style of implementation you would need 32 UDB blocks.  This would deplete your UDB resources.  Additionally, the extra VDAC sensitivity virtually gained would be outweighed by the noise in practically any system.

Next Steps

I have released the DVDAC14 as a pre-component.  It has about 80% of the component structures including the API calls.

I'm looking for user feedback.  This includes implementation bugs if you find some.  If you have some suggestions, I'd welcome the input.

Once I feel the pre-component version is stable I would consider making it into a full-fledged component.

Happy Holidays and Enjoy!

Len
"Engineering is an Art. The Art of Compromise."
1 Solution
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

The original post has been updated to include a DVDAC14 for the PSoC3.

Len
"Engineering is an Art. The Art of Compromise."

View solution in original post

0 Likes
1 Reply
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

The original post has been updated to include a DVDAC14 for the PSoC3.

Len
"Engineering is an Art. The Art of Compromise."
0 Likes