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

Setup the options of rs232

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







Setup the options of rs232
PostPosted: Tue Aug 08, 2006 9:35 pm     Reply with quote

How to setup options rs232 for use the TxD open collector output.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Aug 08, 2006 10:09 pm     Reply with quote

Download the CCS manual. Look in the section on #use RS232.
You will see the option listed.
http://www.ccsinfo.com/downloads/ccs_c_manual.pdf

Also look at these two example files:
c:\program files\picc\examples\ex_pbusm.c
c:\program files\picc\examples\ex_pbusr.c
Terk
Guest







It have the warning "Variable never used rs232_errors&
PostPosted: Tue Aug 08, 2006 10:28 pm     Reply with quote

Quote:
Clean: Deleting intermediary and output files.
Clean Warning: File "Sp_main.$$$" doesn't exist.
Clean: Deleted file "Sp_main.ERR".
Clean Warning: File "C:\Documents and Settings\Terk\Desktop\Rescue\PIC\Sp_main.o" doesn't exist.
Clean: Deleted file "Sp_main.HEX".
Clean: Deleted file "Sp_main.SYM".
Clean: Deleted file "Sp_main.LST".
Clean: Deleted file "Sp_main.PJT".
Clean: Deleted file "Sp_main.TRE".
Clean: Deleted file "Sp_main.COF".
Clean: Deleted file "C:\Documents and Settings\Terk\Desktop\Rescue\PIC\Sp_main.mcs".
Clean: Done.
Executing: "C:\Program files\Picc\CCSC.exe" "Sp_main.c" +FH +DF +LN +T -A +M +Z +Y=9 +EA
>>> Warning 203 "Sp_main.c" Line 28(1,1): Condition always TRUE
>>> Warning 202 "Sp_main.c" Line 10(1,3): Variable never used rs232_errors
Memory usage: ROM=1% RAM=1% - 2%
0 Errors, 2 Warnings.
BUILD SUCCEEDED: Wed Aug 09 11:25:34 2006
Terk
Guest







My header source code.
PostPosted: Tue Aug 08, 2006 10:37 pm     Reply with quote

Quote:
#include <18f458.h>
#define TxD PIN_C6
#define RxD PIN_C7

#fuses H4
#fuses NOLVP, NOWDT
#fuses NOPROTECT
#use delay (clock=40000000)
#use rs232(baud=9600,xmit=TxD,rcv=RxD,stream=pc)
#use rs232(baud=38400,parity=N,xmit=PIN_D0,rcv=PIN_D1,bits=8,stream=psoc,float_high)


What happen?I can be use psoc stream to output collector?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Aug 08, 2006 11:02 pm     Reply with quote

Turn off the warnings, or read this thread:
http://www.ccsinfo.com/forum/viewtopic.php?t=22342
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