Interfaceing to a Quadrature Encoder
duckie
Posts: 12
Eventually, I would like to possibly use a basic stamp product to control·one or more·servo motor in a CNC application.· It seems to me, a good place to start is getting position data from a quadrature encoder.· The one I have is optical.· Has anyone had any luck trying this?
Thanks
·
Thanks
·
Comments
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out· the "SX-Video Display Module"
www.sxvm.com
·
You could make an interrupt routine that runs at 48KHz (3x oversample), and still have lots of cycles for
communicating with a stamp.
I can whip-up some code if you want to see how.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out· the "SX-Video Display Module"
www.sxvm.com
·
So can I do everything onboard? read the pulses from quadrature, read commands (something simple, like step and dirrection, my cnc program is already set up for htat) do some math.. and output dirrection and PWM all from one SX?
Thanks
Dan
Dan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA
1) Should this discussion be transfered to the SX board?
2) <<blasphamy>> how does the sx28 compare to PIC microcontrollers (be honest) what are the achievements and shortfalls of each. areas of particular interest are a) ease of programming b) startup cost c) continued cost d) capabalities
3) is assembly really all that bad? or is it just something that tends to scare away ppl who are used to high level programming languages. I personally don't have a great deal of programming experience, but firmly believe that anything can be achieved with enough time, modivation, and capital.
2)
a)Both have multiple high level compilers, so it depends on whether you can find a good free PIC complier. Many high level PIC ones are rather expensive, while SX/B is free
b)Depends on whether you purchase a compiler for the PIC, if so than costs are way higher, otherwise, if you program in assembly, you can purchase very low cost compilers (hardware).
c)About the same.
d)SX's are than PIC's since they perform an instruction in 1 cycle. That means at 50Mhz, the SX will perform 50Million instructions a second (ie FAST!). PICs have many instructions requiring 2(+) instructions. Also, SX's can be run at higher speeds at lower voltages. Some PICs however have neat uses such as Micrchip's KeeLoq, USB interfaces, and integrated RF.
3)Assembly isn't that bad. If you take time to learn the commands it pays off. However, don't expect to just learn it in a day. It will take many long hours to really get a firm grip on assembly programming.