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?
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?
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.
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
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.
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 ?
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?
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
I need 5 different outputs as random voltage sources. Can I use one VDAC and one multiplexer and do what I want ?
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