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

HELP!! how to get data from RXD of PIC16F877? (RS 232)

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



Joined: 09 Sep 2003
Posts: 52

View user's profile Send private message MSN Messenger

HELP!! how to get data from RXD of PIC16F877? (RS 232)
PostPosted: Fri Oct 31, 2003 2:43 pm     Reply with quote

I try to experiment on the wireless Technology and use the XMIT & RCV channel of the PIC above.

I know that when you printf(" .......",x) is to send the serial data to the TX line or to the PC, but I want to read the data of the RVC line of my wireless receiver module and display the data in portc.

The data from the transmitter was a temperatue sensor attached to ADC (10-bits)channel0 of a PIC16F877. The transmitter get the sensor data and transmit it to the TX line. The TX line was connected to a wireless transmitter module.

What code should I use to get the sensor data?

Any body got an example code in PIC C?

Please help.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Oct 31, 2003 3:36 pm     Reply with quote

Are you asking how to get a byte that has been received by the USART ?

The answer is, use the getc() function. Example:

main()
{
char c;

c = getc();


while(1);
}
Guest








PostPosted: Mon Mar 15, 2004 6:49 pm     Reply with quote

i was going through the search looking for help on cummunicating wireless between to pics,


from the above it lloks like all i need to do is connect the transmitter to c6 the tx pin, and printf(",,,,",x) whatever i need.

then to recieve i just connect the rx to c7 the recieve pin and use a getc command,

is it this easy, i doubt it.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Mar 15, 2004 6:58 pm     Reply with quote

I wouldn't draw a lot of conclusions from my answer to him.

He didn't give all the details necessary for a complete
answer, to I just gave him the most simple answer possible.
treitmey



Joined: 23 Jan 2004
Posts: 1094
Location: Appleton,WI USA

View user's profile Send private message Visit poster's website

PostPosted: Tue Mar 16, 2004 12:37 pm     Reply with quote

remember also that if you don't use a RS232 level converter,..ie max232 then you need to INVERT the signal.
Code:

#use rs232(baud=19200, xmit=PIN_E0, INVERT, stream=debug)
[/code]
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