Display Diagnotic Values from PIC UART
Posted: Thu Oct 02, 2025 4:41 pm
Hi, This program uses AppDeveloper to display Names and Values sent over a Serial COM link.
This is usful for Custom microcontroller devices in the field or being debugged, having the program send out internal values can be very helpful.
During testing and a 57K baud serial link, I'm getting a reliable update of around 60 values. It works well in Simulation and Deployed.
The Microcontroller just needs to send a specific diagnostic string, the AD App will then decode and display the info, into one of three columns.
The view below is the test data being pumped out by the test PIC.
The RxDiag box reports the actual strings recieved.
The Error log reports if the Parse macro find an error in the recieved string or no data is received (Waiting).
Tick the Properties box and you can change the COM Port, Refresh the List or Change the Baud rate. (Thanks Ben! )
Also attached is the testing FC writen for a PIC18F. This contains the Diagnostic Send Macro "Diag_TxtINT"
The macro is deliberatly simple as I dont want to tie the PIC up processing lots of data. (As my previous VT100 version did)
This macro could be used by any Microcontroller with a UART output, Obvioulsy the UART output needs to go to a UART-to-USB-COM converter like a FTDI
The Macro's parameters are
Function: 1=Send both Name and Value. 2=Send Value Only
Line: Set the Console Line to Write too. (2-20)
Column: Set Which Console (Column) to write to. (1,2,3)
Name: The Name to Print (15 Characters Max)
Value: An Integer Value to print.
It builds a string with a start character of ~ and terminating character of $.
The PIC's FC looks way more complex as its producing lots of data to test the limits of the 'RecieveDiagnosticValues' AD
But really all that is needed to send Diagnosic data is the single macro "Diag_TxtINT"
Anyway, I got loads of help sorting out various issues and I thought it worth sharing.
Its not perfect but working well in a few of my field projects. J.
This is usful for Custom microcontroller devices in the field or being debugged, having the program send out internal values can be very helpful.
During testing and a 57K baud serial link, I'm getting a reliable update of around 60 values. It works well in Simulation and Deployed.
The Microcontroller just needs to send a specific diagnostic string, the AD App will then decode and display the info, into one of three columns.
The view below is the test data being pumped out by the test PIC.
The RxDiag box reports the actual strings recieved.
The Error log reports if the Parse macro find an error in the recieved string or no data is received (Waiting).
Tick the Properties box and you can change the COM Port, Refresh the List or Change the Baud rate. (Thanks Ben! )
Also attached is the testing FC writen for a PIC18F. This contains the Diagnostic Send Macro "Diag_TxtINT"
The macro is deliberatly simple as I dont want to tie the PIC up processing lots of data. (As my previous VT100 version did)
This macro could be used by any Microcontroller with a UART output, Obvioulsy the UART output needs to go to a UART-to-USB-COM converter like a FTDI
The Macro's parameters are
Function: 1=Send both Name and Value. 2=Send Value Only
Line: Set the Console Line to Write too. (2-20)
Column: Set Which Console (Column) to write to. (1,2,3)
Name: The Name to Print (15 Characters Max)
Value: An Integer Value to print.
It builds a string with a start character of ~ and terminating character of $.
The PIC's FC looks way more complex as its producing lots of data to test the limits of the 'RecieveDiagnosticValues' AD
But really all that is needed to send Diagnosic data is the single macro "Diag_TxtINT"
Anyway, I got loads of help sorting out various issues and I thought it worth sharing.
Its not perfect but working well in a few of my field projects. J.