I would like to convert a simple ccs's code to C30's code but I don’t know how.
I would need help.
In this code I used 2 uarts channels for read and write.
(I haven’t any experience on the use of C30 compiler, so except of the convertion of this code I will need also any resources/tutorial which will help me to learn C30 compiler).
#include <33ep512GP806.h>
#fuses HS, NOWDT, PR, NOPUT,NOPROTECT
#use delay (clock=20M)
#PIN_SELECT U1TX=PIN_D0
#PIN_SELECT U1RX=PIN_D9
#USE RS232(UART1,ERRORS,BAUD=9600,STREAM=COM_A)
#PIN_SELECT U2TX=PIN_E2
#PIN_SELECT U2RX=PIN_E0
#USE RS232(UART2,ERRORS,BAUD=9600,STREAM=COM_B)
void main()
{
while(1)
{
fputs("HELLO_1", COM_A);
fputs(fgetc(COM_A));
fputs("HELLO_2", COM_B);
fputs(fgetc(COM_B));
}
}