Search the Community
Showing results for tags 'lin'.
I have a program in MPLAB that works correctly when sending messages through the LIN system at a baud rate of 9600, but when I change it to 19200 it does not come out. I am using the MPLAB Code configurator V4 tool and in the window for Eusart I put the 19200 which are the Baud Rates to which I want to transfer. It is expected to know the values in the eusart.c file of SP1BRGL and SP1BRGH for the Baud Rate corresponding to 19200. Tried with SP1BRGL values of 0x40,0X65,0xFE, 0x3B, 0x3D keeping SP1BRGH at 0x00. Also in the application in the Registers of the variables of Sp1BRGL and SP1BRGH so that they correspond to a Baud Rate of 19200. For the calculation, the table for pic16 was used, it is expected in high transfer speed with a 16 Mhz oscillator an SPBRG of 51 but it still did not work. I do not know what I am doing wrong, to read the data I am using a LIN analyzer tool and everything works at a Baud rate of 9600 but I take it to be 19600 for the application.