Hello to everyone,
I am looking for an example code ( language C ) for the ADS 1146.
Thank you,
Uwe
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello to everyone,
I am looking for an example code ( language C ) for the ADS 1146.
Thank you,
Uwe
Uwe,
I've attached the source code for the ADS1146EVM. This code is used with the MSP430F449, and uses freeRTOS, so the code is a little hard to follow. You will mostly be interested in the ADC.c file.
Best regards,
Bob B
Bob,
we are able to read out the ADS1146 but we have still the problem that we are not able to send any command to the ADS1146.
Do you have any idea?
Here our handling:
1st STARDAD =1 and RESET =0
2nd Wait 20ms
3rd STARDAD=1 and Reset = 1
4th Wait auf first DRDY
5th CS=0
6th Send command 0x17 (SDATC)
7th CS= 1
8th Wait 20ms
9th CS=0
10th Send command 0x42
11th Send 0x01
12th Send 0x00
13th Send 0x08
14th CS = 1
15th Wait 20us
16th CS = 0
17th Send command 0x22
18th Send 0x01
19th Send 0xff (Read from ADS)
20th Send 0xff (Read from ADS)
21st CS = 1
22nd Wait 20us
23rd CS = 0
24th Send commad 0x14 (RDATAC)
25th CS = 1
SPICLK = 1MHz
Something wrong?
UWE
Uwe,
When you send the SDATAC command, it does not take effect until the next DRDY. I believe the problem you are having is that the conversion data is being placed in the output register at the same time you are trying to write registers, and this may be causing a conflict. Make sure you wait for the next DRDY after the SDATAC command before you actually write the register data.
Best regards,
Bob B
Hello Bob,
I have also wait 300ms after sending SDATAC without any success.
On the oscilloscope you can see the right wave form for the command WREG and RREG but there is no reaction or answer from the ADS1146.
I am still not able to write any command to the ADS1146, because the DRDY is still every 200ms.
Do you have any idea or comment to get the ADS1146 running, or do you have a proposal for another type of A/D-converter which is easier to get working.
By the way, after the bad experience with the ADS1146 I have tried to make the start up for the D/A-converter (Its coming from Maxim) and its running at once without any problem, therefore I am sure the signals MOSI and MISO are correct.
Desperate greetings
Uwe
Uwe,
It appears that the SDATAC command is not working, and this may be a result of the timing. Try reading back the data completely first, then send the SDATAC command. It would be helpful if you would send me some screen shots of the actual commands you are sending so that I can verify the timing of that as well.
Best regards,
Bob B
Hello Bob,
today I have done some more measuring and found no problem in our software.
Therefore I have replaced the ADS1146 and now everything is working.
Thank you for your assistance and merry Christmas.
Uwe