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 support@ccsinfo.com

Serial communication rs232 (from pic to pc)

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



Joined: 22 Feb 2013
Posts: 1

View user's profile Send private message

Serial communication rs232 (from pic to pc)
PostPosted: Fri Feb 22, 2013 9:53 am     Reply with quote

Help me plz to receive data from pc in pic16f877a.
This code for transmitted data from pic to lcd and pc (hyper terminal ) thruogh serial port its work.
But i don't know how to receive the feedback from pc in pic and lcd.
plz help
Code:

#use rs232(baud=9600,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8,stream=PC)\\hex file
void main() {
   char k;

   lcd_init();
   kbd_init();
fprintf(PC,"\t Hi");
   lcd_putc("\fENTER U ACUNT...\n");\\display in lcd working
k=0;
   while (TRUE) {
     
        k=kbd_getc();
         if(k!=0)
         if(k=='*')
          lcd_putc('\f');
         else
          lcd_putc(k);
          fprintf(PC,"\t%c",(char)k); \\ its working in hiper terminal 
   }
}
ezflyr



Joined: 25 Oct 2010
Posts: 1019
Location: Tewksbury, MA

View user's profile Send private message

PostPosted: Fri Feb 22, 2013 11:15 am     Reply with quote

Hi,

You've tacked your question onto a totally unrelated thread. Don't do that,
start your own thread. In your new thread, tell us your compiler version
number, and how you have your PIC wired to your PC. A simple schematic
would be ideal. Also, post a complete test program that we can compile. Your
code as posted is not complete.

John

+++++++++++++++++++
Split into new thread per request.

- Forum Moderator
+++++++++++++++++++
Mike Walne



Joined: 19 Feb 2004
Posts: 1785
Location: Boston Spa UK

View user's profile Send private message

PostPosted: Fri Feb 22, 2013 5:42 pm     Reply with quote

I don't understand your question. Please rephrase.

Tell me, in short simple statements:-

1) What works.
2) What does not work.
3) What you want to do.

Mike
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