Question about if I can put a small job post up?
krazyideas
Posts: 119
I have The IdxQuadDecoder by Luke Hays from the object exchange that I need a modification to.
I want too learn assembly, and am going to, but I am just too busy right now and need this to polish off a project for my Dad before I take off to school in 3 or 4 weeks
My to do list is too big and my time too short. The best part of that to do list is careing for my thrid little boy that my wife gave birth to on Sunday I love my life
Anyway I just wanted to know if it is alright to put up the program and a detailed explaniation of what changes I want and Ask if it would be worth 50 to 100 bucks to someone to make the changes for me.
Thanks
I want too learn assembly, and am going to, but I am just too busy right now and need this to polish off a project for my Dad before I take off to school in 3 or 4 weeks
My to do list is too big and my time too short. The best part of that to do list is careing for my thrid little boy that my wife gave birth to on Sunday I love my life
Anyway I just wanted to know if it is alright to put up the program and a detailed explaniation of what changes I want and Ask if it would be worth 50 to 100 bucks to someone to make the changes for me.
Thanks
Comments
Yeap, monetary rewards are always a welcome gesture of appreciation & I'm pretty sure there are members ready to help you.
Cheers
Kenichi
Thanks
I need ONE of these OPTIONS incorporated into the assembly program above
{Question What is the max RPM of this program if there are 2880 encoder ticks per rotation?
5000 RPM is the Max I will ever likely spin the encoder.
So 5000 / 60 = 83.3 RPS
83 * 2880 = 239040 Encoder Ticks Per Second (or updates per second)
That is as far as I know how to take the Math}
'What I need
"OPTION 1, OR OPTION 2"
"OPTION 1"
If pin 16 goes high
Then set accumulator to 0.
Then wait for index to trigger
Then Store cnt value in varuable M1
Then wait for index to trigger again
Then Store cnt value in varuable M2
Then Subtract M1 from M2 and store value in M1
Then Divide M1 by encoder ticks per rotation (2880) store Value in M1
Then Wait for index to trigger
Then add 1 to accumulator
Then enter an endless loop (not really needed but mabe make the loop end if pin 16 goes low. Then Wait for index to trigger then enter normal encoder loop)
Endless loop is
waitcnt M1 (waitcnt M1 Must take in overhead (synchronized delay timing) like you do in spin useing "waitcnt (time += 50_000)")
then add 1 to accumlulator
if accumulator == encoder ticks per rotation plus 1 (2880 + 1)
Then accumulator == 1
"OPTION 2" (The better option if it won't slow the program down below 5000 RPM )
Just before TurnedPos Jumps to Updatestates set up somekind of double varuable where you store cnt value in one varuable then
on the next pass through store the cnt value in the other varuble.
How that is best done I don't know. Mabe dependant on if the accumulator value is even or odd, I don't know, needs to be fast though
if you can do the above
Then when PIN 16 goes high set the accumulator to 0
Then Subtract the two varuables to find the number of system clock ticks there are between accumulation updates, store value in a varubale called wait
Then Wait for index to trigger
Then add 1 to accumulator
Then enter an endless loop (not really needed but mabe make the loop end if pin 16 goes low. Then Wait for index to trigger then enter normal encoder loop, Do this only if it is easy)
Endless loop is
waitcnt wait (waitcnt wait Must take in overhead (synchronized delay timing) like you do in spin useing "waitcnt (time += 50_000)")
then add 1 to accumlulator
if accumulator == encoder ticks per rotation plus 1 (2880 + 1)
Then accumulator := 1
"OPTION 3"
Some other idea that I have not thought of that would do the same thing.
When Pin 16 goes High keep acculation rate to the accumulator going at the same rate as when PIN 16 goes high, Makeing sure
to keep the proper referance to the index. (When the index is trggered the accumulators value is 2880 or 0 easyer if it is 2880)
So start counting up from 0 when the index is triggered. Then entering the endless loop as above.
Thanks