|
|
View previous topic :: View next topic |
Author |
Message |
sergioigel
Joined: 13 Aug 2010 Posts: 26 Location: RJ/Brazil
|
puts printf rs232 with PICF16F917 |
Posted: Mon Apr 10, 2017 7:28 am |
|
|
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
|
|
Posted: Mon Apr 10, 2017 8:19 am |
|
|
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
|
|
Posted: Mon Apr 10, 2017 9:50 am |
|
|
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. |
|
|
|
|
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
|