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

puts printf rs232 with PICF16F917

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



Joined: 13 Aug 2010
Posts: 26
Location: RJ/Brazil

View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger

puts printf rs232 with PICF16F917
PostPosted: Mon Apr 10, 2017 7:28 am     Reply with quote

hi,
I try to use rs232 with the PIC16F917 but the program freezes when i use the routine PUTS or PRINTF.
Somebody help me ?
I try variations but nothing works.
Code:

#use delay(clock=20000000)//,RESTART_WDT)
#use rs232(baud=115200, xmit=pin_c6, rcv=pin_c7)
//#use rs232(baud=115200, BRGH1OK, xmit=pin_c6, rcv=pin_c7, PARITY=N, BITS=8)
//#use rs232(baud=115200, BRGH1OK, xmit=pin_c6, rcv=pin_c7, PARITY=N, BITS=8, TXISR)
//#use rs232(BAUD=115200, BRGH1OK, MAX_ERROR=9, UART1, XMIT=PIN_c6, RCV=PIN_c7, PARITY=N, BITS=8, STOP=1, TXISR, STREAM=uart1, ERRORS)
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Apr 10, 2017 8:19 am     Reply with quote

Post a complete test program with the #include for the PIC, any #device
statements, #fuses, #use delay(), #use rs232(), main(), and some short
code that shows the problem. Example of a test program:
http://www.ccsinfo.com/forum/viewtopic.php?t=55769&start=9

Also post your compiler version. It's given at the top of the .LST file
after a successful compilation. It's a number such as 5.071 or 4.141, etc.

Also, tell us how you are doing the testing ? What external circuits do
you have connected to pins C6 and C7 ? What program or method are
you using to see the characters sent by printf() ?
sergioigel



Joined: 13 Aug 2010
Posts: 26
Location: RJ/Brazil

View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger

PostPosted: Mon Apr 10, 2017 9:50 am     Reply with quote

I use multiple files to divide the source. When i put the files together to post here, i try to compile and then it works now. I will see what is the problem in other locations in my project.
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