View previous topic :: View next topic |
Author |
Message |
willd1971
Joined: 24 May 2011 Posts: 5 Location: UK
|
Quadrature encoder with CCP and no software |
Posted: Fri May 27, 2011 7:06 am |
|
|
Has anyone made a quadrature encoder interface using CCP modules?
I have made one in the past, but it depended on priority interrupts for the software to have a look at the 2 signal levels after a level change to work out which direction the encoder clicked and to update the position counter accordingly. As the quadrature signal frequency increases the bandwidth requirements on the processor rise, eventually there is no resource left for anything other than decoding the quadrature interface...
I think it should be possible to create a quadrature decoding interface in a suitable PIC18 device using CCP and ECCP modules and not using software in the process - what do you think? _________________ William
http://www.labtronix.co.uk |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9229 Location: Greensville,Ontario
|
|
Posted: Fri May 27, 2011 7:23 am |
|
|
I have to ask, what else is the PIC going to do ? Really, if you're that tight on code/speed that an encoder routine takes all the PICs time, you have the wrong algorithm for the encoder.Options include using a PIC with QEI or a dedicated chip like the LS7166 type series. I've never used a QEIed PIC but for 20 years used the LS7166 type products in PID true servo controllers running around 20KHz. You could of course take an 8 pin PIC and dedicate it to be an encoder interface. Depending on required 'options' the small PIC might be cheaper than the LS, but consider YOUR time in 'cloning' what you get in the LS series. I'm sure there are other, newer QEI chips out there, but I'm just super happy with the tried and true LS. |
|
|
andrewg
Joined: 17 Aug 2005 Posts: 316 Location: Perth, Western Australia
|
|
|
willd1971
Joined: 24 May 2011 Posts: 5 Location: UK
|
|
Posted: Fri May 27, 2011 7:46 am |
|
|
Wow! Things have moved on - that's exactly perfect! Thanks for your help _________________ William
http://www.labtronix.co.uk |
|
|
|