You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been asked by Chris to document the variant I am using with a PIC. It is in 'C' with the XC8 complier under the MPLAB IDE.
I'm not an expert by any means but the changes are fairly minor and they work. This may even be the wrong place to post this.
Steps are:
Rename DYPlayer.cpp DyPlayer.c
Remove all class statements e.g “DYPlayer::” from all functions
Remove all “inline” statements from functions
Include relevant headers
#include "mcc_generated_files/uart2.h"
#include <xc.h>
#include <stdlib.h>
#include <stdbool.h>
Add serial read and write functions, including a separate function for the single byte crc serialwrite_crc. Using a buffer length of [1] didn’t work so this was the quick fix. Serial read write functions are as generated by MPLAB Code Configurator (MPP).
uint8_t UARTx_Read(void)
void UARTx_Write(uint8_t txData)
Amend DYPlayer.h to match DYPlayer.c
Modify typedef and enum statements to be XC8 compliant.
I've been asked by Chris to document the variant I am using with a PIC. It is in 'C' with the XC8 complier under the MPLAB IDE.
I'm not an expert by any means but the changes are fairly minor and they work. This may even be the wrong place to post this.
Steps are:
Rename DYPlayer.cpp DyPlayer.c
Remove all class statements e.g “DYPlayer::” from all functions
Remove all “inline” statements from functions
Include relevant headers
Add serial read and write functions, including a separate function for the single byte crc serialwrite_crc. Using a buffer length of [1] didn’t work so this was the quick fix. Serial read write functions are as generated by MPLAB Code Configurator (MPP).
Amend DYPlayer.h to match DYPlayer.c
Modify typedef and enum statements to be XC8 compliant.
Files attached
DYPlayer for PIC.zip
Pete
The text was updated successfully, but these errors were encountered: