Tagged: L57366r, output pins, TE-183-003
This topic has 4 replies, 1 voice, and was last updated 8 years, 11 months ago by SuperDroid.
- AuthorPosts
- January 12, 2016 at 5:17 pm #2783SuperDroidKeymaster
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 LS7366rJanuary 12, 2016 at 5:18 pm #2784SuperDroidKeymasterWe 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.
January 12, 2016 at 9:12 pm #2786SuperDroidKeymastercustomer 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…
January 12, 2016 at 9:13 pm #2787SuperDroidKeymasterOK, 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.
January 12, 2016 at 9:14 pm #2788SuperDroidKeymasterCustomer 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.
- AuthorPosts
You must be logged in to reply to this topic.