View previous topic :: View next topic |
Author |
Message |
Terk Guest
|
Setup the options of rs232 |
Posted: Tue Aug 08, 2006 9:35 pm |
|
|
How to setup options rs232 for use the TxD open collector output. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Aug 08, 2006 10:09 pm |
|
|
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& |
Posted: Tue Aug 08, 2006 10:28 pm |
|
|
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. |
Posted: Tue Aug 08, 2006 10:37 pm |
|
|
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
|
|
|
|