Not sure whats wrong with fastencoder.zip content but all I get displayed on screen is a 0
It just will not show counted pulses. all the hardware works fine incomming pulses on P0,P1 just as before.
Any clues Graham?
I'll have to test it out as I can't see anything obvious, should be able to do that on Monday night, at the moment all I have is a Windows Me machine. Oh for a laptop and a propeller dongle [noparse]:)[/noparse]
I have now corrected it, I just wasn't setting up the pin mask properly and I also spotted another little mistake related to pin selection and corrected it.
I took a look at the link... and as usual... I am more than impressed. I once tried to figure out a way to register barrier strips with images (for pseudo-holographic displays and the problem didn't get solved. I think your work solves it... if you put two printers together... and I think it might be patentable!
But I am submitting to this thread because I am interested in this thread... I think this stuff is fundamentally important and represents a significant contribution by you.
At the same time... with my rather deprived background I have some really simple questions.
What exact encoder are you using?
I seem to remember seeing one offered by Parallax, but I just tried to look at their products again and I don't see it.
The code works with any digital quadrature encoder such as those by usdigital, agilent/avago and many others. The printer I made (which I repeat is not the topic of this thread) actually had an analogue encoder which produces two sine waves out of phase, I uses a dual comparator to convert these signals to normal digital ones.
Thanks for looking at the encoder object.
It all runs perfectly and is very neat.
I would recommend it to all.
So do you do all this only for fun or do you take on commercial jobs as well?
Hold it, if you decode an encoder, isn't that like being a self-contradicting optimist?
or a meat eating vegetarian, or an off switch in the on position?
Not unless you think having an encoder is like vowing to live in an encoded state, if that was the case the best thing to do would be to cut the A and B legs off that way you could be sure to keep the encoded data nice and safe away from those who might actually decode it [noparse]:)[/noparse]
The alternative answer is... not really no the two things are not logically comparable because one describes a fixed state (vegetarian) where as the other describes a process.
I have already implemented the lookup-table algorithm mentioned by Skogsgurra and Chip on a Atmel328 20Mhz (pin change interrupt) in C with nice results. The problem was that there was no time to do something else As soon I have my new Activity Board I wil start testing the same C-function used for the Atmel, but... this algorithm in assembly must be the top. Jeff ???
As I was only concerned with a single encoder, I took a different approach in that I monitored only the two actual inputs of interest, CHA & CHB. No shifting or lookups required.
No doubt this PropBasic code could be made more efficient but I literally threw it together and the generated PASM appears to never exceed 10 instructions and any time (excluding writing to the hub)
I have since decided to offload my encoder-counting/PID/velocity-profiling to a dedicated device.
I try to implement the ATmega328 C-code (see reply 10-21-2013) with SimpleIDE for the Propeler Mini, but get strange results. Two questions:
1. Whats the max cristal for the PropelerMini?
2. Has somebody implement a single encoder in C?
The Max crystal semi-approved by Parallax is 6.25MHz, (read the disclaimer). This will run the Prop at 100MHz with PLLx16. Others have run in excess of 114MHZ, but it takes very careful design considerations.
Comments
It would depend on the application I suspect but you could certainly have a flag or use the counters for a timeout.
Graham
This is beyond cool.
Would you consider offering this is in kit form?
Rich
With regard to the cornstarch... that kinda rules out lenticulars... you'd need a clear plastic.
Topic is quadrature encoders please don't let us "go off on one" but please have a look at my progress if you are interested:
http://www.indoor.flyer.co.uk/3dprint.htm
Attached is a demo program where the data is written to hub ram where it is accessed by the spin demo.
Graham
[noparse][[/noparse]edit, program now tested and working]
Post Edited (Graham Stabler) : 6/11/2007 10:56:25 PM GMT
It just will not show counted pulses. all the hardware works fine incomming pulses on P0,P1 just as before.
Any clues Graham?
Peter.
Graham
My understanding at the moment is a little limited- but working on it.
Peter
I updated the above attachment.
Graham
I took a look at the link... and as usual... I am more than impressed. I once tried to figure out a way to register barrier strips with images (for pseudo-holographic displays and the problem didn't get solved. I think your work solves it... if you put two printers together... and I think it might be patentable!
But I am submitting to this thread because I am interested in this thread... I think this stuff is fundamentally important and represents a significant contribution by you.
At the same time... with my rather deprived background I have some really simple questions.
What exact encoder are you using?
I seem to remember seeing one offered by Parallax, but I just tried to look at their products again and I don't see it.
Thanks,
Rich
Graham
Thanks for looking at the encoder object.
It all runs perfectly and is very neat.
I would recommend it to all.
So do you do all this only for fun or do you take on commercial jobs as well?
Peter.
Graham
Hold it, if you decode an encoder, isn't that like being a self-contradicting optimist?
or a meat eating vegetarian, or an off switch in the on position?
You get the idea....
The 'slightly nefarious' John
The alternative answer is... not really no the two things are not logically comparable because one describes a fixed state (vegetarian) where as the other describes a process.
Graham
No doubt this PropBasic code could be made more efficient but I literally threw it together and the generated PASM appears to never exceed 10 instructions and any time (excluding writing to the hub)
I have since decided to offload my encoder-counting/PID/velocity-profiling to a dedicated device.
1. Whats the max cristal for the PropelerMini?
2. Has somebody implement a single encoder in C?
The Max crystal semi-approved by Parallax is 6.25MHz, (read the disclaimer). This will run the Prop at 100MHz with PLLx16. Others have run in excess of 114MHZ, but it takes very careful design considerations.