Sonsivri

Electronics => Pic C Languages => Topic started by: Tom1234 on December 14, 2014, 07:48:55 19:48



Title: Convertion ccs to c30 code
Post by: Tom1234 on December 14, 2014, 07:48:55 19:48

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).

Code:
#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));
}
}


Title: Re: Convertion ccs to c30 code
Post by: Tom1234 on December 15, 2014, 07:19:29 19:19
Is anyone who want to help?


Title: Re: Convertion ccs to c30 code
Post by: OrciBorg on December 15, 2014, 10:26:17 22:26

http://www.microchip.com/forums/m776461.aspx

http://www.microchip.com/forums/m832146.aspx

Posted on: December 15, 2014, 11:22:27 23:22 - Automerged

 See in UART FUNCTIONS.

http://ww1.microchip.com/downloads/en/devicedoc/51456b.pdf



Title: Re: Convertion ccs to c30 code
Post by: j0k3r on December 16, 2014, 09:25:51 09:25
Hi,
Download MAL for example "v2013-06-15" You have a lot examples. I remenber one in "console.h" and "console.c"......
view OpenxUSART(); where x is your port.