View previous topic :: View next topic |
Author |
Message |
camie Guest
|
Problem in RF -PIC16f876A |
Posted: Sun Mar 19, 2006 3:45 am |
|
|
Hello..
Please help me
I'm very new in PIC microcontroller.
I just read all the example or problem discuss in this forum..and learn it byu myself..
I try to communicate PIC to PIC by using tws 434 and rws 434.
I used RS232...with 20MHz ..
The problem are:
1) How to set my "baud" rate. //my tx and rx are 433MHz
2)I don't know the real coding..Can someone check my basic coding..Basically when I press button A0 thus lamp A will light on and when I release it light off. Same as when I press button A1, lamp B will on.
Transmitter:
if (input(Pin_A0)==0)
{ put('a');}
if (input(Pin_A1)==0)
{put ('b');}
Receiver:
data=getc();
if (data=='a')
{output_high(Pin_B0);}
if (data=='b')
{output_high(Pin-B1);}
3) How to make it continuos
I hope someone please complete this program...Please |
|
|
Ttelmah Guest
|
|
Posted: Sun Mar 19, 2006 3:52 am |
|
|
The maximum _data rate_ supported by the tws434, is 3kbps. 434MHz, is the 'carrier', not the rate at which data can be sent.
Set your baud rate to 2400bps.
Have a look at the thread about communicating between PICs using wireless RS232. These units are a very basic AM transmitter/receiver, and as such, will need a bit more than simply sending the characters required...
Best Wishes |
|
|
camie Guest
|
Re: Problem in RF -PIC16f876A |
Posted: Sun Mar 19, 2006 4:08 am |
|
|
[quote=
Transmitter:
if (input(Pin_A0)==0)
{ put('a');}
if (input(Pin_A1)==0)
{put ('b');}
Receiver:
data=getc();
if (data=='a')
{output_high(Pin_B0);}
if (data=='b')
{output_high(Pin-B1);}
[/quote]
Thank you for your response .
Can it work when I just set like that..
Which I mean, when Pin_A0==0 thus it will transmits char 'a' then the receiver will choose the char receive. Then proceed to the next process. |
|
|
|