Therian,
Yes, that is correct. With a 4Mhz X-tal one intruction cylce is 1uS and since the NOP command takes one cycle to execute the delay will be 1uS.
/Henrik Olsson.
Therian,
Yes, that is correct. With a 4Mhz X-tal one intruction cylce is 1uS and since the NOP command takes one cycle to execute the delay will be 1uS.
/Henrik Olsson.
just curious, is 250nS enough to generate radio frequency directly from pic without any rf modules, it sound like cheap radio link
Therian,
Well, let's see:
This, I think, will generate a pulsetrain with 50% duty cycle. The frequency would be ~833kHz. Not much of a radio frequency.... besides that, you can't do anything else in the code without slowing it down more...much more.Code:Start: PortB.1 = 1 'Set pin high @ NOP 'Wait....Two NOP's are neede if we want 50% dutycycle @ NOP 'since the GOTO takes two instruction cylcles. PortB.1 = 0 'Set pin low Goto Start 'Do it again. The GOTO takes the same time as two NOP's
/Henrik Olsson.
wait 833kHz is in range of medium AM broadcast 300-3000kHz and 30-300kHz is longwave AM broadcast but as i know 3-30kHz is enough for submarine communication. so what wrong with using low frequency, huge antenna ?
Last edited by therian; - 5th March 2007 at 13:10.
Therian,
First all, I've stated 250nS in my previos posts. That is of course wrong and should be 200nS. NOT 250.
With that being said you could go to a PIC capable of 40MHz, then a single cycle instruction (like NOP) is executed in 100nS instead of 200.
But then again if you use software to generate the carrier frequency you'd be hard pressed to have any instruction cycles left to be able modulate it. I really believe you should look at a dedicated TX/RX chipset or module.
Anyway sorry for the confusion. One instruction cylcle is 200nS at 20Mhz, nothing else.
/Henrik Olsson.
im really thankful for you reply.
I know about cheap and good modules out there, but dont anyone try to make some from scratch, it easy to fing FM bugs circuits in google but searching for rf module give really few results
Bookmarks