|
|
View previous topic :: View next topic |
Author |
Message |
charliumi
Joined: 03 Nov 2016 Posts: 11
|
PIC24FJ256GB406 - UART configuration issue |
Posted: Thu Nov 03, 2016 5:11 pm |
|
|
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
|
|
Posted: Fri Nov 04, 2016 2:45 am |
|
|
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
|
|
|
|
|
|
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
|