CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Problem in RF -PIC16f876A

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
camie
Guest







Problem in RF -PIC16f876A
PostPosted: Sun Mar 19, 2006 3:45 am     Reply with quote

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 Confused
Ttelmah
Guest







PostPosted: Sun Mar 19, 2006 3:52 am     Reply with quote

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
PostPosted: Sun Mar 19, 2006 4:08 am     Reply with quote

[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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group