This topic has 4 replies, 1 voice, and was last updated 8 years, 11 months ago by SuperDroid.

  • Author
    Posts
  • #2783
     SuperDroid
    Keymaster

    Hi, Can you tell me if there are output pins to enable or disable counts on the TE-183-002
    it would be pin 13 on the LS7366r

    #2784
     SuperDroid
    Keymaster

    We don’t have pins broken out to directly access pin 13 — you can only interface with the LS7366r through the SPI bus. You can reset the encoder counts through the SPI bus if that helps.

    #2786
     SuperDroid
    Keymaster

    customer replied:

    My concern is that I need to be able to enable and disable the counters individually using SPI. I was looking through the sample arduino code as well as the PDF on the LS7366R and I cannot figure out how to set the MDR1 bit #2 to 0 through the arduino. I can clear the counters but I cant figure out how to write anything to the reg 1.

    I also like the layout of the Dual Encoder Buffer, it would work out perfectly for my project.
    I see you have only 6 ready to ship, if this project is successful what is your lead time for ~ 20 more boards?

    Any help or links for getting the counter disabled would be much appreciated…

    #2787
     SuperDroid
    Keymaster

    OK, if you look at page 3 of the pdf it describes sending commands to the Instruction Register (IR).

    For an example of this look at the initEncoders() function in the Arduino code. It does SPI.transfer(0x88) which selects register MDR0 for a write command, then writes 0x03 to it to set it 4x quadrature mode.

    So to write to MDR1 it would be similar, but you would need to use 0x90 to select MDR1 for writing, then the next byte sets the MDR1 register value, which for you would be 0x04 (bit 2) to enable and 0x00 to disable. This is my guess from the datasheet and I haven’t tested this myself, so let me know if that works for you.

    #2788
     SuperDroid
    Keymaster

    Customer replied:

    Hey Thanks… You are 100% correct with writing to the MDR1, I got it figured out about an hour ago and everything is working great.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

Login Register

©2024 SDRobots.com | All rights reserved.

Log in with your credentials

or    

Forgot your details?

Create Account