ANALYZER SRL PICKIT W/DEMO BOARD

DV164122

Manufacturer Part NumberDV164122
DescriptionANALYZER SRL PICKIT W/DEMO BOARD
ManufacturerMicrochip Technology
SeriesPICkit™
TypeMCU
DV164122 datasheets
 


Specifications of DV164122

ContentsPICkit™ Serial Analyzer, 28-pin Demo Board, USB Cable, and Software with Documentation CDProcessor To Be EvaluatedPIC16F886
Interface TypeUSBSilicon ManufacturerMicrochip
Kit Application TypeInterfaceApplication Sub TypeUSB
Silicon Family NamePIC16FKit ContentsPICkit Serial Analyzer, Demo Board, USB Cable, Software
Rohs CompliantYesLead Free Status / RoHS StatusNot applicable / Not applicable
For Use With/related ProductsPIC16F886For Use WithPKSERIAL-SPI1 - BOARD DEMO PICKIT SERIAL SPIPKSERIAL-I2C1 - BOARD DEMO PICKIT SERIAL I2C
Other namesQ3260228  
1
Page 1
2
Page 2
3
Page 3
4
Page 4
5
Page 5
6
Page 6
7
Page 7
8
Page 8
9
Page 9
10
Page 10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
Page 1/120

Download datasheet (2Mb)Embed
Next
PICkit
Serial Analyzer
USER’S GUIDE
© 2007 Microchip Technology Inc.
DS51647A

DV164122 Summary of contents

  • Page 1

    ... PICkit © 2007 Microchip Technology Inc. ™ Serial Analyzer USER’S GUIDE DS51647A ...

  • Page 2

    ... Select Mode, Smart Serial, SmartTel, Total Endurance, UNI/O, WiperLock and ZENA are trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. SQTP is a service mark of Microchip Technology Incorporated in the U.S.A. All other trademarks mentioned herein are property of their respective companies. ...

  • Page 3

    ... Installing the PICkit™ Serial Analyzer Software ........................... 17 3.4 Starting the Program ..................................................................... 17 3.5 Configuration Wizard .................................................................... 18 3.6 Main Window ................................................................................ 21 3.7 Serial Communications Modes ..................................................... 25 © 2007 Microchip Technology Inc. PICkit™ SERIAL ANALYZER Table of Contents 2 C™ Demonstration Program ........... 11 2 C™ Source Code and Firmware .......................... 15 USER’S GUIDE DS51647A-page iii ...

  • Page 4

    ... PICkit Serial Pin Assignments .......................................................49 6.4 Selecting Communications Mode ..................................................50 6.5 Configuring USART Asynchronous Communications Mode .........50 6.6 Communications: Basic Operations ..............................................52 6.7 Script Builder .................................................................................52 6.8 Script Execute ...............................................................................57 Chapter 7. USART Master Synchronous Communications 7.1 Introduction ...................................................................................59 7.2 Highlights ......................................................................................59 DS51647A-page Communications Mode ........................................28 © 2007 Microchip Technology Inc. ...

  • Page 5

    ... COMM .......................................................................................... Communications .................................................................. 82 9.7 SPI Communications .................................................................... 87 9.8 USART Communications .............................................................. 90 Chapter 10. PICkit™ Serial Analyzer DLL 10.1 Introduction ................................................................................... 95 10.2 Highlights ...................................................................................... 95 10.3 Summary of Functions .................................................................. 95 10.4 Programming Example ................................................................. 99 © 2007 Microchip Technology Inc. PICkit™ SERIAL ANALYZER Table of Contents USER’S GUIDE DS51647A-page v ...

  • Page 6

    ... Appendix B. 28-Pin Demo Board I B.1 Introduction .................................................................................107 B.2 Highlights ....................................................................................107 B.3 Hardware .....................................................................................107 B.4 Firmware .....................................................................................107 2 B Communications ...................................................................108 B.6 Slave Devices .............................................................................109 B.7 Functions .....................................................................................112 Worldwide Sales and Service ............................................................... 114 DS51647A-page vi 2 C™ Demonstration Firmware ... 107 © 2007 Microchip Technology Inc. ...

  • Page 7

    ... Chapter 6: USART Asynchronous Communications • Chapter 7: USART Master Synchronous Communications • Chapter 8: User Defined Templates • Chapter 9: PICkit™ Serial Analyzer Firmware • Chapter 10: PICkit™ Serial Analyzer DLL © 2007 Microchip Technology Inc. PICkit™ SERIAL ANALYZER Preface NOTICE TO CUSTOMERS 2 C™ ...

  • Page 8

    ... Optional arguments mcc18 [options] file [options] Choice of mutually exclusive errorlevel {0|1} arguments selection Replaces repeated text var_name [, var_name...] Represents code supplied by void main (void) user { ... } © 2007 Microchip Technology Inc. Examples ® IDE User’s Guide ...

  • Page 9

    ... IDE – The latest information on Microchip MPLAB IDE, the Windows Integrated Development Environment for development systems tools. This list is focused on the MPLAB IDE, MPLAB SIM simulator, MPLAB IDE Project Manager © 2007 Microchip Technology Inc. ® C18 and MPLAB C30 C compilers; MPASM™ ...

  • Page 10

    ... Technical support is available through the web site at: http://support.microchip.com DOCUMENT REVISION HISTORY Revision A (January 2007) • Initial release of this document. DS51647A-page 4 ® II device programmers and the PICSTART © 2007 Microchip Technology Inc. ® ...

  • Page 11

    ... Analyzer connects to the PC using a USB cable. Finally, the PICkit™ Serial Analyzer interfaces to the target device using a 6-pin header. Figure 1-1 illustrates the PICkit™ Serial Analyzer embedded serial communications development system. © 2007 Microchip Technology Inc. PICkit™ SERIAL ANALYZER 2 C serial protocol. ® ...

  • Page 12

    ... PICkit™ SERIAL ANALYZER DEVELOPMENT SYSTEM PC PICkit™ Serial Analyzer ® PICkit™ SERIAL ANALYZER – Lanyard Connection 5 – Pin 1 Marker 4 – USB Port Connection 6 – Communications Connector Target Device 2 I C™ SPI USART ® Windows compatible computer 3 4 © 2007 Microchip Technology Inc. ...

  • Page 13

    ... Pin assignments are shown in Figure 1-3. FIGURE 1-3: Note: The 6-pin header (0.100" spacing) accepts 0.025" square pins. © 2007 Microchip Technology Inc. PICkit™ Serial Analyzer Overview PICkit™ SERIAL ANALYZER PIN ASSIGNMENTS Pin 1 Indicator 1 ...

  • Page 14

    ... Analyzer Firmware”. The latest version of the PICkit™ Serial Analyzer firmware can be downloaded from the Microchip Technology web site. The firmware is updated by selecting PICkit Serial Analyzer > Download PICkit Serial Analyzer Firmware from the menu bar. An open file window will open. Select the *.hex file to be uploaded to the PICkit™ Serial Analyzer and click on the Open button ...

  • Page 15

    ... Connect the PICkit Serial Analyzer to the PC using the supplied USB cable. There are no USB drivers to install. The green Power indicator should light indicating that the PICkit Serial Analyzer is powered. © 2007 Microchip Technology Inc. PICkit™ SERIAL ANALYZER 2 C serial protocol. The PICkit™ Serial Analyzer will real-time clock and Serial EEPROM ...

  • Page 16

    ... Click on the Next button and accept the default settings for I mode. For more information about using the I Master Communications.” DS51647A-page 10 CONNECTING PICkit™ SERIAL TO THE 28-PIN DEMO BOARD 2 C Master mode, see Chapter 4. “ Master 2 C™ © 2007 Microchip Technology Inc. ...

  • Page 17

    ... Update RTC button. Or the user can click on the Set RTC to System Time button to set the real-time clock to the date and time of the computer. © 2007 Microchip Technology Inc. PICkit™ SERIAL ANALYZER MAIN WINDOW 2 C™ DEMONSTRATION PROGRAM 2 C demonstration by clicking on Demo Boards > ...

  • Page 18

    ... EEPROM. DS51647A-page 12 2 28-PIN DEMO I C™ – RTC 2 C EEPROM device such as a 24LC02. The commands are © 2007 Microchip Technology Inc. ...

  • Page 19

    ... PIC microcontroller. Rotate potentiometer RP1 and the display changes almost instantaneously. The demonstration program will constantly poll the 28-Pin Demo Board and display the contents of the ADC. FIGURE 2-5: © 2007 Microchip Technology Inc. 2 28-PIN DEMO I C™ – EEPROM 2 28-PIN DEMO I C™ ...

  • Page 20

    ... C window and the Basic Operations window cannot C™ BASIC OPERATIONS MEMORY LOCATIONS 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 2 C Master window is opened, Contents Configuration 1 Configuration 2 Seconds Minutes Hours Days Weekdays Months Years © 2007 Microchip Technology Inc. ...

  • Page 21

    ... DEMO I C™ SOURCE CODE AND FIRMWARE The demo program source code and *.hex file can be found on the PICkit Serial CD-ROM at D:\28-pin Demo Board\Firmware\. © 2007 Microchip Technology Inc. RTC TRANSACTIONS DEMO WORD ADDRESS CONTENTS Memory Contents … ...

  • Page 22

    ... PICkit™ Serial Analyzer User’s Guide NOTES: DS51647A-page 16 © 2007 Microchip Technology Inc. ...

  • Page 23

    ... You can start the program by • Clicking on the desktop icon, or • Navigating to Start>All Programs>Microchip>PICkit Serial Analyzer After a few moments, the program will start and display the main window as shown in Figure 3-1. © 2007 Microchip Technology Inc. PICkit™ SERIAL ANALYZER USER’S GUIDE ® .NET ...

  • Page 24

    ... Configuration Wizard for that communications mode. The Configuration Wizard Welcome window is shown in Figure 3-2. You may choose to continue by clicking on the Next button or canceling the wizard by clicking on the Cancel button. DS51647A-page 18 PICkit™ SERIAL ANALYZER MAIN WINDOW 2 C, SPI, USART Master © 2007 Microchip Technology Inc. ...

  • Page 25

    ... Wizard Page shown in Figure 3-4, allows you to select the bus speed. A more comprehensive list of bus speeds can be chosen from the Configuration Window by selecting PICkit Serial Analyzer > Configure Communications Mode from the menu bar. © 2007 Microchip Technology Inc. PICkit™ Serial Analyzer PC Program CONFIGURATION WIZARD – WELCOME CONFIGURATION WIZARD – ...

  • Page 26

    ... The USB port current limit is set to 100 mA. If the target plus PICkit Serial Analyzer exceeds this current limit, the USB port will turn off. The target may be powered externally if more power is required. DS51647A-page 20 CONFIGURATION WIZARD – PAGE CONFIGURATION WIZARD – PAGE CAUTION , the user to verify the DC CAUTION at a combined DC © 2007 Microchip Technology Inc. ...

  • Page 27

    ... Menu Bar The menu bar selects various functions of the PICkit Serial Analyzer program. A summary of the functions are: FIGURE 3-8: © 2007 Microchip Technology Inc. PICkit™ Serial Analyzer PC Program CONFIGURATION WIZARD – PAGE CONFIGURATION WIZARD – YOU’RE DONE! MENU BAR ...

  • Page 28

    ... Select Communications Mode) • Download PICkit Serial Analyzer Firmware – Displays the Firmware Download window. Firmware updates are available from the Microchip Technology web site. • Run Configuration Wizard – Displays the Configuration Wizard • Perform System Reset – Closes and then reinitializes USB communications to the PICkit Serial Analyzer • ...

  • Page 29

    ... The status information that is displayed depends on the selected communications 2 mode (I C, SPI, USART). The following chapters give more detailed explanation of the status window for the particular serial communications mode. © 2007 Microchip Technology Inc. PICkit™ Serial Analyzer PC Program TOOL BAR Tool Bar DS51647A-page 23 ...

  • Page 30

    ... Additional Transactions windows can be displayed. From the PICkit Serial Analyzer menu bar, select Window > New Transaction Window. The active Transactions window will log the current commands and data. DS51647A-page 24 STATUS COLUMN (BASIC VIEW) STATUS COLUMN (ADVANCED VIEW) Status Column Status Column © 2007 Microchip Technology Inc. ...

  • Page 31

    ... CLEAR – The contents of the Transactions window will be cleared 3.7 SERIAL COMMUNICATIONS MODES Detailed information about the entering of data and commands for specific serial communications modes are given in the following chapters. © 2007 Microchip Technology Inc. PICkit™ Serial Analyzer PC Program TRANSACTIONS WINDOW Transactions Window DS51647A-page 25 ...

  • Page 32

    ... PICkit™ Serial Analyzer User’s Guide NOTES: DS51647A-page 26 © 2007 Microchip Technology Inc. ...

  • Page 33

    ... C Master Communications tutorial is available on the Microchip Technology web site. Click on the links: Support -> Getting Started -> PIC MCU Tutorials -> I2C Master Mode • Several application notes are available on the Microchip Technology web site. Click on links: Design -> App Notes -> Function: Communications -> I2C 4.2 ...

  • Page 34

    ... The USB port current limit is set to 100 mA. If the target plus PICkit Serial Analyzer exceeds this current limit, the USB port will turn off. The target may be powered externally if more power is required. DS51647A-page C™ CONFIGURE COMMUNICATIONS MODE – BASIC VIEW CAUTION , the user to verify the DC CAUTION user selectable DC © 2007 Microchip Technology Inc. ...

  • Page 35

    ... AUX1 Default State – AUX1 communication line – default state ( • AUX2 Default State – AUX2 communication line – default state ( • AUX1 Direction – AUX1 communication line – direction: 1: input, 0: output © 2007 Microchip Technology Inc C™ Master Communications 2 C bus bit rate using the drop down box ...

  • Page 36

    ... The write bit should be cleared to indicate a write operation. • Word Address – Enter the word address • Data – Enter up to eight bytes of data • Stop bit (P_) The command will be logged in the Transactions window. A listing of the command abbreviations is given in Table 4-2. DS51647A-page Specification © 2007 Microchip Technology Inc. ...

  • Page 37

    ... Del User Scripts – Deletes scripts from the User Scripts column. • Show Array – Displays a spreadsheet-like table in which large amounts of data may be entered. This data can be included in the script by right clicking in a Script Detail cell and choosing “Insert Array”. © 2007 Microchip Technology Inc C™ Master Communications ...

  • Page 38

    ... The “x” indicates the value is a hexadecimal number. Clicking on “x” will toggle “d” indicating that the value is a decimal number. DS51647A-page C™ SCRIPT BUILDER – SCRIPT COMMANDS Script Commands 2 I C™ SCRIPT BUILDER – EXAMPLE SCRIPTS Example Scripts © 2007 Microchip Technology Inc. ...

  • Page 39

    ... A local menu will be displayed as shown in Figures 4-9. Select from the choice of commands or script macro commands. The sequence of macro commands are executed from top to bottom. Macro commands are entered by right clicking in the box and selecting from the local menu as shown in Figures 4-9. © 2007 Microchip Technology Inc C™ Master Communications 2 I C™ ...

  • Page 40

    ... Set I C™ Bit Rate - min:0 = 35k, max:127 = 100k. Next byte is the bit rate. [RE] Reset MSSP module [RN] Read bytes - NACK last byte. Next byte is the byte count [RBN] Read block - NACK last byte [A1RST] Reset AUX1 Description © 2007 Microchip Technology Inc. ...

  • Page 41

    ... Assignable Buttons in the right column. The script will be executed once each time the button is clicked. The Assignable Buttons can be cleared by clicking on the Clear Buttons button. © 2007 Microchip Technology Inc C™ ...

  • Page 42

    ... Iteration button in the left column. The number of iterations are entered in the Iterations box and the delay in millisecond in the Delay box. A summary of the iterations is displayed in the left column. The macro is executed when the Iteration button is clicked. FIGURE 4-11: DS51647A-page C™ SCRIPT EXECUTE – EXAMPLE © 2007 Microchip Technology Inc. ...

  • Page 43

    ... Basic Communications window or by creating Script Commands assumed that the user is familiar with the SPI protocol. For more information see: An SPI tutorial is available on the Microchip Technology web site. Click on the links: Support -> Getting Started -> PIC MCU Tutorials -> SPI - PICmicro Serial Peripheral Interface Several application notes are available on the Microchip Technology web site. Click on links: Design -> ...

  • Page 44

    ... The USB port current limit is set to 100 mA. If the target plus PICkit Serial Analyzer exceeds this current limit, the USB port will turn off. The target may be powered externally if more power is required. DS51647A-page 38 SPI CONFIGURE COMMUNICATIONS MODE – BASIC VIEW CAUTION , the user to verify the DC CAUTION or a user selectable DC © 2007 Microchip Technology Inc. ...

  • Page 45

    ... Clock Polarity – SPI transaction configuration: Clock Polarity • Auto Output Disable – Disables output during input. Allows the SDI lines and the SDO lines to be shorted for 3-wire communication. © 2007 Microchip Technology Inc. SPI Master Communications SPI CONFIGURE COMMUNICATIONS MODE – ADVANCED ...

  • Page 46

    ... The “x” indicates the value is a hexadecimal number. Clicking on “x” will toggle “d” indicating that the value is a decimal number. The commands will be logged in the Transactions window. A listing of the command abbreviations is given in Table 5-2. FIGURE 5-3: DS51647A-page 40 SPI BASIC OPERATIONS © 2007 Microchip Technology Inc. ...

  • Page 47

    ... Execute button will send the Write command (0x02), the memory address (0x00), followed by three bytes of data: 0xAA, 0xBB, and 0xCC. The command will be logged in the Transactions window. © 2007 Microchip Technology Inc. SPI Master Communications SPI BASIC OPERATIONS SEEPROM EXAMPLE – WREN COMMAND ...

  • Page 48

    ... Builder window is opened by selecting Communications > Script > Script Builder from the menu bar. The Script Builder is shown in Figure 5-8. The Script Builder window is divided into four columns as shown in Figures 5-9 through 5-12. DS51647A-page 42 SEEPROM EXAMPLE – WRITE BYTES SEEPROM EXAMPLE – READ BYTES © 2007 Microchip Technology Inc. ...

  • Page 49

    ... To load the example script into the Script Detail column, either double click or right click and select from the local menu. © 2007 Microchip Technology Inc. SPI Master Communications SPI SCRIPT BUILDER SPI SCRIPT BUILDER – SCRIPT COMMANDS ...

  • Page 50

    ... User Scripts can be deleted by right clicking and selecting Delete Script from the local menu. DS51647A-page 44 SPI SCRIPT BUILDER – EXAMPLE SCRIPTS Example Scripts 2 I C™ SCRIPT BUILDER – SCRIPT DETAIL Script Detail © 2007 Microchip Technology Inc. ...

  • Page 51

    ... A complete listing of the available macro commands is given in Table 5-2. The macro command abbreviation will be displayed in the Transactions Window. The Transactions window keeps a running log of the commands and data sent to and from the target device. © 2007 Microchip Technology Inc. SPI Master Communications SPI SCRIPT BUILDER – USER SCRIPTS CAUTION ...

  • Page 52

    ... Input data. Next byte is the byte count. [DO] Output data. Next byte is the byte count, followed by the data. [DIO] Output data [SI] Set SDO pin to Input (tri-state) [SO] Set SDO pin to Output [I_] Initialize SPI controller [CSON] Assert CS (active-low) [CSOF] De-assert CS (active-low) Description © 2007 Microchip Technology Inc. ...

  • Page 53

    ... Iterations box and the delay in millisecond in the Delay box. A summary of the iterations is displayed in the left column. The macro is executed when the Iteration button is clicked. FIGURE 5-15: © 2007 Microchip Technology Inc. SPI Master Communications SPI SCRIPT EXECUTE SPI SCRIPT EXECUTE – EXAMPLE ...

  • Page 54

    ... PICkit™ Serial Analyzer User’s Guide NOTES: DS51647A-page 48 © 2007 Microchip Technology Inc. ...

  • Page 55

    ... A USART Asynchronous Communications tutorial is available on the Microchip Technology web site. Click on the links: Support -> Getting Started -> PIC MCU Tutorials -> USART - Using in Asynchronous Mode • Several application notes are available on the Microchip Technology web site. Click on links: Design -> App Notes -> Function: Communication -> USART 6.2 ...

  • Page 56

    ... The target can be powered variable voltage. Even though the voltage can be set as low required operating voltage of the target device. DS51647A-page 50 USART ASYNCHRONOUS CONFIGURE COMMUNICATIONS MODE – BASIC VIEW CAUTION , the user to verify the user selectable DC © 2007 Microchip Technology Inc. ...

  • Page 57

    ... AUX1 Direction – AUX1 communication line – direction: 1: input, 0: output • AUX2 Direction – AUX2 communication line – direction: 1: input, 0: output • Async Receive Disabled – Received Data is disabled © 2007 Microchip Technology Inc. CAUTION USART ASYNCHROUNOUS CONFIGURE COMMUNICATIONS MODE – ADVANCED VIEW ...

  • Page 58

    ... The Script Builder window is opened by selecting Communications > Script > Script Builder from the menu bar. The Script Builder is shown in Figure 6-4. The Script Builder window is divided into four columns as shown in Figures 6-5 through 6-8. DS51647A-page 52 USART ASYNCHRONOUS BASIC OPERATIONS © 2007 Microchip Technology Inc. ...

  • Page 59

    ... Show Array – Displays a spreadsheet-like table in which large amounts of data may be entered. This data can be included in the script by right clicking in a Script Detail cell and choosing “Insert Array”. FIGURE 6-5: © 2007 Microchip Technology Inc. USART ASYNCHRONOUS SCRIPT BUILDER USART ASYNCHRONOUS SCRIPT BUILDER – SCRIPT COMMANDS ...

  • Page 60

    ... Note: The “x” indicates the value is a hexidecimal number. Clicking on “x” will toggle “d” indicating that the value is a decimal number. DS51647A-page 54 USART ASYNCHRONOUS SCRIPT BUILDER – EXAMPLE SCRIPTS Example Scripts © 2007 Microchip Technology Inc. ...

  • Page 61

    ... Scripts are created by placing the cursor into the Script Detail column and right clicking. A local menu will be displayed as shown in Figure 6-9. Select from the choice of commands or script macro commands. © 2007 Microchip Technology Inc. USART ASYNCHRONOUS SCRIPT BUILDER – SCRIPT DETAIL Script Detail USART ASYNCHRONOUS SCRIPT BUILDER – ...

  • Page 62

    ... Send Break, then data byte. Next byte is the data byte. [BD] Set BAUD Rate. Next byte is BAUD (LSB) followed by BAUD (MSB). [9S] Set 9-bit Data mode [9R] Reset 9-bit Data mode (sets 8-bit) [CS] Set CLOCK POLARITY bit Description © 2007 Microchip Technology Inc. ...

  • Page 63

    ... Assignable Buttons in the right column. The script will be executed once each time the button is clicked. The Assignable Buttons can be cleared by clicking on the Clear Buttons button. © 2007 Microchip Technology Inc. USART SCRIPT MACRO COMMANDS (CONTINUED) [CR] Reset CLOCK POLARITY bit ...

  • Page 64

    ... Iteration button in the left column. The number of iterations is entered in the Iterations box and the delay in milliseconds in the Delay box. A summary of the iterations is displayed in the left column. The macro is executed when the Iteration button is clicked. FIGURE 6-11: DS51647A-page 58 USART ASYNCHRONOUS SCRIPT EXECUTE – EXAMPLE © 2007 Microchip Technology Inc. ...

  • Page 65

    ... Configuration Wizard – Select PICkit Serial Analyzer > Run Configuration Wizard from the menu bar Menu Bar – Select PICkit Serial Analyzer > Select Communications Mode > USART Synchronous Master © 2007 Microchip Technology Inc. PICkit™ SERIAL ANALYZER USART SYNCHRONOUS MASTER PIN ASSIGNMENTS Label ...

  • Page 66

    ... USB port will turn off. The target may be powered externally if more power is required. DS51647A-page 60 USART SYNCHRONOUS MASTER CONFIGURE COMMUNICATIONS MODE – BASIC VIEW CAUTION , the user to verify the DC CAUTION or a user selectable DC © 2007 Microchip Technology Inc. ...

  • Page 67

    ... AUX1 Direction – AUX1 communication line – direction: 1: input, 0: output • AUX2 Direction – AUX2 communication line – direction: 1: input, 0: output • Clock Polarity – Checked means the polarity is inverted, unchecked means it is not © 2007 Microchip Technology Inc. USART SYNCHRONOUS MASTER CONFIGURE COMMUNICATIONS MODE – ADVANCED VIEW DS51647A-page 61 ...

  • Page 68

    ... The Script Builder window is opened by selecting Communications > Script > Script Builder from the menu bar. The Script Builder is shown in Figure 7-4. The Script Builder window is divided into four columns as shown in Figures 7-5 through 7-8. DS51647A-page 62 USART SYNCHRONOUS MASTER BASIC OPERATIONS © 2007 Microchip Technology Inc. ...

  • Page 69

    ... To load the example script into the Script Detail column, either double click or right click and select from the local menu. © 2007 Microchip Technology Inc. USART SYNCHRONOUS MASTER SCRIPT BUILDER USART SYNCHRONOUS MASTER SCRIPT BUILDER – ...

  • Page 70

    ... To load a user script from the User Scripts column into the Script Detail column, the user can double click or right click and select from the local menu. DS51647A-page 64 USART SYNCHRONOUS MASTER SCRIPT BUILDER – EXAMPLE SCRIPTS Example Scripts USART SYNCHRONOUS MASTER SCRIPT BUILDER – SCRIPT DETAIL Script Detail © 2007 Microchip Technology Inc. ...

  • Page 71

    ... A complete listing of the available macro commands is given in Table 7-2. The macro command abbreviation will be displayed in the Transactions Window. The Transactions window keeps a running log of the commands and data sent to and from the target device. © 2007 Microchip Technology Inc. USART SYNCHRONOUS MASTER SCRIPT BUILDER – USER SCRIPTS CAUTION ...

  • Page 72

    ... Set Aux1 direction to Output [A1IN] Set Aux1 direction to Input [A1W0] Aux1 Wait 0 [A1W1] Aux1 Wait 1 [A2RST] Reset Aux2 [A2RST] Set Aux2 [A2OUT] Set Aux2 direction to Output [A2IN] Set Aux2 direction to Input [A2W0] Aux2 Wait 0 [A2W1] Aux2 Wait 1 Description © 2007 Microchip Technology Inc. ...

  • Page 73

    ... Delay box. A summary of the iterations is dis- played in the left column. The macro is executed when the Iteration button is clicked. FIGURE 7-11: © 2007 Microchip Technology Inc. USART ASYNCHRONOUS SCRIPT EXECUTE USART ASYNCHRONOUS SCRIPT EXECUTE – EXAMPLE ...

  • Page 74

    ... PICkit™ Serial Analyzer User’s Guide NOTES: DS51647A-page 68 © 2007 Microchip Technology Inc. ...

  • Page 75

    ... 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. © 2007 Microchip Technology Inc. PICkit™ SERIAL ANALYZER CONVERSION FORMULA . The slope is the constant value used to convert between the ...

  • Page 76

    ... Once the parameter(s) are entered, they can be saved as a User Defined Parameter file (*.udp). • Open File – Open an existing User Defined Parameter file (*.udp) • Save/Replace – Save a User Defined Parameter file (*.udp) • Reset Array – Resets (clears) all parameter boxes DS51647A-page 70 PARAMETER TEMPLATE © 2007 Microchip Technology Inc. ...

  • Page 77

    ... Clicking on the Execute All button will execute each of the individual buttons in order from top to bottom. The executed scripts will be logged in the Transactions window. Clicking on the Clear All button will clear the values in the boxes. © 2007 Microchip Technology Inc. User Defined Templates SELECTING MY TEMPLATES MY TEMPLATES – ...

  • Page 78

    ... PICkit™ Serial Analyzer User’s Guide NOTES: DS51647A-page 72 © 2007 Microchip Technology Inc. ...

  • Page 79

    ... Data streams associated with PICkit™ Serial Analyzer are formatted with markers called “TAG” bytes. A TAG may be stand-alone or accompanied by data. As seen in Table 9-1, the data stream for each state controller has a set of associated TAG bytes defined in detail later in the document. © 2007 Microchip Technology Inc. PICkit™ SERIAL ANALYZER ARCHITECTURE ARCHITECTURE ...

  • Page 80

    ... EXEC command TAG(s) – interpreted by EXEC EXEC data TAG(s) – generated by EXEC COMM command TAG)(s) – interpreted by COMM COMM data TAG(s) – generated by COMM CONTROL BLOCK EXEC section Generic COMM section Protocol specific communication section Definition Definition © 2007 Microchip Technology Inc. ...

  • Page 81

    ... TAG byte 0x01 signifies that the following byte is one of the commands listed in Table 9-5. © 2007 Microchip Technology Inc. PICkit™ Serial Analyzer Firmware STATUS BLOCK EXEC section Generic COMM section Protocol specific communication section EXEC COMMAND (ECMD) TAG BYTES ...

  • Page 82

    ... CBUF2 flush count threshold [e.g., CBUF2 > N bytes then flush] CBUF2 flush interval [res: 409 μs, min: 409 μs, max: 104 μs] a 7:0 value of ‘0’ defaults to ‘1’, (i.e., the minimum) 7:0 7:0 7:0 Description Description © 2007 Microchip Technology Inc. ...

  • Page 83

    ... EXEC data TAG bytes identify data streams sent from the EXEC block back to the host software. TABLE 9-9: TAG/EDATA 0x80 0x81 0x82 0x83 0x84 0x85 0x86 © 2007 Microchip Technology Inc. PICkit™ Serial Analyzer Firmware LED CONFIGURATION Mode M = CFG[7: CFG[ On Off On Off 10 initial state On Off ...

  • Page 84

    ... CBUF3 overflow 4 Data error (e.g. illegal TAG, missing TAG-dependent data, etc.) 5 Restore control block failed – defaults used 6 7 Composite error 7:0 7:0 7:0 Description 0 TAG 1 Configuration byte Data: from CBUF3 0 TAG 1 Data: arbitrary packet ID# Description © 2007 Microchip Technology Inc. ...

  • Page 85

    ... Microchip Technology Inc. PICkit™ Serial Analyzer Firmware COMM SCRIPT COMMAND TAG BYTES LEN Name 16 RESERVED Reserved 3 Wait-1 Wait for time interval 2 LED1 Configure LED1 ...

  • Page 86

    ... Byte count (N) 2 Data Data 0 TAG 1 Loop number 0 TAG 1 Time LSB 2 Time MSB [res: 409 usec, max: 26.8 sec] 0 TAG 0 TAG 1 Loop count (LSB) 2 Loop count (MSB) 0 TAG 0 TAG 0 TAG 0 TAG 0 TAG 1 STATUS_BLOCK[04] 0 TAG 0 TAG 1 MARKER © 2007 Microchip Technology Inc. ...

  • Page 87

    ... TABLE 9-13: Byte © 2007 Microchip Technology Inc. PICkit™ Serial Analyzer Firmware COMM SCRIPT CONTROL BLOCK Bit Description COMM: GENERAL 7:0 COMM mode: 00: IDLE 2 01 02: SPI-M 04: USART-A 05: USART-SM 7:0 COMM control bits Enable event markers – global Enable event markers – time stamp ...

  • Page 88

    ... Executing WAIT instruction “End-of-Script” TAG encountered 7:0 COMM mode 7:0 VSRC Measurement (0-255) 7:0 7:0 7:0 7 protocol. See the I 2 CONNECTOR PINOUT MODE Pin specification for proto bus only. It will Description — SDA SCL — © 2007 Microchip Technology Inc. ...

  • Page 89

    ... TABLE 9-16: Byte © 2007 Microchip Technology Inc. PICkit™ Serial Analyzer Firmware CONTROL BLOCK Bit Description 2 COMM 7:0 Bit flags event marker enable: Start bit event marker enable: Stop bit event marker enable: Restart bit event marker enable: ack event marker enable: nack tx ...

  • Page 90

    ... BIT RATE CODE currently in use 2 C read data as well as ‘event marker’ TAGs that mark the 2 C transaction (e.g., TAG: 0x81 indicates a “Start” bit trans bus. The return © 2007 Microchip Technology Inc. ...

  • Page 91

    ... An example of a data stream in the script buffer that would direct the COMM back to communicate in I Under test is as follows: 0x81 0x84 0x02 0xA8 0x01 0x83 0x84 0x01 0xA9 0x89 0x01 0x82 © 2007 Microchip Technology Inc. PICkit™ Serial Analyzer Firmware ‘CMD’ TAG BYTES LEN Name CM_INIT Initialize master ...

  • Page 92

    ... BYTE transmit 2 I CM_EVENT_BYTE_RX BYTE transmit 2 I CM_EVENT_XACT_ERR transaction error 2 I CM_EVENT_STATUS_ERR status error 2 C slave address (with 2 C Description 0 CDATA-TAG 0 CDATA-TAG 0 CDATA-TAG 0 CDATA-TAG 0 CDATA-TAG 0 CDATA-TAG 0 CDATA-TAG 0 CDATA-TAG 1 data 0 CDATA-TAG 1 data 0 CDATA-TAG 1 error byte 0 CDATA-TAG 1 error byte © 2007 Microchip Technology Inc. ...

  • Page 93

    ... TABLE 9-21: Byte © 2007 Microchip Technology Inc. PICkit™ Serial Analyzer Firmware CONNECTOR PINOUT IN SPI MODE SPI CONTROL BLOCK Bit Description COMM: SPI 7:0 Bit flags Event marker enable: read byte Event marker enable: write byte Event marker enable: status error ...

  • Page 94

    ... BIT RATE: Scaling (ref: section: x.x.x) Scale Total Scale Bit Rate Value Value 1 8 2.500 MHz 256 2048 9.766 kHz 1 32 0.625 MHz 256 8192 2.441 kHz 1 128 0.156 MHz 256 32768 0.610 kHz Description © 2007 Microchip Technology Inc. ...

  • Page 95

    ... TABLE 9-25: TAG/CDATA 0x80 0x81 0x82 © 2007 Microchip Technology Inc. PICkit™ Serial Analyzer Firmware SPI ‘CMD’ TAG BYTES LEN Name 1 SPI_MODE_IDLE Set to IDLE 2 SPI_INIT_MODE Initialize SPS controller as per DATA 3 SPI_BITRATE ...

  • Page 96

    ... PICkit™ Serial Analyzer. Select the baud rate according to the BRG table. TABLE 9-26: Pin TABLE 9-27: Pin DS51647A-page 90 CONNECTOR PINOUT IN USART ASYNCHRONOUS MODE Description CONNECTOR PINOUT IN USART SYNCHRONOUS MODE Description — — RX Clock + — — Data © 2007 Microchip Technology Inc. ...

  • Page 97

    ... TABLE 9-29: BAUD 300 1200 4800 9600 19200 28800 57600 115200 © 2007 Microchip Technology Inc. PICkit™ Serial Analyzer Firmware USART CONTROL BLOCK Bit Description COMM: USART 7:0 7:0 0 Clock polarity (default high-low at beginning of bit cell low-high 9-bit word length (default) ...

  • Page 98

    ... INIT error (bad “mode” Composite error 7:0 7:0 0 Clock polarity (default high-low at beginning of bit cell low-high 9-bit word length (default Async receive enable 7:0 7:0 7:0 7:0 BRG (BAUD) default (LSB) 7:0 BRG (BAUD) default (MSB) © 2007 Microchip Technology Inc. ...

  • Page 99

    ... TAG/ LEN CCMD 0x80 0x81 0x82 N+2 0x83 0x84 0x85 0x86 0x87 0x88 0x89 0x8A 0x8B 0x8C © 2007 Microchip Technology Inc. PICkit™ Serial Analyzer Firmware USART ‘CMD’ TAG BYTES Name 1 USART_INIT 1 USART_RESET USART_DATA_XMT 2 USART _DATA_ARCV 1 USART_DATA_SRCV_ENABLE 1 USART_DATA_SRCV_DISABLE 1 USART_BREAK_XMT ...

  • Page 100

    ... TABLE 9-32: TAG/ LEN CDATA 0x80 0x81 0x82 0x83 DS51647A-page 94 USART ‘DATA’ TAG BYTES Name 2 USART_EVENT_BYTE_TX 2 USART_EVENT_BYTE_RX 2 USART_EVENT_STATUS_ERR 1 USART_EVENT_BREAK_TX Description BYTE transmit TAG 0 data 1 BYTE received TAG 0 data 1 Status error TAG 0 error byte 1 BREAK transmitted TAG 0 © 2007 Microchip Technology Inc. ...

  • Page 101

    ... PICkitS.Basic.Retrieve_USART_Data PICkitS.Basic.Send_I2CRead_Cmd PICkitS.Basic.Send_I2CWrite_Cmd PICkitS.Basic.Send_SPI_Receive_Cmd PICkitS.Basic.Send_SPI_Send_Cmd PICkitS.Basic.Send_USART_Cmd 10.3.1 PICkitS.Basic.Cleanup() Returns: Inputs: Description: © 2007 Microchip Technology Inc. PICkit™ SERIAL ANALYZER FUNCTIONS Void None Shuts down communication threads and closes file handles. Must be performed prior to closing host application. USER’S GUIDE DS51647A-page 95 ...

  • Page 102

    ... True if successful, False if not None Attempts to establish communication with PICkit™ Serial Analyzer and initial- ize communication threads used by class library. If multiple PICkit™ Serial Analyzers are attached to host PC, function will only initialize first one it finds. 2 I2C_M (I C Master) © 2007 Microchip Technology Inc. ...

  • Page 103

    ... PICkitS.Basic.Send_I2CWrite_Cmd(byte p_slave_addr, byte p_start_data_addr,byte p_num_bytes_to_write, ref byte[] p_data_array,ref string p_script_view) Returns: Inputs: © 2007 Microchip Technology Inc. PICkit™ Serial Analyzer DLL True if successful, False if not None Attempts to clear status flags set during a read or write error by issuing cold then warm Resets while preserving control block contents. Issue this function call after a read or write failure ...

  • Page 104

    ... Get_Status_Packet. True if successful, False if not byte p_bytes_count - number of bytes to send byte[] p_data- data to send to USART bus string p_script_view - reference to a string to which will be copied a formatted view of the command sends data from p_data array to USART bus. © 2007 Microchip Technology Inc. ...

  • Page 105

    ... Add a button, change the text to “Read One Byte” and double click it creating the sub Button1_Click. 11. Add the following code to Button1_Click: Dim Return_String Dim Return_Data(1) Dim Slave_Addr Dim Word_addr © 2007 Microchip Technology Inc. PICkit™ Serial Analyzer DLL ® TEXT BOXES AND LABELS AsString = vbNullString AsByte AsByte = Convert.ToByte(TextBox_Slave_Addr.Text) AsByte = Convert.ToByte(TextBox_Word_Addr.Text) ...

  • Page 106

    ... TextBox_Result.Text = Return_Data(0).ToString() 12. Build the project by pressing F6. 13. Fix any typos and rebuild if necessary. 14. Press the Run button to execute the program. 15. Enter the slave address and the word address to read one byte of data. DS51647A-page 100 Return_Data, Return_String) © 2007 Microchip Technology Inc. ...

  • Page 107

    ... Then select the check box next to “Microsoft Windows Update” and click Next. Windows will automatically install the appropriate driver. Do not use Microchip’s MPLAB © 2007 Microchip Technology Inc. PICkit™ SERIAL ANALYZER ® ...

  • Page 108

    ... PICkit™ Serial Analyzer User’s Guide ® Microsoft Windows Question Can I run on Windows Answer No. These operating systems either do not support USB or have drivers that are not compatible. DS51647A-page 102 ® 95/98/NT ® 95/98/NT? © 2007 Microchip Technology Inc. ...

  • Page 109

    ... Appendix A. PICkit Serial Analyzer Schematics A.1 INTRODUCTION This appendix contains the PICkit Serial Management hardware diagrams. FIGURE A-1: PICkit™ SERIAL ANAYLZER SCHEMATIC (SHEET © 2007 Microchip Technology Inc. PICkit™ SERIAL ANALYZER USER’S GUIDE DS51647A-page 103 ...

  • Page 110

    ... PICkit™ Serial Analyzer User’s Guide FIGURE A-2: PICkit™ SERIAL ANALYZER SCHEMATIC (SHEET DS51647A-page 104 © 2007 Microchip Technology Inc. ...

  • Page 111

    ... FIGURE A-3: SILKSCREEN FIGURE A-4: TOP COPPER FIGURE A-5: BOTTOM COPPER © 2007 Microchip Technology Inc. PICkit Serial Analyzer Schematics DS51647A-page 105 ...

  • Page 112

    ... PICkit™ Serial Analyzer User’s Guide NOTES: DS51647A-page 106 © 2007 Microchip Technology Inc. ...

  • Page 113

    ... Reset. Each Interrupt Service Routine is called sequentially and continuously from the MAIN Idle loop. Interrupt Service Routine is provided for the I other modules are serviced in turn from the MAIN ‘Idle loop’. © 2007 Microchip Technology Inc. PICkit™ SERIAL ANALYZER USER’S 2 C™ ...

  • Page 114

    ... C™ Demo responds to three I DEVICE SLAVE ADDRESSES NAME RTC Device emulation: Real-Time Clock EEPROM Device emulation: EEPROM EXEC Supervisory features 2 C protocols described below. Each slave MASTER/SLAVE DEVICE LEGEND Slave Master 2 C slave addresses: DESCRIPTION © 2007 Microchip Technology Inc. ...

  • Page 115

    ... TABLE B-3: REG 0x00 RTC_CONFIG_1 0x01 RTC_CONFIG_2 0x02 RTC_SECONDS 0x03 RTC_MINUTES 0x04 RTC_HOURS 0x05 RTC_WEEKDAY 0x06 RTC_DAYS 0x07 RTC_MONTHS © 2007 Microchip Technology Inc. 2 C™ Demonstration Firmware 2 I C™ WRITE BYTE(S) DATA A A WORD-ADR [ C™ READ BYTE(S) WITH WORD ADDRESS DATA ...

  • Page 116

    ... C™ Demonstration emulates a serial EEPROM. Device SERIAL EEPROM OPERATION Write Operation Send Start Bit Send Control Byte w/Write Bit ACK YES (continue pseudo device provides features convenient for testing and dem C™ firmware. © 2007 Microchip Technology Inc. ...

  • Page 117

    ... EXEC_DISPLAY_RTC 0x84 EXEC_DISPLAY_PKSI 0x85 EXEC_DISPLAY_RESET 0x86 EXEC_DISPLAY_1SEC 0x87 EXEC_0x87 © 2007 Microchip Technology Inc. 2 C™ Demonstration Firmware TABLE B-4 EXECUTIVE (EXEC) WORD ADDRESSES NAME DESCRIPTION State of executive state controller bit force state controller to one of eight “entry points” specified by bits[2:0] ADC results of CHANNEL AN0 (potentiometer RP1) binary value representation of RTC “ ...

  • Page 118

    ... Off Off On Off Off Off On Off Off Off Off Off On Off On Off On Off Off TIMER1 TEST Write 0x81 to EXEC_REG_00 BUSY? YES EXEC_REG_03[bit 7] NO YES ERROR? EXEC_REG_03[bit 6] NO FAILED PASSED DS3 Off Off Off On Off Off Off © 2007 Microchip Technology Inc. ...

  • Page 119

    ... Second Blink Blink all LEDs in unison at 1-second intervals (i.e., 1 sec OFF, 1 sec ON, 1 sec OFF),...This feature uses time based on the Timer1 low-power oscillator and external 32 kHz tuning fork crystal. © 2007 Microchip Technology Inc. 2 C™ Demonstration Firmware 2 C bus has active pull-ups and ...

  • Page 120

    ... Fax: 886-3-572-6459 Taiwan - Kaohsiung Tel: 886-7-536-4818 Fax: 886-7-536-4803 Taiwan - Taipei Tel: 886-2-2500-6610 Fax: 886-2-2508-0102 Thailand - Bangkok Tel: 66-2-694-1351 Fax: 66-2-694-1350 © 2007 Microchip Technology Inc. EUROPE Austria - Wels Tel: 43-7242-2244-39 Fax: 43-7242-2244-393 Denmark - Copenhagen Tel: 45-4450-2828 Fax: 45-4485-2829 France - Paris Tel: 33-1-69-53-63-20 ...