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] initialization usart

Status
Not open for further replies.

archusvijay1

Member level 3
Joined
Mar 12, 2014
Messages
61
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
553
hello,
i have some problem in initializing usart in pic 16f877a.during initialization function calling void initserial (void) become getting error "conflicting declarations" but using "int" instead of using "void" there is no error,but some times void will not get also a problem. why this happens?

void initserial (void) {
TRISC6 = 0;
TRISC7 = 1;
TXEN = 1;
CREN = 1;
SPEN = 1;
SYNC = 0;
RCIF = 0;
RCIE = 1;
BRGH = 1;
TXSTA = 0x24;
SPBRG = 129;
}
 

Hi archusvijay1, first What is the compiler you are using? I guess is something like CCS. Maybe the problem arises because the compiler has a native function with a prototype similar to the function you are declaring, i.e.
Code:
void initserial(void)
.

Also in your next post try to be more specific, that is, put more details on your problem to allow others to help you more. Yosmany325.
 

If you call a function which has not been declared.
or
You should declare a function before calling it.
 

Zip and post the complete MPLAB Hi-Tech PICC project files.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top