- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear All,
I would like to get the ADC_SAR output register data connected directly to the output pins of PSoC5LP device. The datasheet indicates that "The CPU or DMA can access these registers to read the ADC result.". Do I have to use DMA to transfer the data to another register? I am trying to make a functional copy of old ADS7832 converter using PSoC5LP.
BR,
Esa
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Some possibilities -
1) Using EOC output of A/D just trigger an ISR and in ISR write the result, byte wide, to
chosen port.
2) Use DMA, to SRAM. and ISR attached to nrq pin of DMA component. Then perform same
as 1) above.
3) Use DMA to SRAM, then use EMIF component. This is a bit of a guess, but possible
hardware only solution, you would have to investigate.
4) Use Verilog solution.
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Or even simpler - just do a DMA directly to to output port. Place a register which functions as your port, and then do a peripheral-to-peripheral DMA. Look at AN52705 for an example (tough it uses tha DAC for that)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Simplest would be 1), no additional HW used.
If control register placed, and A/D > 8 bits, takes 2 control registers.
Or DMA to the address of the port DR register(s).
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Using a control register allows to use non-adjacent pins (or pins from different ports). When writing directly to the DR, all pins must be of the same port.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Of course writing to non adjacent pins one has to use masking
for any other used pins in the ports being written to. But then that
is also true for use of full PORTXDR if ADC width does not match
port width and there are other used pins in port for other purposes.
Regards, Dana.