The Godfather talking
Share your stuff or I will make you regret it.
Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 30, 2024, 04:37:41 16:37


Login with username, password and session length


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

Posts: 68

Thank You
-Given: 13
-Receive: 3


« 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));
}
}
Logged
Tom1234
Junior Member
**
Offline Offline

Posts: 68

Thank You
-Given: 13
-Receive: 3


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

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

Posts: 30

Thank You
-Given: 102
-Receive: 10


« Reply #2 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

Logged
j0k3r
Junior Member
**
Offline Offline

Posts: 40

Thank You
-Given: 44
-Receive: 18


« Reply #3 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.
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