Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[PIC] #use rs232 syntax for ccs

Status
Not open for further replies.

Kumar Sin

Newbie level 1
Newbie level 1
Joined
Jan 14, 2015
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
12
I have project which has few files. One of the files I have #use syntax to initialize the uart1 for pic18F87J11 controller.

#use rs232(uart1, baud=19200, parity=N, xmit=PIN_C6, rcv=PIN_C7, bits=8)
#int_RDA
void RDA1_isr(void)
{
UCHAR receive_byte;
.......................
.............
}

In another file I have another #use syntax to initialize the uart2.

#use rs232(uart2, baud=19200, parity=N, xmit=PIN_C6, rcv=PIN_C7, bits=8)

When I compile the project file with the ccs compiler I get the above message,

-- Info 300 "C:\My_Test_HCA\HCA\Code\FS1K_intrpt.c" Line 448(5,8): More info: First Declaration of STDIN
*** Error 31 "C:\My_Test_HCA\HCA\Code\pic_RemPanel.c" Line 730(5,74): Identifier is already used in this scope
1 Errors, 1 Warnings.
Build Failed.

Somehow the compiler doesn't like the #use syntax 2 times. If I remove either one it compiles well.

I am new to the ccs compiler. Appreciate your help.
 

#use rs232 means a fully static usage of the UART.

If you know the one-and-only baud rate then use it for it and for more than one UART connection with PIC you can change the UART for 2nd UART is using setup_uart();function.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top