User manual
PICkit™ SERIAL ANALYZER
USER’S GUIDE
© 2007 Microchip Technology Inc. DS51647A-page 69
Chapter 8. User Defined Templates
8.1 INTRODUCTION
User Defined Templates extend User Scripts by interpreting the data read from the
target device and displaying it in a human readable form. The conversion formula is:
EQUATION 8-1: CONVERSION FORMULA
For example, an 8-bit ADC value is read, and we desire a displayed value in voltage, 0
to 5 Volts. The 8-bit ADC value (read value) can be 0 to 256 decimal. The ADC refer-
ence voltage is 5 V
DC. The slope is the constant value used to convert between the
ADC read value and the desired display value. In this example:
EQUATION 8-2: SLOPE EXAMPLE
Using a User Defined Template, the interpretation of the ADC value can be displayed
in volts DC.
8.2 HIGHLIGHTS
This chapter discusses:
• Create Templates
•My Templates
8.3 CREATE TEMPLATES
Create a User Define Template by selecting User Define Templates > Create Templates
from the menu bar. The Create Template window is displayed as shown in Figure 8-1.
Read Value * Slope + Offset = Display Value
Slope = ADC Reference Voltage / 8-bit ADC = 5 / 256 = 0.01953125
Note: First, a user define script(s) must be created using the Script Builder win-
dow for the selected serial communications mode. Refer to the respective
serial communications chapter under the Script Builder section.