I'm using the MPLAB IDE X v1.41 with C18 compiler to pragram a PIC18F45K20. My objective is to retrieve image data from a completely built image sensor board and display on the computer using the MAX232 and serial to USB cable. The output data of the image sensor is in a digital form. However, there was an error in my program code which stopped me from further testing. Please help me identify the problem.
The error occurs in the putsUSART()
line in void main(void)
The program code below was written by myself. Notice that it is only the main body of the program:
//----------------------------Global variable----------------------------
unsigned int input0, input1, input2, input3, input4, input5, input6, input7;
//----------------------------USART initialize----------------------------
void init_USART(void)
{
OpenUSART ( USART_TX_INT_OFF &
USART_RX_INT_OFF &
USART_ASYNCH_MODE &
USART_EIGHT_BIT &
USART_CONT_RX &
USART_BRGH_HIGH,
25 );
}
//----------------------------Main program----------------------------
void main(void)
{
TRISB = 1; //input PORT B
init_USART();
while(1)
{
input0 = PORTB;
putsUSART("%d",input0);
}
}
int sqlite3_column_count(sqlite3_stmt *pStmt);
requires the sqlite3.h header \$\endgroup\$ – Grady Player Mar 8 '13 at 15:49