Posts Tagged ‘guide’
This has been an interest of mine for a while and I have researched and developed a few ways to achieve communication over the air. Here goes…
The MRF24J40 is a chip developed by Microchip that allows for 2.4Ghz communication over the air. The IEEE standard protocol for this device is 802.15.4 which means that the device is not licensed to be compatible with wireless communications using other protocols such as 802.11.x. The device has 4 available channels open for use. These channels associate to transceiver frequencies at which the device can communicate. We have the ability to hop onto these 4 channels via the RFCON0 register in increments of .005Ghz. Knowing this, and knowing the WiFi standard, it IS possible to hop onto a WiFi network with this device as both have common channels at 2.405Ghz, 2.410Ghz … although programming the protocol would be redonkulous.
So how do you use this thing?I’m glad you asked.

So there she is, in all her freaking particular complexity. I’ll tackle the easy part first. Programming.
This chip accepts all of its incoming information from the host controller via the SPI protocol. The SPI protocol is a 2 wire communications type that employs a clock and data line for one-way communications. For two-way communications an extra wire is needed. So, you say, “what the heck do you call CS(not)! That is another wire!” CS(not) is a signal used to herald across the SPI bus which chip is the intended receiving party of the SPI information. SPI is a little strange in that it is a broadcast bus that doesn’t natively allow addressing the receiver. What I mean to say is that, when using the SPI bus, you cannot simply send out the address of the chip you wish to speak with, and then speak, but rather you must signal the chip you which to speak with, and then speak. If you want a true 2-wire serial bus, look to I2C by Phillips. Long story short, tie CS(not) low with a 10k resistor so that you are always permitted to chat with the chip.
Looking at the datasheet, there are a good bunch of registers that need to be set in order to start communicating. This is how.

Now that you can write and read the short registers, we can set up the chip to start yapping at 2.4xxGhz. These are a few registers that need attention: RXMCR,TXNCON,SECCON0,INTCON,BBREG0…Run through the list of short registers and make your selections.
Now,I must back up and mention the few particular nature of RF communications. The chip and specific requirements in order to speak over 2.4xxGhz. I’ll just speak on what I am familiar with in the following schematic.

L5 and L4 are the inductive managers of the incoming and outgoing differential analogue signal. As we know, it is not possible to send digital information over the air because there is little to none differential in binary information. To solve this we employ a SINE wave whose differential is constantly changing. Electrons of porous material respond analogously to a consistent differential. So, L4 and L5 saturate current during the negative and positive cycles of communication. These inductor values must be calculatedly small in order to react quickly enough at 2.4xxGhz. I’m still a little confused about the tank circuit used to trap the resonant frequency but L1, C7, C23, and C38 contribute to a resonant tank circuit that supplies communications of 2.3215Ghz. Capacitors such as C45, C39, C10… are decoupling caps that ensure a consistent operating voltage.
Okay! I know all of this is uber confusing, but hopefully this helps as an introduction to the chip. This next order of business is to select a protocol stack. There are a few options: ZigBee, MiWi, or if you live in your mothers basement and enjoy D&D you could write your own communications protocol. Next post I will briefly describe the differences.
The setup detailed in this guide: a wireless router and a PC with a network card and wireless card. This PC (PC One) will connect to the router via wireless. A network cable will then be connected between PC One and the next PC, PC Two. PC Two will get its internet through PC One.
Go to Control Panel > Network and Internet > Network Connections. PC One will have something similar to the screenshot below.
Right click on the wireless adapter. Now select Properties.
Under the Sharing tab, select the option: “Allow other network users to connection through this computer’s Internet connection”.
Now, select the wired network adapter. Right click, go to Properties. Under the default Networking tab, left click Internet Protocol Version 4 (TCP/IPv4). Now click Properties.
Select the button “Use the following IP address:”. Copy the numbers below into your window. Remember, this is PC One’s wired adapter. Click OK once you’re done.
Under PC Two, go to Control Panel > Network and Internet > Network Connections. Select the wired network adapter that you will be using to connect the cable between the two PCs to. Now, select the wired network adapter. Right click, go to Properties. Under the default Networking tab, left click Internet Protocol Version 4 (TCP/IPv4). Now click Properties. Copy these numbers into the window. Note that this is nearly identical to the previous step, except that the IP address for PC Two is 80.1.1.2, instead of 80.1.1.1. Click OK through all the windows, and you should be good to go. Just don’t forget to connect the network cable.





