RF abd PIC schematic(good link)

I have seen allot of Posts in SparkFun forum but haven’t found the one that explains how to connect the RF 24G tranciever to the PIC micro. I’m Using 16F877A Micro and i understand that i need a simple voltage shifting for the communication to work.

Could someone please explain the way of connecting the two together(what pins go where and what goes between them)?

It’s a basic PIC setup and the RF tranciever is marked as a simple PIN connection.

please have a look at it and let me know where i am wrong?

i know that there should be some voltage decrease between the PIC and RF , something like simple resistors?

Any help would be much appriciated.

http://geocities.com/fgcity/PIC-RF.jpg

If anyone is wondering the C10 capacitor is actually reversed. I forgot to flip it in a hurry :slight_smile:

Why not run the whole thing off 3.3 V, it would simplify things?

Leon

will 16F877A run on 3.3V Reliably? I know that unoficially(not on the Datasheet) some PIC’s run on 3.3V, but will it do the trick in this case?

Sorry, I’m used to other PICs like the 16F88 that are specified down to 2 V operation.

Leon

In any case is the schematic correct for this setup ? What else should i place between the RF and PIC ? Simple resistors?

You could just use a pair of resistors on each output from the PIC as a potential divider, as the speeds aren’t going to be very high. It might be better to use a proper 5 to 3.3 V level converter, such as the 74LVX244.

Leon

Tnx for all the help guys.

Much appriciated.

I am propably going to use an ICL 3232 level shifter since i have allot of those lying around. What i wanted to ask is that some of the pins on the RF24G are Bidirectional (input and output)

Since DATA pin on RF is I/O and the level shifter has 2 pins for in and 2 for out to TTL

TTL Serial

T in T out

T in T out

R out R in

R out R in

then how do i deal with the data pin?

i mean there is a seperate pin for in and seperate for out on the shifter and only one input and output on the Module.

You connect the 3232 to the PIC, not the radio module.

Leon

What do you mean? I thought that the IC goes between the RF and PIC .

Could you explain why is it done like this and how is it done?

The 3232 is an RS-232 transceiver. It connects between the PIC UART and a PC serial port, for instance.

Leon

ok, then would the XN04312 shifter do the job?

i’ve looked at the 74LVX244 datasheet and i still have the same question.

The RF has 10 pins.

Pin1 - GND

Pin10 - VCC

this pins are not used:

Pin8 - Dout2

Pin9 - DR2

Pin3 - CLK2

The below pins go as follows:

Pin7- DR1 (which is output so so this one goes directly to the pic)

Pin2- CE (which is input so this one needs the voltage shifting)

Pin4 - CS(which is input and needs voltage shifting)

The Pins DATA (pin6) and CLK1(pin5) are I/O pins(bidirectional)

on the 74LVX244 datasheet there are Input pins and output pins(besides VCC and GND :slight_smile: )

so my question is.

If the DATA and CLK1 pins can send and recieve signals and the 74LVX244 has only inpits and outputs (IN on one side and OUT on the other) then how do i connect the DATA and CLK1 pins to the shifter? DATA and CLK1 pins go to any IN pins on the 74LVX244 accordingly and the according OUT pins of 74LVX244 go to the RF?

I forgot about the bidirectional pin. You need the 74LVX245 for bidirectional signals. In fact you can do it all with one of those.

Leon

ok, then as i can see from the Datasheet i just plug from one side(A-pins) all the Pins that go from the RF to the other side of pins(B) that go to the PIC.

And supply this IC with 5v DC.

Now the Pins T/R (Transmit/Recieve inputs) and OE (output enable input) where do this go?

You have to set T/R for the direction you want (reading from the radio or writing toit) with software, using an output from the PIC.

I think that OE can be tied to enable the outputs.

It really would be a lot easier to just use a 3.3 V MCU!

Leon

The thing is that i have allot of SMD 16F877A Pic’s and not too many of any others that are SMD’s.

I also have PIC 16F777 SMD pic.

this one needs 2v to operate. Would this one work with the RF24G tranciever without any use of voltage shifting?

It should be OK at 3.3 V.

Leon

So basicly if i use the PIC 16F777 then i connect the module as described on the schematic image without any other ic’s or components and it should work fine. Am i correct?