PIC18F4550 ReadUSART(), compilation error in MPLAB

Status
Not open for further replies.

IsaacJn

Newbie level 5
Joined
Nov 14, 2009
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
UK
Activity points
1,344
PIC18F4550 ReadUSART()

I have tried to compile the following code in MPLAB but the compilation failed. What is the problem?

#pragma config CPUDIV = OSC1_PLL2
#pragma config USBDIV = 1
#pragma config FCMEN = OFF, PWRT = ON, BOR = OFF
#pragma config VREGEN = ON, MCLRE = ON, CCP2MX = ON, STVREN = ON
#pragma config XINST = OFF



void main()
{
TRISC = 0xff;

unsigned char c;

OpenUSART(USART_TX_INT_OFF & USART_RX_INT_OFF & USART_ASYNCH_MODE & USART_EIGHT_BIT & USART_CONT_RX & USART_BRGH_LOW, 129);

c = ReadUSART();
//closeUSART();
}
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…