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

pic16f722 UART

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



Joined: 24 Apr 2011
Posts: 14

View user's profile Send private message

pic16f722 UART
PostPosted: Tue Oct 18, 2011 6:14 am     Reply with quote

Can anyone tell me what is wrong with this code, it compiles but does not do what I want it to do. I want it to transmit YES to my PC screen every second.
Code:

#include<16f722.h>
#use delay (clock=16000000)
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7)

void main()
{   
   while(1)
   {
      delay_ms(1000);
      printf("Yes");
   }
}
Ali_P



Joined: 18 Oct 2011
Posts: 7
Location: Pakistan

View user's profile Send private message ICQ Number

PostPosted: Tue Oct 18, 2011 8:05 am     Reply with quote

Is your hardware setup working properly?
What is it you are getting?
_________________
Ali
bright



Joined: 24 Apr 2011
Posts: 14

View user's profile Send private message

PostPosted: Tue Oct 18, 2011 9:56 am     Reply with quote

Yeap it is working properly, I have tested it using the pic16f690 microcontroller and the Yeses were displayed on my pc screen.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Oct 18, 2011 11:07 am     Reply with quote

Where is your #fuses statement. It's essential.
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