User manual
652
mikoC PRO for dsPIC
MikroElektronika
Returns Nothing.
Requires Routine requires the UART module.
Example
// dsPIC30 family example
// Initialize hardware UART1 module and establish communication at 2400 bps,
8-bit data, even parity and 2 STOP bits
UART1_Init_Advanced(2400, 2, 1);
// dsPIC33 and PIC24 family example
// Initialize hardware UART2 module and establish communication at 2400 bps,
8-bit data, even parity, 2 STOP bits and high speed baud rate calculations
UART2_Init_Advanced(2400, 2, 1, 1);
Notes Refer to the device data sheet for baud rates allowed for specic Fosc.
UART library routines require you to specify the module you want to use. To select the desired UART
module, simply change the letter x in the routine prototype for a number from 1 to 4.
Switching between the UART modules in the UART library is done by the UART_Set_Active function
(UART modules have to be previously initialized).
Number of UART modules per MCU differs from chip to chip. Please, read the appropriate datasheet
before utilizing this library.