background image

Mixed Signal PICtail™ Demo Board User’s Guide

DS51523A-page 34

 2004 Microchip Technology Inc.

;   7 852 1209

;   8 852 1336

;   9 852 1477

;   A 697 1633

;   B 770 1633

;   C 852 1633

;   D 941 1633

;   * 941 1209

;   # 941 1477

  if  ((_32_steps) & (Fosc_8000000)) | ((_16_steps) & (Fosc_4000000))

;

;*************************************************************************

;

;   Delay Calculation for Frequency Generation

;   Fosc = 8MHz   #steps = 32

;       OR

;   Fosc = 4MHz   #steps = 16

;

;   X = Fosc / ( 4 * #steps * Ftone)

;

;

F_Low_table

  addwf   PCL,F

    ;X  Actual    Desired   %Error

  retlw .66 ;947.0    941   .63%

  retlw .90 ;694.4    697   .37%

  retlw .90 ;694.4    697   .37%

  retlw .90 ;694.4    697   .37%

  retlw .81 ;771.6    770   .21%

  retlw .81 ;771.6    770   .21%

  retlw .81 ;771.6    770   .21%

  retlw .73 ;856.2    852   .49%

  retlw .73 ;856.2    852   .49%

  retlw .73 ;856.2    852   .49%

  retlw .90 ;694.4    697   .37%

  retlw .81 ;771.6    770   .21%

  retlw .73 ;856.2    852   .49%

  retlw .66 ;947.0    941   .63%

  retlw .66 ;947.0    941   .63%

  retlw .66 ;947.0    941   .63%

F_High_table

  addwf PCL,F

    ;X  Actual    Desired   %Error

  retlw .47 ;1329.8   1336    .47%

  retlw .52 ;1201.9   1209    .59%

  retlw .47 ;1329.8   1336    .47%

  retlw .42 ;1488.1   1477    .75%

  retlw .52 ;1201.9   1209    .59%

  retlw .47 ;1329.8   1336    .47%

  retlw .42 ;1488.1   1477    .75%

  retlw .52 ;1201.9   1209    .59%

  retlw .47 ;1329.8   1336    .47%

  retlw .42 ;1488.1   1477    .75%

  retlw .38 ;1644.7   1633    .72%

  retlw .38 ;1644.7   1633    .72%

  retlw .38 ;1644.7   1633    .72%

  retlw .38 ;1644.7   1633    .72%

  retlw .52 ;1201.9   1209    .59%

Summary of Contents for PICtail

Page 1: ...2004 Microchip Technology Inc DS51523A Mixed Signal PICtail Demo Board User s Guide...

Page 2: ...mentioned herein are property of their respective companies 2004 Microchip Technology Incorporated Printed in the U S A All Rights Reserved Printed on recycled paper Note the following details of the...

Page 3: ...eration 7 2 1 Introduction 7 2 2 Features 7 2 3 Getting Started 7 2 4 Running the demos 13 Appendix A Schematics and Layouts 17 A 1 Introduction 17 Appendix B Bill Of Materials BOM 25 Appendix C Mixed...

Page 4: ...Mixed Signal PICtail Demo Board User s Guide DS51523A page iv 2004 Microchip Technology Inc NOTES...

Page 5: ...ools and documentation are constantly evolving to meet customer needs so some actual dialogs and or tool descriptions may differ from those in this document Please refer to our web site www microchip...

Page 6: ...DAC_dtmf asm Source Code Example assembly source firmware used to generate Dual Tone Multiple Frequency DTMF signals This firmware is utilized by the Main firmware MixedSignal_v100 ASM Appendix E Mix...

Page 7: ...racters A dialog button Click OK A tab Click the Power tab bnnnn A binary number where n is a digit b00100 b10 Text in angle brackets A key on the keyboard Press Enter F1 Courier font Plain Courier Sa...

Page 8: ...wer A D Converter with SPI Serial Interface Data Sheet DS21697 Provides detailed information regarding the MCP3302 and MCP3304 devices MCP3204 3208 2 7V 12 Bit A D Converters with SPI Serial Interface...

Page 9: ...gs of Microchip sales offices distributors and factory representatives CUSTOMER SUPPORT Users of Microchip products can receive assistance through several channels Distributor or Representative Local...

Page 10: ...Mixed Signal PICtail Demo Board User s Guide DS51523A page 6 2004 Microchip Technology Inc NOTES...

Page 11: ...r these reasons The Mixed Signal PICtail Demo Board utilizes a 4 layer Printed Circuit Board PCB with attention paid to reducing system noise The Mixed Signal PICtail Demo Board can isolate a specific...

Page 12: ...Mixed Signal PICtail Demo Board User s Guide DS51523A page 8 2004 Microchip Technology Inc NOTES...

Page 13: ...pported via the RJ11 connector The 14 pin header is designed to seamlessly interface to the PICkit 1 Flash Starter Kit Firmware demonstrating DTMF generation on the MCP492X 482X DAC is included Firmwa...

Page 14: ...F REF198G U11 VREF for debugging MPLAB ICD J4 and programming PICkit 1 J1 J2 J3 Flash Starter Kit TC55 10V VIN MCP1701 10V VIN MCP1700 6V VIN VDD2 VIN 3 3 2 SPI CS0 SPI I2 C CS1 3 SPI I2 C VOUTA VOUTB...

Page 15: ...Reference MCP3551 I P 22 Bit ADC MCP4821 I SN MCP4822 I SN MCP4921 I SN 12 Bit SPI DAC JP3 VOUTB Selector JP5 MCP4X9X Part Selector MCP4922 I SL 12 Bit SPI DAC TC132X I MS 8 Bit 10 Bit I2 C DAC TC55R...

Page 16: ...O SPI Chip Select Signal for the External DACs Do not populate both the MCP492X and the MCP482X as they share the same CS0 signal LDAC 7 O Latches the DAC Output When Low Note the weak pull down resis...

Page 17: ...n the MCP492X Probe VOUTA and VOUTB to see the resulting waveforms 3 Mode0010 Send 400h and BFFh commands to generate a 100 Hz output on the MCP492X Probe VOUTA and VOUTB to see the resulting waveform...

Page 18: ...er the mode switch is changed to exit this mode 5 Mode1100 DAC 200h and Read with PIC16F767 10b ADC broadcast on USART AIN_C can be analyzed using Microchip s Data View analysis tool which along with...

Page 19: ...corresponding DIP switch is open The DIP switch is labeled with an arrow indicating the on or closed position of the switch When the DIP switch is on the I O pin is pulled down to VSS The default fir...

Page 20: ...is located in the center of the board farthest away from the PICmicro microcontroller and its MPLAB ICD 2 connector JP4 consists of three pairs of jumper pins The lower two pins are connected to the...

Page 21: ...signals enough to significantly reduce performance J7 is a SMA connector to allow a fully shielded connection from the ADC input VOUTD to your scope Appendix G Scope Probe Noise Captures illustrates t...

Page 22: ...Mixed Signal PICtail Demo Board User s Guide DS51523A page 18 2004 Microchip Technology Inc NOTES...

Page 23: ...Appendix A Schematics and Layouts A 1 INTRODUCTION This appendix contains the schematics and layouts for the Mixed Signal PICtail Demo Board Diagrams included in this appendix Board Schematic Board To...

Page 24: ...Mixed Signal PICtail Demo Board User s Guide DS51523A page 20 2004 Microchip Technology Inc FIGURE A 1 BOARD SCHEMATIC PAGE 1 M...

Page 25: ...Schematics and Layouts 2004 Microchip Technology Inc DS51523A page 21 FIGURE A 1 BOARD SCHEMATIC CONTINUED M...

Page 26: ...Mixed Signal PICtail Demo Board User s Guide DS51523A page 22 2004 Microchip Technology Inc FIGURE A 2 BOARD LAYOUT TOP SILK SCREEN LAYER...

Page 27: ...Schematics and Layouts 2004 Microchip Technology Inc DS51523A page 23 FIGURE A 3 BOARD LAYOUT POWER LAYER...

Page 28: ...Mixed Signal PICtail Demo Board User s Guide DS51523A page 24 2004 Microchip Technology Inc FIGURE A 4 BOARD LAYOUT TOP LAYER...

Page 29: ...Schematics and Layouts 2004 Microchip Technology Inc DS51523A page 25 FIGURE A 5 BOARD LAYOUT BOTTOM LAYER...

Page 30: ...Mixed Signal PICtail Demo Board User s Guide DS51523A page 26 2004 Microchip Technology Inc FIGURE A 6 BOARD LAYOUT GROUND LAYER...

Page 31: ...R SMD Lumex Opto Components Inc SML LX2832IC TR 2 J1 J2 Conn Header 14pos 100 Vert Tin Molex Waldom Electronics Corp 22 28 4140 1 J4 Conn Mod Jack 6 6 R A PCB 50AU AMP Tyco Electronics 520470 3 1 J5 C...

Page 32: ...12 TP1 TP2 TP3 TP4 TP5 TP6 TP7 TP8 TP9 TP10 TP11 TP12 PC Test Point Miniature SMT Keystone Electronics 5015 1 U1 Microcontroller 8 bit CMOS Flash with 10 bit A D Microchip Technology Inc MCP16F767 I S...

Page 33: ...100Hz R R output on the TC1321 Mode1010 Send 400h BFFh commands to generate a 100Hz output on the TC1321 Mode1011 DAC SHDN PIC SLEEP Mode1100 DAC 200h Read w PIC16F767 10b ADC broadcast on USART Mode1...

Page 34: ...Mixed Signal PICtail Demo Board User s Guide DS51523A page 30 2004 Microchip Technology Inc NOTES...

Page 35: ...lue relative to the zero cycle Error cycles will be X from the distribution s peak instead of from the zero cycle THEORY OF OPERATION LOOP TIMING LOW No update yet 6 cycles Update output w o resetting...

Page 36: ...ency F_High_Rolling RES 1 last value of TMR0 when F_High_Out was updated F_High_Step RES 1 SINE table index F_High_Out RES 1 Output duty cycle for F_High DTMF_Out RES 1 Output for DAC ToneLength RES 1...

Page 37: ...Y 127 128 Sin X 360 32 SINE_Table_32step_8bit addwf PCL F nop this location is never used since W 0 DT 127 152 176 198 218 233 245 253 DT 255 253 245 233 218 198 176 152 DT 127 102 78 56 36 21 9 1 DT...

Page 38: ...7 retlw 81 771 6 770 21 retlw 81 771 6 770 21 retlw 81 771 6 770 21 retlw 73 856 2 852 49 retlw 73 856 2 852 49 retlw 73 856 2 852 49 retlw 90 694 4 697 37 retlw 81 771 6 770 21 retlw 73 856 2 852 49...

Page 39: ...w 147 850 3 852 19 retlw 133 939 8 941 12 retlw 133 939 8 941 12 retlw 133 939 8 941 12 F_High_table addwf PCL F X Actual Desired Error retlw 94 1329 8 1336 47 retlw 103 1213 6 1209 37 retlw 94 1329 8...

Page 40: ...5 5 941 47 retlw 59 945 5 941 47 F_High_table addwf PCL F X Actual Desired Error retlw 42 1328 1 1336 59 retlw 46 1212 6 1209 30 retlw 42 1328 1 1336 59 retlw 38 1467 9 1477 61 retlw 46 1212 6 1209 30...

Page 41: ...retlw 121 retlw 134 retlw 148 retlw 121 retlw 133 retlw 148 retlw 163 retlw 163 retlw 163 retlw 163 retlw 121 retlw 148 endif if ToneLength_50 ToneLength_table addwf PCL F retlw 67 retlw 60 retlw 67 r...

Page 42: ...ermines if enough time has elapsed btfsc STATUS C goto test_F_High do not update the SINE wave yet movf F_Low W addwf F_Low_Rolling F Very Important to add to the last reference instead of using the a...

Page 43: ...omment this line for Low frequency Only addwf F_High_Out W uncomment this line for High frequency Only movf F_Low_Out W uncomment this line for Low frequency Only addwf F_Low_Out W comment this line f...

Page 44: ...Mixed Signal PICtail Demo Board User s Guide DS51523A page 40 2004 Microchip Technology Inc NOTES...

Page 45: ...DATABANK NAME sfr3 START 0x180 END 0x18F PROTECTED DATABANK NAME gpr0 START 0x20 END 0x5F DATABANK NAME DTMF START 0x60 END 0x6F DATABANK NAME gpr1 START 0xA0 END 0xEF DATABANK NAME gpr2 START 0x110 E...

Page 46: ...page0_2a ROM code space SECTION NAME DTMF_SUB ROM page0_2b ROM code space SECTION NAME MODE0001 ROM page0_3 ROM code space SECTION NAME MODE1000 ROM page0_4 ROM code space SECTION NAME OPEN ROM page0...

Page 47: ...s Guide 2004 Microchip Technology Inc DS51523A page 43 Appendix F DTMF Scope Captures FIGURE F 1 DTMF Tone 0 941 Hz 1336 Hz FIGURE F 2 DTMF Tone 1 697 Hz 1209 Hz FIGURE F 3 DTMF Tone 2 697 Hz 1336 Hz...

Page 48: ...4 2004 Microchip Technology Inc FIGURE F 5 DTMF Tone 4 770 Hz 1209 Hz FIGURE F 6 DTMF Tone 5 770 Hz 1336 Hz FIGURE F 7 DTMF Tone 6 770 Hz 1477 Hz FIGURE F 8 DTMF Tone 7 852 Hz 1209 Hz FIGURE F 9 DTMF...

Page 49: ...scope probe and short ground lead This illustrates the noise picked up by the scope probe and ground lead FIGURE G 2 Oscilloscope screen capture of VOUT_D using the SMA connector and coaxial cable dir...

Page 50: ...Mixed Signal PICtail Demo Board User s Guide DS51523A page 46 2004 Microchip Technology Inc NOTES...

Page 51: ...red DTMF Scope Captures FIGURE H 1 Mode1000b generates a 100 Hz 32 step sine wave on VOUT_C using the TC132X FIGURE H 2 Mode0000b generates DTMF waveforms to repeatedly dial a phone number VOUT_B illu...

Page 52: ...Mixed Signal PICtail Demo Board User s Guide DS51523A page 48 2004 Microchip Technology Inc NOTES...

Page 53: ...Inc DS51523A page 49 Appendix I MPLAB IDE Screen Capture FIGURE I 1 MPLAB IDE v6 62 screen capture of an example project to build and debug the included firmware Note the required files in the project...

Page 54: ...g SAR Tel 852 2401 1200 Fax 852 2401 3431 China Shanghai Tel 86 21 5407 5533 Fax 86 21 5407 5066 China Shenyang Tel 86 24 2334 2829 Fax 86 24 2334 2393 China Shenzhen Tel 86 755 8203 2660 Fax 86 755 8...

Page 55: ...ltera Analog Devices Intersil Interpoint Microsemi Aeroflex Peregrine Syfer Eurofarad Texas Instrument Miteq Cobham E2V MA COM Hittite Mini Circuits General Dynamics 8 812 309 58 32 8 812 320 02 42 or...

Reviews: