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 support@ccsinfo.com

I want to use uart 3 port on PIC24FJ256GB110

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







I want to use uart 3 port on PIC24FJ256GB110
PostPosted: Fri Jan 30, 2009 9:10 pm     Reply with quote

I read CCS 4.084. it can use 2 Uart. but the PIC24FJ256 has 4 port and I want to use 3 uart. How to use. How to write. And Who it khow please.
let.s me khow. Thank you so much please..............................
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Sat Jan 31, 2009 10:40 am     Reply with quote

As previously repoprted, CCS wasn't able yet to supply a devices.dat and device include file, that gives full support of PIC24FJ128GA parts. They have forgotten e.g. UART 3 and 4. You can use the Device Editor tool to supplement the missing interrupt information and add the SFR definitions to the device file manually. Or, simply specify PIC24FJ128GBxxx.

I just realized, that I didn't read your post thorougly, as you are already talking of the xxxGB chip. You have to define the respective SFR and functions by yourself, e.g.:

Code:
#word U3MODE = 0x250
#word U3STA = 0x252
#byte U3TXREGL = 0x254
#byte U3TXREGH = 0x255
#byte U3RXREGL = 0x256
#word U3BRG = 0x258
#bit  U3EN = 0x250.15
#bit  U3OERR = 0x252.1
#bit U3RXIF = 0x8E.2
#bit U3RXIE = 0x9E.2
#bit U3TXIE = 0x9E.3
#bit U3TXBF = 0x253.1
#bit U3TRMT = 0x253.0
#bit U3ERIF = 0x8e.2

void putc_u3(char c)
{
   while (U3TXBF);
   U3TXREGL = c;
}
char getch_u3(void)
{
   U3RXIF = 0;
   return U3RXREGL;
}
#define kbhit_u3() (U3RXDA)
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