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

Which PIC24 have fully working UART1 and UART2 implemented

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



Joined: 08 Oct 2009
Posts: 3

View user's profile Send private message

Which PIC24 have fully working UART1 and UART2 implemented
PostPosted: Tue Oct 27, 2009 10:27 pm     Reply with quote

Does anyone know if any PIC24's have been fully implemented in terms of their UART functions in v. 4.099? Or are there any other PICs with multiple hardware UARTs that are currently fully supported by built in functions?
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Wed Oct 28, 2009 12:53 am     Reply with quote

As far as I see, all PIC24 UARTs are supported by PCD built-in functions.

With newer chips, you have to use pin_select statements, e.g.:
Code:
#pin_select U1RX=PIN_B9
#pin_select U1TX=PIN_B8
#use rs232(UART1,baud=9600,parity=N,bits=8,stream=uart1)

#pin_select U2RX=PIN_B3
#pin_select U2TX=PIN_B4
#use rs232(UART2,baud=19200,parity=N,bits=8,stream=uart2)

fprintf(uart2,"Program start");
k=getc(); // refers to the last use rs232 statement, UART2 in this case
k=fgetc(uart1);
richi-d



Joined: 28 Aug 2007
Posts: 106

View user's profile Send private message

PostPosted: Wed Dec 16, 2009 10:36 am     Reply with quote

Hello,

The PIC 24 UART doesn't work. I have seen that the UARTEN bit is "0". After your code FVM... whats now to do?
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Wed Dec 16, 2009 2:43 pm     Reply with quote

You didn't say about the involved PIC, so I can't comment further on it. I'm using all four UARTS of a PIC24FJxxGA010. Because the built-in functions didn't work with previous PCD versions, I'm using partly direct SFR access to setup the UART, but I verified, that #use RS232 is operational as well.

You may want to post a complete chip and UART setup example, and we'll see, what PCD does with it.
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