treyz
Member level 5
Hi everyone,
I have this mistake and I don'y know why,I am just triyng to send an array via USART from pic18f4680 and I have this error:
"C:\Users\marcd\Desktop\Projects\(Slave)_RS485\(Slave)__RS485\s_code.c:99:Error [1129] [] operator requires a pointer "
Have you got any ideas about what my error could be?
Here is my piece of code:
void UART_putc(unsigned char result)
{
char i=0;
TXSTAbits.TXEN=0; //Disable transmission
TXREG = result; //Load txreg with data
TXSTAbits.TXEN=1; //Enable transmission
while(TXSTAbits.TRMT==0); ; //Wait until the byte is sent
{}
i++;
}
I have this mistake and I don'y know why,I am just triyng to send an array via USART from pic18f4680 and I have this error:
"C:\Users\marcd\Desktop\Projects\(Slave)_RS485\(Slave)__RS485\s_code.c:99:Error [1129] [] operator requires a pointer "
Have you got any ideas about what my error could be?
Here is my piece of code:
void UART_putc(unsigned char result)
{
char i=0;
TXSTAbits.TXEN=0; //Disable transmission
TXREG = result; //Load txreg with data
TXSTAbits.TXEN=1; //Enable transmission
while(TXSTAbits.TRMT==0); ; //Wait until the byte is sent
{}
i++;
}