- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi to everyone,
I need to send decimal numbers via SPI master, but SPIM_WriteTxData(), can send only hex numbers.
How to send decimals? how can I convert them to hex and then put in SPIM_WriteTxData() function?
regards,
Hakob
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The SPIU writes _binary_ data. It does not care about hex vs. decimal, this is something you need to handle in your program.
Maybe you can explain a little bit more about what you actually want to do?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a function which gives, five outputs (int8 decimal) and I need to send them via SPI master to external DAC to get output volts.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you evolve whether your function values are ASCII characters (which I doubt) or just the values ? When you provide us with a link to your DAC we can probably help you better.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Bob,
I will check for it for ASCII.
Do I need to save the files of my function as a ASCII?
Here is details of my DAC
http://www.analog.com/media/en/technical-documentation/data-sheets/AD5308_5318_5328.pdf
regards,
Hakob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is c89/c90(ANSI)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Your datasheet shows that you will have to transmit 16 bit binary words to your DAC, no decimal, no ASCII. Look at the serial interface description of the DAC which shows exactly what is expected.
You will have to do some bit-merging in C-language to construct the values to transmit.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Bob,
it is my DAC, it doesn't respond as it must, I have to change.
I had given hex numbers corresponding to its binary command and followed SPIM output signals via oscilloscope. Clocking signals and data signals were expected as binary command. Anyway it doesn't respond for some DACs and 256 resolution.
Can you suggest some known DAC which vould work corectly ?
regards,
Hakob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry Hakob,
I am a digital man. Someone else will have to support you with analog information. What are the specs that have to be fulfilled for your DAC?
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I need to generate some biological potentials.
regards,
Hakob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
With "Specs" I mean Electrical specifications as
Supply voltage, accuracy, precision speed etc.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I need to generate approximately 100 step voltage graph by random value (between 0-2 volt).
regards,
Hakob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This would mean that an 8-bit DAC would be sufficient, no external part needed except when needed an amplifier. So what is the reason you do not use an internal DAC
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have 4-5 outputs, in PSOC 5LP only 2 DACs.
regards,
Hakob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Hakop
maybe you can use the DACs followed by analog multiplexer ?
All the Best
Frank
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Franksanderdo
I need 5 different outputs as random voltage sources. Can I use one VDAC and one multiplexer and do what I want ?
regards,
Hakob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Hakop,
sorry for late answer.
You can feed from one VDAC into a multiplexer and then into a sample and hold circuit.
PSOC 5LP has sample and hold component, but (unfortunately) not enough resources to do 5,
Last time I have used a capacitor / opamp combination combination to sample & hold the output.
All the Best
Frank
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Franksanderdo,
I have solved the problem by changing cy8c5468axi-lp106 (has 2 VDAC) to cy8c5868axi-lp 032 (has 4 VDAC).
Regards ,
Hakob