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

PIC24FJ256GB406 - UART configuration issue

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



Joined: 03 Nov 2016
Posts: 11

View user's profile Send private message

PIC24FJ256GB406 - UART configuration issue
PostPosted: Thu Nov 03, 2016 5:11 pm     Reply with quote

I notice few inconsistencies between the PIC24FJ256GB406 data-sheet and the PIC-24 bit Wizard, specifically around UART Setup. For example, data sheet indicates for UART5 that TX is on RD1 and RX is on RD6, while the wizard does not give RD6 as an option. I selected the double-check that I pick the right PIC24FJ model from the list and I still experience the issues.

Has anybody work for this pic model and CCS ?

Thanks for your help,
Ttelmah



Joined: 11 Mar 2010
Posts: 19549

View user's profile Send private message

PostPosted: Fri Nov 04, 2016 2:45 am     Reply with quote

Seriously, none of the people here who program for a living, would ever use the Wizard. A pretty sure way of configuring things incorrectly....

The Wizard is a "tool for fools" (sorry...). Encourages you not to actually know what your hardware is doing, and will get things wrong as often as right.

Now I just setup UART1, and UART5 on this chip, 'manually', and it merrily compiles and talks to the correct registers:
Code:


#PIN_SELECT U1RX=PIN_D4
#PIN_SELECT U1TX=PIN_D5 //place UART1 adjacent to UART5

#use rs232(UART1, baud=9600, ERRORS, stream=UART_PORT1)
#use rs232(UART5, baud=9600, ERRORS, stream=UART_PORT5)
//setup both UARTs

//Then:
   fputc('A', UART_PORT1);
   fputc('B', UART_PORT5);
//talks to the correct registers for both UARTs
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