ADC Direct Digital Output - Route to UDB/Logic

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

cross mob
Anonymous
Not applicable

Hello All,

Is there a way to get the output of the ADC data-bus and route it to the UDBs/programmable logic? The PSoC 4200 does not have DMA, so I was hoping to get the output value via a digital bus and process it with the UDBs and/or programmable logic.

Thanks,

Diode Dan

0 Likes
1 Solution
ToddD_41
Employee
Employee
First like received

Yes this is possible, but it is not a "supported" feature. What I mean is you are own your own when using it, there is no official Cypress support for it. That being said I don't suspect there will be any issues.

Here is what you need to do.

1. In the project, click on the components tab (this is the vertical tab list in the workspace explorer)

2. Right click on your project and select Import Component...

3. On the upper drop down select CyComponentLibrary

4. In the drop down below that select ADC_SAR_SEQ_P4_v2_50

5. Click OK.

6. DO NOT rename the component. If you do then the component won't build and there will be all kinds of issues. If you want to rename then a bunch of files need to be changed. It is possible to rename just really annoying

7. Open ADC_SAR_SEQ_P4_v2_50.cysch, and open page 1 tab

8. On the right hand side of the cy_psoc4_sar primitive you will see a data[11:0] and data_valid outputs.

9. Connect digital output terminals to these terminals. The digital output terminal can be found on the left side of the schematic, They are green arrows with "D" above them. Give them whatever name you'd like. Double click the output connected to data[11:0] and select the "Bits Range" radio button. set the left index to 11 and the right index to 0. 

10. Open ADC_SAR_SEQ_P4_v2_50.cysm add Digital Output Terminals with the same names as the digital outputs terminals you used in the .cysch. Again make sure the bit widths are set correctly.

11. Save your project. Now the ADC on your project schematic should have the digital outputs available.

12. Now on your project schematic you can route those digital outputs to digital logic.

View solution in original post

4 Replies
ToddD_41
Employee
Employee
First like received

Yes this is possible, but it is not a "supported" feature. What I mean is you are own your own when using it, there is no official Cypress support for it. That being said I don't suspect there will be any issues.

Here is what you need to do.

1. In the project, click on the components tab (this is the vertical tab list in the workspace explorer)

2. Right click on your project and select Import Component...

3. On the upper drop down select CyComponentLibrary

4. In the drop down below that select ADC_SAR_SEQ_P4_v2_50

5. Click OK.

6. DO NOT rename the component. If you do then the component won't build and there will be all kinds of issues. If you want to rename then a bunch of files need to be changed. It is possible to rename just really annoying

7. Open ADC_SAR_SEQ_P4_v2_50.cysch, and open page 1 tab

8. On the right hand side of the cy_psoc4_sar primitive you will see a data[11:0] and data_valid outputs.

9. Connect digital output terminals to these terminals. The digital output terminal can be found on the left side of the schematic, They are green arrows with "D" above them. Give them whatever name you'd like. Double click the output connected to data[11:0] and select the "Bits Range" radio button. set the left index to 11 and the right index to 0. 

10. Open ADC_SAR_SEQ_P4_v2_50.cysm add Digital Output Terminals with the same names as the digital outputs terminals you used in the .cysch. Again make sure the bit widths are set correctly.

11. Save your project. Now the ADC on your project schematic should have the digital outputs available.

12. Now on your project schematic you can route those digital outputs to digital logic.

Anonymous
Not applicable

Great answer! Can I use EOC or another signal to clock the digital output of the ADC? In other words, how do I know I have fresh data for the UDB?

0 Likes

In PSoC5 the 'eos' comes right after ADC conversion is completed, while eoc may appear over then a microsecond later. So bus data should be sampled on eos.

Not sure what can be accomplished on PSoC4 with digital output bus, it practically has no UDB.

odissey1

0 Likes
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

DiodeDan,

way back I modified SAR_ADC with parallel ouput for PSoC5

http://www.cypress.com/comment/377701

I am not sure if ADC_SAR on PSoC4 has same internals, if so use it as reference

/odissey1

ADC_SAR_LPF_2x_01.png