I have tested this on an 18F46K80 which is a chip of the same family and the program works fine on both UART channels. I therefore assume that the problem is not with the PIC_CAL_UART.c file and that it must be a definition issue with the 18F25K80.
I have looked at the code generated and when using UART channel 2 the number appended to the constants still shows 1. is this the problem?
Code: Select all
#ifndef MX_UART_REF1
#define MX_UART_REF1
#define gLCD_9_MX_UART_UREF 1
#define MX_UART_CHANNEL_1 2
#define MX_UART_TX_PIN_1 6
#define MX_UART_TX_PORT_1 portb
#define MX_UART_TX_TRIS_1 trisb
#define MX_UART_RX_PIN_1 7
#define MX_UART_RX_PORT_1 portb
#define MX_UART_RX_TRIS_1 trisb
#define MX_UART_FLOWEN_1 0
#define MX_UART_CTS_PIN_1 0
#define MX_UART_CTS_PORT_1 0
#define MX_UART_RTS_PIN_1 0
#define MX_UART_RTS_PORT_1 0
#define MX_UART_BAUD_1 9600
#define MX_UART_DBITS_1 8
#define MX_UART_RETURN_1 0
#define MX_UART_ECHO_1 0
#define MX_UART_INT_1 0
many thanks
Sefi