LTC2400 SPI interface


Closed Thread
Results 1 to 27 of 27

Hybrid View

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

    Unhappy LTC2400 SPI interface

    Hai friends,

    am new to this world of processors,but started playing with the PIC 16f690.
    for now am trying to communicate with LTC2400-24 bit ADC to the pic through the spi interface but i dont know where to start from.
    please help me friends and thanks for reading the post.

    PUGAL

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


    Did you find this post helpful? Yes | No

    Default

    I have not used that part but a quick look at the data sheet says you should be able to use the SHIFTIN command in Pic Basic Pro.

    You posted in PIC BASIC. Is that what you are using or are you using the Pro version?

    The 690 also has a built in ADC.
    Dave
    Always wear safety glasses while programming.

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


    Did you find this post helpful? Yes | No

    Red face thanks for your reply

    Quote Originally Posted by mackrackit View Post
    I have not used that part but a quick look at the data sheet says you should be able to use the SHIFTIN command in Pic Basic Pro.

    You posted in PIC BASIC. Is that what you are using or are you using the Pro version?

    The 690 also has a built in ADC.
    am using BASIC and oshonsoft compiler.
    i tried using the internal adc and its worked but i want to communicate with external adc using spi interface.please help me my friend.

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


    Did you find this post helpful? Yes | No

    Default

    This is an example for EEPROMS
    http://melabs.com/resources/samples/x1/pbp/spix.htm
    You should be able to modify it for the ADC
    Dave
    Always wear safety glasses while programming.

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


    Did you find this post helpful? Yes | No

    Question thanks for your reply

    why the command set changes even all the codes are in basic language.In the article they are using shiftin and shift out but my compiler uses shiftright and shiftleft,why such a difference is needed.why am asking this is because they are using "sck" and i dont know what for they are using.as i mentioned above am new to this world(MPU), so i dont think you will laugh at me.
    IF YOU BORN POOR ITS NOT BECAUSE OF YOU BUT IF YOU DIE POOR ITS BECAUSE OF YOU.

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


    Did you find this post helpful? Yes | No

    Default

    Most of us here use this to compile
    http://store.melabs.com/prod/pbp.html
    I am not familiar with oshonsoft compiler. I did not notice that you were using that earlier.

    Basically you will have three pins on something like this.

    DATA
    CLOCK (SCK)
    LATCH or Chip Select
    Dave
    Always wear safety glasses while programming.

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


    Did you find this post helpful? Yes | No

    Default

    Because you are using the Oshonsoft compiler and "we" at this forum are using the MELABS PicBasicPro compiler (or PicBasicCompiler) - not the Oshonsoft BASIC compiler.

    You need to "translate" the any examples not written for your compiler so the instructions matches your compilers instruction set. BASIC is not known for being the most standardised programming language. Most i spretty similar in the basic command set like GOTO, GOSUB, FOR-NEXT, WHILE_WEND etc but when it comes to all the "special commands" like SPI, PWM, LCD, etc etc each compiler has it's own way of handling it. There simply is no standard for those type of commands.

    A quick look at the Oshonsoft site seems to indicate that what you are looking for is the [url=http://www.oshonsoft.com/picbasiccompilerreferencemanual.html#677] SPI Communication commands. Not ShiftLeft and ShiftRight - they are for shifting bits around in memory, not for shifting them in or out a pin.

    Don't worry about beeing new to this, we've all been there at one time or another. However, you may get better help with your project by posting on the forum dedicated for the compiler you are using. Good luck!

    /Henrik.

Members who have read this thread : 1

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