That is truly AWESOME Walter!!!
Nice to see sensors used for something other than multirotors :)
Type: Posts; User: cncmachineguy; Keyword(s):
That is truly AWESOME Walter!!!
Nice to see sensors used for something other than multirotors :)
Hank do the numbers below 900 seem to make sense? We should be able to predict the TMR output based on some simple math. You are running 4MIPS (16Mhz OSC). so that would be .25uS per instruction. If...
Here I go out on a limb that has been broken already, change the type to ASM instead of PBP. The only thig I see in your ISR using PBP is HSEROUT and TMR=0 since you removed the hser, now its only...
Hank,, how bout toggling a pin in your ISR to show when the PIC thinks it should start and stop counting.
EDIT : OK I see youo have done that already DOH!!
The numbers should be linear IMHO. so...
Good stuff Jeff, Thanks for clearing this up!!
Are my eyes lying to me or are they the same-ish as for 1K? One must ask them selves How can this be?
BTW Nice to be back and looking at hanks fun stuff :)
Hi Hank, just stabbing at this, you second set of numbers is not really all over, every other one is close to the last. I am guessing here maybe timer is overflowing with the lower freq?
Actually I didn't find that cuz generally I skip over any result that doesn't look like an actual datasheet will be there. But upon following your link and reading several threads, I have come to...
Well surely if Arduino can do it so can PBP. the best place to start getting help will be to provide us with more info then just the name. I googled it, but admit to not looking past the first page...
Hi Ramius, Can you provide links to the equipment you are using? At least for the FPV stuff and the BOB-4? It will be intresting to see what kind of data it requires to add to the sub's operational...
It may be working just perfect. In your loop the first thing you do is toggle the led. Then you pause for half a second. Then you set the output low and instantly go back to the top of the loop,...
Before each motor on command (motorx=1) add
if run = 0 then goto main
That way, If run gets set to 0 while in the run=1 loop, it can get out before turning any motors on
Assembler is still a higher level, albiet not very high. Hex is the only actual language the PIC understands. I had to code in hex WAAYYY back in collage for 8085's. Man it was crap! basically write...
I dont know about the "purist" part, and IMHO anything needing better then 5uS accuracy is not well suited for interrupts.
Now I understand your numbers, 300 is really 300 iterations of the loop....
Sorry to be dense but here goes -
so for a 1000 uS pulse you get as a result-
1224 for pulsin
1300 for your routine
1100 for just 1 bit sampled?
You can see I don't think I have this right....
Also can you expand on the first was "slow"? Do you mean it was to slow to react to the pulses? were they accurate but offset? How much percision and resolution do you need?
Can we get just a little more info about the pulses? for instance are you trying for a Logic storage type thing or reading R/C Rx pulses. Both need to have 8 bits read, but the Logic storage needs to...
Then I will have to agree with you. :) Now you could do it in reverse, on EVERY ZC, call ISR, Check for switch pressed or released, if it is, turn on thingy, of not leave.
Or use the ZC as the...
I don't remember off hand what the answer is, but DT_INT ASM type takes only a few cycles (I think) to get in. Or get in there the actual ASM way. But, no problem waiting around either. If you have...
Sorry, but thats not really the way we do things here. You have to put in a little effort too! If you try to do it, we will help and attempt to teach you how to do this. Very likely you will end up...
Hi Hank, I have to agree with Jerson here, his code suggestion is IMHO a better solution. hanging out in the ISR for .33uS seems a little wastful of the clock cycles available. And if the 1.5K is...
Hank that looks like good logic to me, but to make sure I get where you are heading -
on switch press, call ISR,
Inside ISR, wait for the signal to cross zero (in either direction, max time here...
I think you may need some logic in there to check for button release. As it looks now, it will run the fb = fb - 1 VERY fast, and every time through the loop when you press the button. Chances are...
charles I read them :) with great intrest!!
Max value for raw is 1024? assuming 10 bit a/d. 1024/10=102. this is ALWAYS less the 205. So you will never be able to turn on the LED. If its a 12 bit A/D, then IDK