Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 08, 2016, 12:51:42 12:51


Login with username, password and session length


Pages: [1]
Print
Author Topic: Convertion ccs to c30 code  (Read 920 times)
0 Members and 1 Guest are viewing this topic.
Tom1234
Junior Member
**
Offline Offline

Posts: 35

Thank You
-Given: 6
-Receive: 1


« on: December 14, 2014, 08:48:55 20: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));
}
}
Logged
Tom1234
Junior Member
**
Offline Offline

Posts: 35

Thank You
-Given: 6
-Receive: 1


« Reply #1 on: December 15, 2014, 08:19:29 20:19 »

Is anyone who want to help?
Logged
OrciBorg
Newbie
*
Offline Offline

Posts: 19

Thank You
-Given: 52
-Receive: 7


« Reply #2 on: December 15, 2014, 11:26:17 23: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

Logged
j0k3r
Junior Member
**
Offline Offline

Posts: 38

Thank You
-Given: 32
-Receive: 17


« Reply #3 on: December 16, 2014, 10:25:51 10: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.
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC