Thanks Hank, I will chew on these numbers tonight.
Thanks Hank, I will chew on these numbers tonight.
-Bert
The glass is not half full or half empty, Its twice as big as needed for the job!
http://foamcasualty.com/ - Warbird R/C scratch building with foam!
Just one last afterthought - I'm using a PIC16F1828 for which the BAS & INC files haven't been offically released yet....but Darrel kindly pasted up the files for someone else .....
http://www.picbasic.co.uk/forum/showthread.php?t=13977
now I have no clue if that's significant or not, but thought it worth flagging!
Well MAYbe that is why LATC didn't work, but the numbers seem pretty right on. main loop speed free running seems to show there are 7 instructions being executed. heres the math:
8Mhz clock / 4=
2Mips
1/2000000 = .0000005 sec per instruction
.5uSec * 7 = 3.5uSec
1/.0000035 = 285,714.xx Hertz ( close to 284K as posted)
Using PBP instead of ASM, show clearly the Interupt is firing WAY faster then the time it takes to get in and out. If you are game to it, I think we can come to a definate minimun.
With PBP and main loop at 1K, what was ISR frequency?
Last edited by cncmachineguy; - 18th February 2011 at 03:43. Reason: asked wrong question
-Bert
The glass is not half full or half empty, Its twice as big as needed for the job!
http://foamcasualty.com/ - Warbird R/C scratch building with foam!
Ok, here's what we know. Type=ASM, we get the timing we expect. Now if you lower PR until the main loop frequency starts to fall off, we will know the max rate for a clean interrupt. Well actually you can tell by the "choppy" main signal. Is each cycle choppy, every other 1, every 3rd? If the main loop takes 7 instructions, then we would expect it to occur 66/7 times before interruption. Well minus the time the ISR takes. Using PR with TMR2, the clock keeps ticking. So you get a more stable interrupt as the ISR also adds to the count. Unless it is turned off and on.
Thats enough for now, I may be rambling.
-Bert
The glass is not half full or half empty, Its twice as big as needed for the job!
http://foamcasualty.com/ - Warbird R/C scratch building with foam!
Hi Bert, no you're not rambling...this is a good stuff for those of us, that aren't used to getting deep down 'n dirty with instructions/clock timings (that'll be me)....I'll have a tweak with the PR.
That said, I'm travelling to visit relatives in the North of England tonight..so no more updates until I can get back & fire the PIC up (Monday night) - but many thanks for your input thus far.
Have a fun and safe trip Hank![]()
-Bert
The glass is not half full or half empty, Its twice as big as needed for the job!
http://foamcasualty.com/ - Warbird R/C scratch building with foam!
Bookmarks