CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

UART problem with DSPIC33EP512GP806

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
TMLtech



Joined: 20 Jul 2011
Posts: 21
Location: Finland

View user's profile Send private message

UART problem with DSPIC33EP512GP806
PostPosted: Sun Dec 15, 2013 7:11 am     Reply with quote

Hello for everyone. I tried to set up hardware uart for DSPIC33EP512GP806 and i can't found which pin it is? Can somebody help. Datasheet says there are four hardware uart port but i don't found any? Maybe i'm blind..

How can i declare it?

Thank you for your help.


Compiler: 4.140 and MPLAD IDE plugin. Mplab version is v8.91
Ttelmah



Joined: 11 Mar 2010
Posts: 19539

View user's profile Send private message

PostPosted: Sun Dec 15, 2013 11:50 am     Reply with quote

You need to study the datasheet. On most of these chips, peripherals are on 'RP' pins (relocatable peripheral). With these you can route the required peripherals to _any_ suitable RP pin.
The command to do this in CCS, is #PIN SELECT. So you can specify the peripheral pin, and which physical pin you want to connect it to. Repeat for all eight pins from the UARTs. Then on the #USE RS232, just use the UART name, instead of pins, and the connections are made.
Look at Ex_PinSelect.c, and ExPinSelect2.c for simple examples.

Best Wishes
TMLtech



Joined: 20 Jul 2011
Posts: 21
Location: Finland

View user's profile Send private message

PostPosted: Mon Dec 16, 2013 12:50 am     Reply with quote

Thank you very much Mr. Ttelmah! Now I can be sure for that. And the example says:
Code:

#pin_select U2TX = PIN_C9
#pin_select U2RX = PIN_C3
#pin_select OC1 = PIN_B7

#use rs232(baud=9600, UART2,ERRORS)
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group