PDA

View Full Version : Generating RF from a PIC



Rob Martin
- 25th January 2006, 20:02
I seem to remember reading a message somewhere on the forum about generating RF using a pic chip but I can't track it down.

I'm guessing it is possible to generate an RF signal from a pic then amplify it using an external.
I only want to generate frequencys between 3 to 4MHz.

I'm also guessing that with a high speed clock it would be possible to do other things whilst generating the RF.


Rob

Ioannis
- 25th January 2006, 20:11
If you use a 40MHz device (10Mhz Xtal with PLL x 4) then your instruction cycle is 100ns. So:

In assembly:

bsf portb.1 ;set port B, bit 1 high
bcf portb.1 ;set port B, bit 1 low

This consumes 200ns which is 5Mhz.

But as you can see there is no time to do anything else...!

So leave the RF generation to some other chips (like PLL) and control these chips with your PIC.

Ioannis

Qacer
- 25th January 2006, 20:17
I'm not that verse with the PIC, yet. But just by looking at the manuals, can't you just use the clock signal from a PIC with an oscillator running at 4MHz? I'm assuming you are using the 3-4MHz RF signal as your carrier frequency.

Ioannis
- 25th January 2006, 20:52
I am not sure of what you are trying to do. But as far as it concerns the oscillator of the PIC, yes, you can use a buffer and take a copy of the OSC signal. But remember, this is a rectangular signal (TTL logic) and not sinus. If you want a pure RF signal you have to filter it very hard after the buffer.

Ioannis

Qacer
- 25th January 2006, 22:40
Hi Ioannis,

A low pass filter should be able to filter out the sharp edges and make the square look closer to a sine wave. For frequency modulation, a square wave should be suitable since its amplitude is not a main factor in the demodulation of the transmitted signal.

mister_e
- 26th January 2006, 04:01
There's some RFPIC who do the job for you. See Microchip website for that.
http://www.microchip.com/ParamChartSearch/chart.aspx?branchID=401&mid=10&lang=en&pageId=74

Ioannis
- 26th January 2006, 07:34
For frequency modulation, a square wave should be suitable since its amplitude is not a main factor in the demodulation of the transmitted signal.

What exaclty are you trying to do?

Ioannis

Qacer
- 26th January 2006, 16:17
Hi Ioannis,

I was just saying that if he were to transmit and audio signal, then he can use the 3-4 MHz clock signal from the PIC for frequency modulation. He can mix the audio signal and the clock frequency with a mixer and transmit the frequency modulated signal.

mister_e
- 26th January 2006, 16:48
i'll certainely prefer to use dedicated RF modules for that.

See
http://www.linxtechnologies.com/
www.laipac.com

Ioannis
- 26th January 2006, 19:36
Agree with Steve. Might seems easy to do, but I'd prefer to use ready made solutions. I am too old for such adventures...! I did that when I was 15 (PLL for RF from scratch with TTL counters, Receivers with discrete components in the VHF region) but then time was all mine!

Ioannis

Qacer
- 26th January 2006, 20:26
I guess I have a lot of catching up to do. ;)