Basically the PWM provided from the microcontroller turns on/off a MOSFET which controls the passage of current through LEDs, thus controlling their brightness. The original circuit is bit complex and big. We are using IC LM3424 by Texas Instruments to reduce the input voltage of 32V to 11V in the output, that's the load requirement so the PWM generated from the microcontroller goes into the LM3424 and is produced/reflected as it is on the other end, where it controls the MOSFET placed in parallel with the load.
All we want to know, is the C language code for PIC 18F87J10 and PIC18F87K22, to generate a PWM with default frequency, or with a frequency of around 1 kHz if customization is possible and for the serial communication via UART baud rate 9600 for 16 BIT VALUE. For programming PIC, we are using MPLAB X v5.15 with XC8 compiler and PICkit 3 and EXPLORER 8 DEVELOPMENT BOARD.
please help us with the PROPER RUNNING CODE/PROGRAM rather than the tutorials or function sort etc. , we will be highly obliged.
for errors : many warnings and errors were generated regarding functions used (will try to show screen shots soon) and they were not going by doing 'n' number of amendments so the last option was to delete it, which fails our operation. The codes were basically for PIC16F family and few PIC18F family . so we think like syntax issue etc. also while we tried for MCC generation
so kindly send MCC (if using) project package with the running program written in it if possible.
soon reply will be appreciated