LTC2400 SPI interface


Closed Thread
Results 1 to 27 of 27

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    I would give the PBP demo a try if I were you
    http://melabs.com/pbpdemo.htm
    Dave
    Always wear safety glasses while programming.

  2. #2
    Join Date
    May 2010
    Location
    SINGAPORE
    Posts
    14


    Did you find this post helpful? Yes | No

    Talking

    Quote Originally Posted by mackrackit View Post
    I would give the PBP demo a try if I were you
    http://melabs.com/pbpdemo.htm
    thanks for the compiler,but when i bought the pic kit 2 it comes with that compiler.ill try to utilize that.how to handle the timing feature on the adc-LTC2400,do you have any idea?if have then please give me a sample code to get the data from the adc in picbasic.i connected the ltc2400 in 3 wire communication mode.thanks a lot for spending your valuable time with me.
    IF YOU BORN POOR ITS NOT BECAUSE OF YOU BUT IF YOU DIE POOR ITS BECAUSE OF YOU.

  3. #3
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    The ****IN command in PBP will handle the timing for you when the correct MODE is selected.

    The best I can do at the moment because I have not used the ADC you have is to have you look at the sample I linked you to and compare that to the data sheet of your ADC.

    But I have to ask... Why use the external when the 690 has an ADC built in?
    Dave
    Always wear safety glasses while programming.

  4. #4
    Join Date
    May 2010
    Location
    SINGAPORE
    Posts
    14


    Did you find this post helpful? Yes | No

    Thumbs up thanks for your reply

    Quote Originally Posted by mackrackit View Post
    The ****IN command in PBP will handle the timing for you when the correct MODE is selected.

    The best I can do at the moment because I have not used the ADC you have is to have you look at the sample I linked you to and compare that to the data sheet of your ADC.

    But I have to ask... Why use the external when the 690 has an ADC built in?
    i have already tried the internal adc but for now my project is to read (4-20mA)0-5v from a pressure transduser(0-100bar) and then conver it into pressure units .so i need more accuracy and i want to use 24 bit adc.thanks for your support.
    IF YOU BORN POOR ITS NOT BECAUSE OF YOU BUT IF YOU DIE POOR ITS BECAUSE OF YOU.

  5. #5
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,627


    Did you find this post helpful? Yes | No

    Default

    Hi,
    I'm sure you have your reason but can you explain why you need 24bits?

    I mean, 100bar across 24bits gives you a resolution of 0.000006bar. Does a transducer capable of measuring 100bar really resolve to that kind of precision?

    If you already have your 4-20mA converted to 0-5V (and not 1-5V) you'd get ~0.1bar resolution with the built in 10bit ADC. You could do some oversampling to "emulate" a 12bit ADC giving you ~0.025bar resolution.

    Just some ideas.

    /Henrik.

  6. #6
    Join Date
    May 2010
    Location
    SINGAPORE
    Posts
    14


    Did you find this post helpful? Yes | No

    Thumbs up Thanks for your suggestions

    Quote Originally Posted by HenrikOlsson View Post
    Hi,
    I'm sure you have your reason but can you explain why you need 24bits?

    I mean, 100bar across 24bits gives you a resolution of 0.000006bar. Does a transducer capable of measuring 100bar really resolve to that kind of precision?

    If you already have your 4-20mA converted to 0-5V (and not 1-5V) you'd get ~0.1bar resolution with the built in 10bit ADC. You could do some oversampling to "emulate" a 12bit ADC giving you ~0.025bar resolution.

    Just some ideas.

    /Henrik.
    THANKS FOR YOUR SUGGESTION MR.HENRIK

    Actually as you said the 10 bit adc gives a 0.1 resolution on 0~100bar range which is as equal to a "primary master" and thats fine,but i want to use the 24bit adc because i want learn how to communicate a external adc through "spi" to the pic and particularly the 24bit adc is because thats the one i have in my hand to give a try.can you please explain me about the "oversampling to "emulate" a 12bit ADC to give a ~0.025bar resolution"
    THANKS A LOT FOR SPENDING YOUR VALUABLE TIME FOR ME.
    IF YOU BORN POOR ITS NOT BECAUSE OF YOU BUT IF YOU DIE POOR ITS BECAUSE OF YOU.

  7. #7
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,627


    Did you find this post helpful? Yes | No

    Default

    Hi,
    I'd say learning qualifies as a (very) valid reason ;-) By all means try using the 24bit ADC but perhaps you should start with interfacing to something "easier" like a EEPROM to begin with so you learn the basics about how the SPI interface works. I haven't looked at the datasheet for your ADC though, perhaps it's pretty straight forward.

    As for the oversampling, all you really do is take a bunch of readings and then average them. If you take 16 readings with your 10bits ADC, add them all together and divide the result by 4 you'll get a value ranging from 0-4096.

    You can read a bit more about here. Note, you can not use that code with Oshonsoft, the theory behind it obviously applies to any language/compiler though.

    Good luck!
    /Henrik.

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts