At 4Mhz and at 20Mhz, how do we create a time delay for 200nS or 300nS?
Clever ideas?
At 4Mhz and at 20Mhz, how do we create a time delay for 200nS or 300nS?
Clever ideas?
"If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte
Hi, Sayzer
How are you ???
let's see ...
@ 20 Mhz ... a NOP is ... 1/ 5 Mhz = 200 ns ...
so, just insert, in your PbP program :
@ NOP ... and you get a 200 ns delay ...
You can try to Boost a 16F PIC @ 30 Mhz ... ( I've read about 32 Mhz ...)
With 18F series @ 40 Mhz , you will get 100 ns per NOP ... and it is a PbP DEFINE OSC ...
so, 2 or 3 NOP's will do it !
regards
Alain
PS : No PIC solution @ 4Mhz ( minimum instruction time is 1µs ... )
But you can play with external logic gates ( if possible ...) and use their propagation time : time can easily fall to 10 nS ...
Last edited by Acetronics2; - 10th December 2007 at 14:57.
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Thanks Alain.
I was playing with that calculation but I made it wrong.
Actually, jumping from one line to another is also around 200nS ~ 300nS at 20Mhz.
Just do A = B and get this delay.
But I am unable to use 20Mhz, so I must find another way of getting at least 300nS at 4Mhz.
"If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte
a single instruction @4Mhz is 1uSec, this will be impossible to be faster for this frequency.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Hi, Sayzer
Depends on the Pic you want to use ... but, if an internal oscillator could be used ( 16F88 i.e. ) ...
you could think to change the osc. frequ by soft !!! ( 8Mhz maxi gives 500 ns ...)
but depends if you could "boost" your osc frequ. for some instructions ...
see 16F88 ( i.e.) datasheet $ 4.6.2 for further infos ...
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
or... eh eh, a 18F and enable/disable the internal PLL on the fly...
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Originally Posted by Acetronics from France
I was thinking to charge a 10pF capacitor and wait for its discharge.Originally Posted by mister_e from Canada and speaks French
But before spending hours on its tests, should I keep thinking on this?
Don't we have a cap on our input pins already? that is another issue.
"If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte
Bookmarks