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;
}
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;
}