Signal Analysis PICtail™ Daughter Board User’s Guide 2004 Microchip Technology Inc.
Note the following details of the code protection feature on Microchip devices: • Microchip products meet the specification contained in their particular Microchip Data Sheet. • Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the intended manner and under normal conditions. • There are dishonest and possibly illegal methods used to breach the code protection feature.
SIGNAL ANALYSIS PICtail™ DAUGHTER BOARD USER’S GUIDE Table of Contents Preface ........................................................................................................................... 1 Chapter 1. Signal Analysis PICtail™ Daughter Board 1.1 Introduction ..................................................................................................... 7 1.2 Highlights ........................................................................................................ 7 1.
Signal Analysis PICtail™ Daughter Board User’s Guide NOTES: DS51476A-page iv 2004 Microchip Technology Inc.
SIGNAL ANALYSIS PICtail™ DAUGHTER BOARD USER’S GUIDE Preface INTRODUCTION This chapter contains general information about this user’s guide and customer support that will be useful prior to using the Signal Analysis PICtail Daughter Board.
Signal Analysis PICtail™ Daughter Board User’s Guide Conventions Used in This Guide This manual uses the following documentation conventions: DOCUMENTATION CONVENTIONS Description Represents Examples Code (Courier font): Plain characters Sample code Filenames and paths #define START c:\autoexec.bat Angle brackets: < > Variables
Preface WARRANTY REGISTRATION Please complete the enclosed Warranty Registration Card and mail it promptly. Sending in your Warranty Registration Card entitles you to receive new product updates. Interim software releases are available at the Microchip web site. RECOMMENDED READING This user’s guide describes how to use the Signal Analysis PICtail Daughter Board and the PICkit 1 Signal Analysis PC Application using the PICkit 1 Flash Starter Kit.
Signal Analysis PICtail™ Daughter Board User’s Guide Technical Support • Frequently Asked Questions (FAQ) • On-line Discussion Groups – conferences for products, development systems, technical information and more • Microchip Consultant Program Member Listing • Links to other useful web sites related to Microchip products Engineer’s Toolbox • Design Tips • Device Errata Other Available Information • Latest Microchip Press Releases • Listing of seminars and events • Job Postings DEVELOPMENT SYSTEMS CUSTOM
Preface CUSTOMER SUPPORT Users of Microchip products can receive assistance through several channels: • • • • • Distributor or Representative Local Sales Office Field Application Engineer (FAE) Corporate Applications Engineer (CAE) Hotline Customers should call their distributor, representative or field application engineer (FAE) for support. Local sales offices are also available to help customers. See the back cover for a list of sales offices and locations.
Signal Analysis PICtail™ Daughter Board User’s Guide NOTES: DS51476A-page 6 2004 Microchip Technology Inc.
SIGNAL ANALYSIS PICtail™ DAUGHTER BOARD USER’S GUIDE Chapter 1. Signal Analysis PICtail™ Daughter Board 1.1 INTRODUCTION This chapter introduces the Signal Analysis PICtail™ Daughter Board. It describes the PCB layout, parts and electrical connection to the PICkit 1 Flash Starter Kit. 1.2 HIGHLIGHTS This chapter discusses: • The Signal Analysis PICtail Daughter Board Contents • The Signal Analysis PICtail Daughter Board Hardware • The Acquisition Firmware 1.
Signal Analysis PICtail™ Daughter Board User’s Guide 1.4.1 PCB Layout and Parts Figure 1-1 shows the PCB layout of the Signal Analysis board. It is populated with a PIC16F684 and two 25LC640 serial EEPROM memory devices. The PIC16F684 I/O pins RC0, RC1 and RC3 are connected directly to test point connections on the edge of the PCB. These can be configured as comparator analog inputs (RC0/AN4, RC1/AN5), analog-to-digital converter inputs (RC0/AN4, RC1/AN5, RC3/AN7) or as digital input/output pins.
Signal Analysis PICtail™ Daughter Board 1.4.2 Electrical Connections Figure 1-2 shows how the Signal Analysis PICtail Daughter Board plugs into the PICkit 1 Flash Starter Kit expansion header J3. The Signal Analysis Board electrically detaches the PICkit 1 onboard LED array. The target PICmicro device is plugged into the Signal Analysis Board DIP socket U1. Remove any PICmicro devices from the Evaluation Socket on the PICkit 1 Flash Starter Kit.
Signal Analysis PICtail™ Daughter Board User’s Guide FIGURE 1-3: SIGNAL ANALYSIS ELECTRICAL CONNECTION BLOCK DIAGRAM Signal Analysis PICtail™ Daughter Board PICkit™ 1 Flash Starter Kit +5V PIC16C745 RB7 Personal USB Computer RC7 RC6 RA0 +5V Busy 28 18 17 +5V J3 13 7 8 +5V ICSPDAT ICSPCLK 13 7 8 13 12 RA0 RA1 2 VPP 3 Charge Pump Circuitry RC2 13 3 RA1 14 1.
Signal Analysis PICtail™ Daughter Board 1.5.2 Real-time Mode Real-time mode refers to the Signal Analysis Application mode that commands the PIC16F684 to perform one analog-to-digital (A/D) conversion from RC0/AN4 I/O port pin. The 10-bit conversion data is immediately sent to the PIC16C745 for transfer to the PC USB port. The Signal Analysis Application then displays the data in a real-time strip chart format. 1.5.
Signal Analysis PICtail™ Daughter Board User’s Guide NOTES: DS51476A-page 12 2004 Microchip Technology Inc.
SIGNAL ANALYSIS PICtail™ DAUGHTER BOARD USER’S GUIDE Chapter 2. Using the PICkit™ 1 Signal Analysis PC Application 2.1 INTRODUCTION This chapter explains the operation of the PICkit 1 Signal Analysis PC Application. The Signal Analysis PICtail Daughter Board works as an extension to the PICkit 1 Flash Starter Kit. When combined with PICkit 1 V2.0.
Signal Analysis PICtail™ Daughter Board User’s Guide 2. Connect the PICkit 1 Flash Starter Kit to a PC using a USB cable. 3. Execute the PICkit 1 Signal Analysis PC application. FIGURE 2-2: PICkit™ Programmer PICkit™ 1 SIGNAL ANALYSIS PC APPLICATION INTERFACE WINDOW Oscilloscope FFT Histogram Strip Chart 4. Click the PICkit Programmer icon. 5. Open File > Import HEX from the menu tool bar and select the “PICA2Dlab.hex” file. FIGURE 2-3: IMPORT HEX FILE 6.
Using the PICkit™ 1 Signal Analysis PC Application 2.4 MODE SELECTION The Mode selection determines how the Signal Analysis Application will perform analog-to-digital conversions (ADC) from the 10-bit ADC in the PIC16F684 and how they will be displayed. There are two mode selections; Real Time and Acquisition, as shown in Figure 2-4. FIGURE 2-4: MODE SELECTION In Real-time mode, data conversions are performed immediately and transmitted to the PC. The data is displayed on a real-time strip chart.
Signal Analysis PICtail™ Daughter Board User’s Guide 2.4.1.1 REAL-TIME NUMERIC VALUES The Real-time numeric values are displayed at the bottom of the Strip Chart window. These values show the results of the conversion as it is transmitted from the ADC (Figure 2-6). The value is displayed in Volts, Decimal, Hex and Binary formats. The display updates each time a conversion is completed.
Using the PICkit™ 1 Signal Analysis PC Application 2.4.3 Sample Size FFT accuracy increases with sample size. However, large sample sizes take longer to upload to the PC. To select different program memory space samples and sample speeds, use the Samples and Speed (sps) drop-down menus shown in Figure 2-9. FIGURE 2-9: 2.5 SAMPLES AND SPEED SELECTION OSCILLOSCOPE PLOT The Oscilloscope Plot shows the results of a conversion with respect to time.
Signal Analysis PICtail™ Daughter Board User’s Guide 2.6 FFT (FAST FOURIER TRANSFORM) The FFT displays the Fast Fourier Transformation of the data in the frequency domain. This display is typically used to analyze AC signals or to help locate the source of AC noise. FIGURE 2-11: FFT DISPLAY FFT Window Selection The size of the data set of the FFT analysis determines the resolution and accuracy of the FFT.
Using the PICkit™ 1 Signal Analysis PC Application Rectangular – Window is a rectangular shaped window. Every point of the time scale is multiplied by a constant. This window provides the best frequency resolution with the narrowest lobe width. Amplitude accuracy errors occur if frequency of observed signal has a non-integer number of cycles in the FFT time record.
Signal Analysis PICtail™ Daughter Board User’s Guide 2.7 HISTOGRAM The Histogram allows the user to observe the data taken from a conversion and determine the relative variation of the digital codes. The histogram plot shows the digital codes on the X-Axis and the number of occurrences for each code on the Y-Axis. The statical values of the data set are shown at the bottom of the window.
SIGNAL ANALYSIS PICtail™ DAUGHTER BOARD USER’S GUIDE Chapter 3. Lesson Projects 3.1 INTRODUCTION The Signal Analysis PICtail Daughter Board can capture a variety of DC and AC signals from the RC0/AN4 I/O port pin of the PIC16F684 using the internal 10-bit ADC. Ensure that the applied signal does not exceed 5V peak-to-peak. If the signal is DC, ensure that the voltage levels do not fall below 0V or exceed +5V.
Signal Analysis PICtail™ Daughter Board User’s Guide FIGURE 3-1: THERMISTOR SCHEMATIC +5V Thermistor 10 kΩ @ 25°C RC0 3.3kΩ FIGURE 3-2: DS51476A-page 22 THERMISTOR STRIP CHART DISPLAY 2004 Microchip Technology Inc.
Lesson Projects 3.4 LESSON 2 – PHOTODIODE A simple photodiode circuit can be constructed from the schematic shown in Figure 3-3. D1 is a Panasonic PNZ334 PIN photodiode. U1 is Microchip Technology MCP6001U op amp. R1 was chosen to be 64.9 kΩ so that VOUT ≈ 4.5V at the maximum IS, and VOUT ≈ 0V at the minimum IS. C3 is a 0.1 µF capacitor for good supply bypass performance. R2 and C2 form a low-pass filter for noise performance.
Signal Analysis PICtail™ Daughter Board User’s Guide DS51476A-page 24 FIGURE 3-4: PHOTODIODE OSCILLOSCOPE SCREEN CAPTURE FIGURE 3-5: PHOTODIODE FFT SCREEN CAPTURE 2004 Microchip Technology Inc.
Lesson Projects FIGURE 3-6: 2004 Microchip Technology Inc.
Signal Analysis PICtail™ Daughter Board User’s Guide 3.5 LESSON 3 – PULSE WIDTH MODULATED GENERATED SINE WAVE A sine wave can be generated from a low-pass filtered Pulse Width Modulated (PWM) signal. The duty cycle of the PWM signal is set to the magnitude of a sine wave at a prescribed sample rate. The sample rate sets the frequency of the sine wave. Figure 3-7 is an oscilloscope screen capture of the PWM signal. Persistence has been set on to capture the varying duty cycle.
SIGNAL ANALYSIS PICtail™ DAUGHTER BOARD USER’S GUIDE Chapter 4. Troubleshooting 4.1 INTRODUCTION This chapter describes common problems associated with using the Signal Analysis PICtail Daughter Board and steps on how to resolve them. 4.2 COMMON PROBLEMS 4.2.1 Programmer Not Found The PICkit 1 Signal Analysis PC Application was not able to communicate with the PICkit 1 Flash Starter Kit. Check that the USB cable is connected to the PICkit 1 Flash Starter Kit and the PC. FIGURE 4-1: 4.2.
Signal Analysis PICtail™ Daughter Board User’s Guide 4.2.3 End Device Must Have Acquisition Firmware Loaded The PICkit 1 Signal Analysis PC Application was not able to communicate with the firmware in the target PICmicro device on the Signal Analysis PICtail Daughter Board. Ensure that PICA2Dlab.hex has been programmed into the Signal Analysis PICtail Daughter Board. FIGURE 4-3: DS51476A-page 28 END DEVICE ACQUISITION FIRMWARE LOADED ERROR MESSAGE 2004 Microchip Technology Inc.
SIGNAL ANALYSIS PICtail™ DAUGHTER BOARD USER’S GUIDE Appendix A. Hardware Schematics A.1 INTRODUCTION This appendix contains the Signal Analysis PICtail Daughter Board Hardware Schematic Diagram. 2004 Microchip Technology Inc.
DS51476A-page 30 GND +5V RC0 RC1 TP1 TP2 TP3 TP4 TP5 +5V M0_CS SO RC3 RC5 C4 1.0 µF R1 1KΩ +5V SCK M0_CS M1_CS RA3/Vpp 1 CS 2 SO 3 WP 4 Vss U1 PIC16F684/P 8 7 6 5 +5V SCK SI C2 0.1µF VDD RA5/T1CKI/OSC1/CLKIN RA4/T1G/OSC2/AN3/CLKOUT RA3/MCLR/Vpp RC5/CCP1/P1A RC4/C2OUT/P1B RC3/AN7/P1C Vcc HOLD SCK SI U2 25LC640-I/P 1 2 3 4 5 6 7 C1 0.
Hardware Schematics NOTES: 2004 Microchip Technology Inc.
WORLDWIDE SALES AND SERVICE AMERICAS China - Beijing Korea Corporate Office Unit 706B Wan Tai Bei Hai Bldg. No. 6 Chaoyangmen Bei Str. Beijing, 100027, China Tel: 86-10-85282100 Fax: 86-10-85282104 168-1, Youngbo Bldg. 3 Floor Samsung-Dong, Kangnam-Ku Seoul, Korea 135-882 Tel: 82-2-554-7200 Fax: 82-2-558-5932 or 82-2-558-5934 China - Chengdu 200 Middle Road #07-02 Prime Centre Singapore, 188980 Tel: 65-6334-8870 Fax: 65-6334-8850 2355 West Chandler Blvd.