Make sure the mComm_config.h file is properly configured.
#define MCOMM_ENABLED #define MCOMM_TYPE MCOMM_UART_ONE_WAY #define MCOMM_UART_BAUDRATE 38400 // (or) other valid baud rate option
#define MCOMM_UART_1WAY_MODULE MCOMM_UART_HARDWARE_MODULE // (or) MCOMM_UART_SOFTWARE_IMPLEMENTATION // If MCOMM_UART_SOFTWARE_IMPLEMENTATION is chosen: #define MCOMM_UART_SOFT_TXPORT PORTA #define MCOMM_UART_SOFT_TXTRIS TRISA #define MCOMM_UART_SOFT_TXPIN 5 // <-- The bit of the PORT/TRIS register // NOT the hardware pin on the device
#define MCOMM_UART_1WAY_OUTPUT MCOMM_UART_1WAY_DECIMAL // (or) MCOMM_UART_1WAY_HEX #define MCOMM_UART_1WAY_DELIMITER ';'
If you wish to use the PIC18F PIC24F One-Way GUI, force the mComm module to follow the GUI's packet structure by defining this value:
#define MCOMM_UART_1WAY_OUT_GUIv1_1
The following options will determine what values are output by the UART. Matrix output is not supported by the GUI but may be seen from a terminal window.
#define MCOMM_UART_1WAY_OUT_STATE // <-- If defined, outputs the state mask #define MCOMM_UART_1WAY_OUT_TOGGLE // <-- If defined, outputs the toggle state mask #define MCOMM_UART_1WAY_OUT_SLIDER // <-- If defined, outputs the slider output value #define MCOMM_UART_1WAY_OUT_MATRIX // <-- If defined, outputs the matrix press coordinate #define MCOMM_UART_1WAY_OUT_READING // <-- If defined, outputs the raw reading values #define MCOMM_UART_1WAY_OUT_BASELINE // <-- If defined, outputs the sensor baseline values
If you are using a processor with an APFCON register that allows for multiple pins to be used as 'TX', your application is responsible for initializing APFCON to the correct value for your hardware layout. The mTouch framework will warn you about this when compiling. To remove this warning, uncomment the define at the bottom of mTouch_config.h:
#define APFCON_INITIALIZED // For processors with an APFCON register(s), this // #define can be uncommented to stop the mTouch // Framework from producing a "remember to set // APFCON" warning. // // RULE OF PROGRAMMING #4: Register bits initialize, // by law, to the value you don't want. Always // explicitly initialize.
Program the board normally (not in debug mode) and connect the PKSA to both the PC and the board.
Is the PKSA's red LED on?
If no -
If yes - continue to 5.
Determine which COM port has been assigned to the PKSA.
In Windows -
If it's not there, you need to reinstall the Windows driver for the UART-to-USB behavior. The driver can be found in the PKSA Loader Utility's folder. Correct installation is based on the version of Windows you are using, but can be accomplished by right clicking the file and selecting 'Install' in most cases.