use DEC2 and 2 X bytes variable, and probably a last WORD sized one
HSERIN [DEC2 UnitNumber, DEC2 Action, DEC4 Trash]
and then you check UnitNumber to see if it fit your requirement.
use DEC2 and 2 X bytes variable, and probably a last WORD sized one
HSERIN [DEC2 UnitNumber, DEC2 Action, DEC4 Trash]
and then you check UnitNumber to see if it fit your requirement.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Hi Mister_E
I am really quite new to basic and have no clue where to start, i have attached a schematic of what i think the wiring should be (if there is anything wrong please point it out) but apart from that i would not have a clue.
Are there any similar projects or is this more complicated than i think?
Regards,
Jeremy
Start small. For now, forget the RF module. Do some PIC to PC communication first, then PIC to PIC communication. Once you're done, add the RF modules.
There's a lot of Serial communication example here. Same for RF.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
1. Your schematic says RX Module & Receiver but shows the transmitter.
2. Don't forget a 0.1µF bypass capacitor on Vdd.
3. Your question is asked frequently and usually devolves into a long, confused thread. I've put together a very short web page that covers simple wireless communication, including a link to sample PBP code. See...
Hi Dave,
I made some changes to the schematic to include the capacitor, ideally what i am trying to do is have the transmitter send a code when SW1 is pushed and if that code is the same as the code in the receiver then the LED is turned on.
I also had a look at your PIC RX-TX code http://davehouston.org/PIC-RX-TX.TXT
can it be adapted to work on a 16F628A?
Thank you very much for your time,
Jeremy
It should be simple to convert. The example is for an 8-pin PIC so pin designations will differ. I would start by comparing pin designations in the datasheets for the 12F629 and the PIC you want to use. Also, the example assumes an internal 4MHz oscillator. If you use a different oscillator frequency you need to adjust the values used with PulsIn/PulsOut accordingly. See the PBP manual entries for these commands.
You are still showing a 4-pin module as the receiver. The receiver has 8 pins. The datasheet for your receiver indicates its output for Logic HI is 0.7Vdd (3.5V with Vdd=5V). Table 17.4 of the PIC16F628A datasheet indicates that pins with Schmitt Trigger inputs need 0.8*Vdd (4V with Vdd=5V) for Logic HI while pins with TTL inputs only need 2.0V for Logic HI. Tables 5.2 & 5.3 of the PIC16F628A datasheet give the types of input buffers for the pins. I suggest you use a TTL input on Port B.
Also, RA5 is input only so your transmitter circuit isn't going to work as drawn. You need to choose another pin.
Last edited by dhouston; - 27th March 2008 at 16:43.
Bookmarks