Microchip Technology MCP47CXBX8 User Manual
Microchip Technology MCP47CXBX8 User Manual

Microchip Technology MCP47CXBX8 User Manual

1lsb octal dac evaluation board

Advertisement

Quick Links

1LSb Octal DAC
Evaluation Board
User's Guide
 2021 Microchip Technology Inc. and its subsidiaries
DS50003218A

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the MCP47CXBX8 and is the answer not in the manual?

Questions and answers

Summary of Contents for Microchip Technology MCP47CXBX8

  • Page 1 1LSb Octal DAC Evaluation Board User’s Guide  2021 Microchip Technology Inc. and its subsidiaries DS50003218A...
  • Page 2 Microchip Technology Inc. in other countries. stated. GestIC is a registered trademark of Microchip Technology Germany II GmbH & Co. KG, a subsidiary of Microchip Technology Inc., in other countries. All other trademarks mentioned herein are property of their respective companies.
  • Page 3: Table Of Contents

    A.2 Board – Schematics ..................40 A.3 Board – Top Assembly Drawing ..............41 A.4 Board – Bottom Assembly Drawing ............. 41 Appendix B. Bill of Materials (BOM) Worldwide Sales and Service ..................45  2021 Microchip Technology Inc. and its subsidiaries DS50003218A-page 3...
  • Page 4 1LSb Octal DAC Evaluation Board User’s Guide  2021 Microchip Technology Inc. and its subsidiaries DS50003218A-page 4...
  • Page 5: Notice To Customers

    • Document Revision History DOCUMENT LAYOUT This document describes how to use the 1LSb Octal DAC Evaluation Board to demon- strate the performance of the MCP47CXBX8/MCP48CXBX8 DAC family. The manual layout is as follows: • Chapter 1. “Product Overview” – Provides quick, step-by-step information on setting up the 1LSb Octal DAC Evaluation Board.
  • Page 6: Conventions Used In This Guide

    Choice of mutually exclusive errorlevel {0|1} character: { | } arguments; an OR selection Ellipses... Replaces repeated text var_name [, var_name...] Represents code supplied by void main (void) user { ...  2021 Microchip Technology Inc. and its subsidiaries DS50003218A-page 6...
  • Page 7: Recommended Reading

    (FAE) for support. Local sales offices are also available to help customers. A listing of sales offices and locations is included in the back of this document. Technical support is available through the website at: http://www.microchip.com/support.  2021 Microchip Technology Inc. and its subsidiaries DS50003218A-page 7...
  • Page 8: Document Revision History

    1LSb Octal DAC Evaluation Board User’s Guide DOCUMENT REVISION HISTORY Revision A (November 2021) • Initial release of this document.  2021 Microchip Technology Inc. and its subsidiaries DS50003218A-page 8...
  • Page 9: Chapter 1. Product Overview

    INTRODUCTION This chapter provides an overview of the 1LSb Octal DAC Evaluation Board. The MCP47CXBX8/MCP48CXBX8 is a 12-bit, 1 LSb DAC. The devices offer two mem- ory options: MCP47CVBX8/MCP48CVBX8 devices have volatile memory, while the MCP47CMBX8/MCP47CMBX8 have 32-times programmable nonvolatile memory (MTP).The devices operate from a single supply voltage of 2.7V to 5.5V for full...
  • Page 10 1LSb Octal DAC Evaluation Board User’s Guide FIGURE 1-1: 1LSb OCTAL DAC EVALUATION BOARD (TOP VIEW) FIGURE 1-2: 1LSb OCTAL DAC EVALUATION BOARD (BOTTOM VIEW)  2021 Microchip Technology Inc. and its subsidiaries DS50003218A-page 10...
  • Page 11: 1Lsb Octal Dac Evaluation Board Features

    MCP47CXBX8 and MCP48CXBX8 DAC family. The user’s guide includes the code example required to communicate with the MCP47CXBX8 and MCP48CXBX8 DAC family. The code example provided in the guide is intended for use with the Microchip Curiosity HPC Development Board (DM164136).
  • Page 12 1LSb Octal DAC Evaluation Board User’s Guide NOTES:  2021 Microchip Technology Inc. and its subsidiaries DS50003218A-page 12...
  • Page 13: Chapter 2. Installation And Operation

    Download and install the MPLAB IDE and XC18 compiler from www.microchip.com. a) Open MPLAB IDE, go to the File menu and select “New Project...”. FIGURE 2-1: START A NEW PROJECT IN THE MPLAB IDE  2021 Microchip Technology Inc. and its subsidiaries DS50003218A-page 13...
  • Page 14 Select PIC18F47Q10 as the device and click Next. FIGURE 2-3: SELECT THE DEVICE d) From the “Select Tool” menu, choose “Curiosity/Starter Kits (PKOB4)” and click Next. FIGURE 2-4: SELECT THE TOOL  2021 Microchip Technology Inc. and its subsidiaries DS50003218A-page 14...
  • Page 15 Name the project, provide the project location and click Finish. g) From the File menu, select “New File...”. FIGURE 2-6: NEW FILE h) From Categories, select “C” and, from File Types, select “C Source File” and click Next.  2021 Microchip Technology Inc. and its subsidiaries DS50003218A-page 15...
  • Page 16 Name the file (“DAC_SAMPLE” in the example shown in the following figure) and click Finish. FIGURE 2-8: NAME THE FILE From the file, right click Source File and select “Add Existing Item...”. FIGURE 2-9: ADD A SOURCE FILE  2021 Microchip Technology Inc. and its subsidiaries DS50003218A-page 16...
  • Page 17 Curiosity HPC Board using a micro-USB cable to provide power to the board. Press the icon shown in the following figure to compile and program the code. FIGURE 2-12: COMPILE AND PROGRAM THE CODE  2021 Microchip Technology Inc. and its subsidiaries DS50003218A-page 17...
  • Page 18 Monitor the output of the SPI DAC here using an oscilloscope. Monitor the output of the I DAC here using an oscilloscope. Connect a jumper between the VDD and 3.3V pins to power the board.  2021 Microchip Technology Inc. and its subsidiaries DS50003218A-page 18...
  • Page 19: Spi Demo

    Curiosity board, as shown in the following figure. Rotating the potentiometer will also change the blink rate of LED D4. FIGURE 2-16: SPI OUTPUT SINE WAVE WITH VARYING FREQUENCY USING THE POTENTIOMETER (LED D4 BLINKING, LEDS D2, D3 AND D5 OFF)  2021 Microchip Technology Inc. and its subsidiaries DS50003218A-page 19...
  • Page 20 PRESSED, LED D5 BLINKING, LEDS D2, D3 AND D4 OFF) FIGURE 2-18: SPI OUTPUT SAW-TOOTH WAVE WITH VARYING FREQUENCY USING THE POTENTIOMETER (S1 SWITCH PRESSED, LED D5 BLINKING, LEDS D2, D3 AND D4 OFF)  2021 Microchip Technology Inc. and its subsidiaries DS50003218A-page 20...
  • Page 21: I 2 C Demo

    Channel 0 will output a saw-tooth waveform as shown in the following figure. The fre- quency of the waveform can be modified using the potentiometer on the Curiosity board. FIGURE 2-20: C OUTPUT SAW-TOOTH WAVEFORM (LED D3 BLINKING, LEDS D2, D4 AND D5 OFF)  2021 Microchip Technology Inc. and its subsidiaries DS50003218A-page 21...
  • Page 22 LED D4 Blinking LED D2 Blinking (LEDs D2, D3 and D5 Off) (LEDs D3, D4 and D5 Off) SPI Sine Wave I2C Sine Wave Status = SPI Sine Status = I2C Sine  2021 Microchip Technology Inc. and its subsidiaries DS50003218A-page 22...
  • Page 23: Chapter 3. Code

    1LSb Octal DAC Evaluation Board, which will allow for monitoring and testing the DAC. The sample code is also provided separately on the product page for convenience.  2021 Microchip Technology Inc. and its subsidiaries DS50003218A-page 23...
  • Page 24 #include <xc.h> #include <pic18f47q10.h> // PIC18F47Q10 Configuration Bit Settings //Sep29 // CONFIG1L #pragma config FEXTOSC = OFF #pragma config RSTOSC = HFINTOSC_1MHZ// Power-up default value for COSC bits (HFINTOSC with HFFRQ = 4 MHz and CDIV = 4:1) // CONFIG1H #pragma config CLKOUTEN = OFF // Clock Out Enable bit (CLKOUT function is disabled) #pragma config CSWEN = ON...
  • Page 25 #pragma config WRT4 = OFF // Write Protection Block 4 (Block 4 (010000-013FFFh) not write-protected) #pragma config WRT5 = OFF // Write Protection Block 5 (Block 5 (014000-017FFFh) not write-protected) #pragma config WRT6 = OFF // Write Protection Block 6 (Block 6 (018000-01BFFFh) not write-protected) #pragma config WRT7 = OFF // Write Protection Block 7 (Block 7 (01C000-01FFFFh) not write-protected) // CONFIG4H...
  • Page 26 // #pragma config statements should precede project file include void ADC_Initialize(void); void Delay( unsigned int ); void SPI1_Initialize(void); void SwitchInit(void); void SW1(void); void SW2(void); void SPI1_WriteWord(unsigned char addr,unsigned int data); unsigned int SPI1_ReadWord (unsigned char addr ); void SystemInit(void); void StartADCoversion(void); void I2C1_Initialize(void);...
  • Page 27 #define I2C_SAWTOOTH 0xA0 unsigned int Check[360]; unsigned int SINE[]={ 2047,2083,2118,2154,2190,2225,2261,2296,2332,2367,2402,2438,2473,2507,2542,2577, 2611,2645,2680,2713,2747,2781,2814,2847,2880,2912,2944,2976,3008,3039,3071,3101, 3132,3162,3192,3221,3250,3279,3307,3335,3363,3390,3417,3443,3469,3494,3519,3544, 3568,3592,3615,3638,3660,3682,3703,3724,3744,3764,3783,3802,3820,3837,3854,3871, 3887,3902,3917,3931,3945,3958,3971,3982,3994,4005,4015,4024,4033,4042,4049,4056, 4063,4069,4074,4079,4083,4086,4089,4091,4093,4094,4094,4094,4093,4091,4089,4086, 4083,4079,4074,4069,4063,4056,4049,4042,4033,4024,4015,4005,3994,3982,3971,3958, 3945,3931,3917,3902,3887,3871,3854,3837,3820,3802,3783,3764,3744,3724,3703,3682, 3660,3638,3615,3592,3568,3544,3519,3494,3469,3443,3417,3390,3363,3335,3307,3279, 3250,3221,3192,3162,3132,3101,3071,3039,3008,2976,2944,2912,2880,2847,2814,2781, 2747,2713,2680,2645,2611,2577,2542,2507,2473,2438,2402,2367,2332,2296,2261,2225, 2190,2154,2118,2083,2047,2011,1976,1940,1904,1869,1833,1798,1762,1727,1692,1656, 1621,1587,1552,1517,1483,1449,1414,1381,1347,1313,1280,1247,1214,1182,1150,1118, 1086,1055,1024, 993,962,932,902,873,844,815,787,759,731,704,677,651,625,600,575,550,526,502,479, 456,434,412,391,370,350,330,311,292,274,257,240,223,207,192,177,163,149,136,123, 112,100, 89,79,70,61,52,45,38,31,25,20,15,11,8,5,3,1,0,0,0,1,3,5,8,11,15,20,25,31,38,45, 52,61,70,79,89, 100,112,123,136,149,163,177,192,207,223,240,257,274,292,311,330,350,370,391,412, 434,456,479,502,526,550,575,600,625,651,677,704,731,759,787,815,844,873,902,932, 962,993, 1024,1055,1086,1118,1150,1182,1214,1247,1280,1313,1347,1381,1414,1449,1483,1517, 1552,1587,1621,1656,1692,1727,1762,1798,1833,1869,1904,1940,1976,2011,2047, unsigned int temp,del,del2,Status,SPIReadData,I2CReadData; unsigned int *SinePtr; #define DAC0 0 #define DAC1 1 #define DAC2 2 #define DAC3 3...
  • Page 28 SwitchInit(); ADC_Initialize(); SPI1_Initialize(); Status=SPI_SINE; SinePtr=&SINE[0]; while (1) SPI1_Initialize(); while(Status==SPI_SINE) for(temp=0;temp<360;temp++) StartADCoversion(); for(del=0;del<(ADRES>>4);del++); // delay based from ADC pot reading SPI1_WriteWord(DAC0,*(SinePtr+temp)); SW1(); SW2(); LED2=0; LED3=0; LED4^=1; LED5=0; SPI1_Initialize(); while(Status==SPI_SAWTOOTH) for(temp=0;temp<0xFFF;temp++) StartADCoversion(); for(del=0;del<(ADRESL>>4);del++); SPI1_WriteWord(0x00,temp); SW1(); SW2(); LED2=0; LED3=0;; LED4=0; LED5^=1; I2C1_Initialize(); while(Status==I2C_SINE)
  • Page 29 for(temp=0;temp<360;temp++) StartADCoversion(); for(del=0;del<(ADRES>>2);del++); // delay based from ADC pot reading I2C1Write(CNTRLBYTE,DAC0,*(SinePtr+temp)); SW1(); SW2(); LED2^=1; LED3=0; LED4=0; LED5=0; I2C1_Initialize(); while(Status==I2C_SAWTOOTH) for(temp=0;temp<0xFFF;(temp=temp+20)) StartADCoversion(); for(del=0;del<(ADRES>>2);del++); // delay based from ADC pot reading I2C1Write(CNTRLBYTE,DAC0,temp); SW1(); SW2(); LED2=0; LED3^=1; LED4=0; LED5=0; while(1); /*******Example for read routines************/ I2CReadData=I2C1ReadLastAddr(CNTRLBYTE);...
  • Page 30 void SPI1_WriteWord (unsigned char addr,unsigned int data ) CS=0; SSP1BUF = (addr<<3)&0xF8; //Shift and & write command AD4:AD3:AD2:AD1:AD0:0:0:X while(!PIR3bits.SSP1IF); //Wait for the interrupt PIR3bits.SSP1IF = 0; //Clear the interrupt flag SSP1BUF = ((data>>8)&(0x00FF));// Shift the data to transmit the MS byte while(!PIR3bits.SSP1IF);...
  • Page 31 * Function to Initialize SPI1 Module ****************************************************************/ void SPI1_Initialize(void) SSP1CON1=0; SSP1STAT=0; SSP1ADD=0; //Setup PPS Pins ANSELBbits.ANSELB1=0; //Make the PORTS digital ANSELBbits.ANSELB2=0; //Make the PORTS digital ANSELBbits.ANSELB3=0; //Make the PORTS digital TRISBbits.TRISB1=0; //Make port output TRISBbits.TRISB2=1; //Make port output TRISBbits.TRISB3=0; //PPS pin assignment SSP1CLKPPS = 9;...
  • Page 32 for(del2=0;del2<100;del2++) if(SWITCH1) break; while(SWITCH1==0);// wait here for the switch to release LED3=0; LED2=0; if(Status==SPI_SINE) Status=SPI_SAWTOOTH; else Status=SPI_SINE; /**************************************************************** * Check for Switch2 pressed ****************************************************************/ void SW2(void) if(SWITCH2==0) for(del2=0;del2<100;del2++) if(SWITCH2) break; while(SWITCH2==0);// wait here for the switch to release LED3=0; LED2=0;...
  • Page 33 if(Status==I2C_SINE) Status=I2C_SAWTOOTH; else Status=I2C_SINE; /**************************************************************** * Initialize ADC module ****************************************************************/ void ADC_Initialize(void) ANSELAbits.ANSELA0=1; TRISAbits.TRISA0=1; //Setup ADC ADCON0bits.ADFM = 1; //right justify 0=left ADCON0bits.ADCS = 1; //FRC Clock ADPCH = 0x00; //RA0 is Analog channel TRISAbits.TRISA0 = 1; //Set RA0 to input ANSELAbits.ANSELA0 = 1;...
  • Page 34 OSCCON3 = 0x00; OSCEN = 0x00; OSCFRQ = 0x06; OSCTUNE = 0x00; TRISA=0; //make port output ANSELA=0; //make port digital LED2=1; LED3=0; LED4=0; LED5=0; CS=1; TRIS_CS=0; DIGTAL_CS=0; /**************************************************************** * Initialize the I2C1 module ****************************************************************/ void I2C1_Initialize(void) SSP1CON1=0; SSP1STAT=0; SSP1ADD=0; /* Set pins RB1 and RB2 as Digital */ ANSELCbits.ANSELC3 = 0;...
  • Page 35 SSP1DATPPS = 0x14; SSP1CON1bits.SSPM3 = 1; SSP1ADD = 0x9F; PIR3bits.SSP1IF = 0; // clear the interrupt SSP1CON1bits.SSPEN = 1; /**************************************************************** *Function to write the I2C with Control Byte ,address and data ****************************************************************/ void I2C1Write(unsigned char ControlByte,unsigned char addr,unsigned int data) PIR3bits.SSP1IF = 0;...
  • Page 36 PIR3bits.SSP1IF = 0; SSP1CON2bits.SEN = 1; // Start I2C1_IntPoll(); SSP1BUF = (ControlByte&0xFE);//;write I2C1_IntPoll(); I2C1_ACKCheck(); //address where to read from SSP1BUF = (((addr<<3)&0xF8)|0x06); //address,write command AD4:AD3:AD2:AD1:AD0:0:0:X I2C1_IntPoll(); I2C1_ACKCheck(); SSP1CON2bits.RSEN = 1; //Repeated Start I2C1_IntPoll(); SSP1BUF =(ControlByte|0x01); //; or with read bit 0 I2C1_IntPoll();...
  • Page 37 SSP1CON2bits.SEN = 1; // Start I2C1_IntPoll(); SSP1BUF = (ControlByte|0x01); //; or with read bit 0 I2C1_IntPoll(); I2C1_ACKCheck(); SSP1CON2bits.RCEN=1; //enable receive I2C1_IntPoll(); dataread=SSP1BUF; I2C1_ACK(); //Send ACK for received data SSP1CON2bits.RCEN=1; //enable receive I2C1_IntPoll(); dataread=((dataread<<8)|SSP1BUF);; I2C1_NACK(); //Send NACK for received data SSP1CON2bits.PEN = 1; //Stop I2C1_IntPoll();...
  • Page 38 ****************************************************************/ void I2C1_ACKCheck(void) //Check ACK from Slave if ( SSP1CON2bits.ACKSTAT==1) return; /**************************************************************** *I2C Poll for interrupt flag ****************************************************************/ void I2C1_IntPoll(void) // Poll of the I2C interrupt while (!PIR3bits.SSP1IF); PIR3bits.SSP1IF = 0;...
  • Page 39: Appendix A. Schematics

    This appendix contains the following schematics and layouts for the 1LSb Octal DAC Evaluation Board - EV76B70A: • Board – Schematics • Board – Top Assembly Drawing • Board – Bottom Assembly Drawing  2021 Microchip Technology Inc. and its subsidiaries DS50003218A-page 39...
  • Page 40: Board - Schematics

    BOARD – SCHEMATICS VDD=5V/3.3V VSS=GND Compatible with I2C Power Supply LAT0/HVC +3.3V 10uF S_LAT0/HVC TANT-A 100K 100K 0.1uF MikroBUS Connector VREF0 VREF1 VREF0 VREF1 VOUT0 VOUT1 VOUT0 VOUT1 VOUT2 VOUT3 VOUT2 VOUT3 SPI DAC O/P I2C DAC O/P VOUT4 VOUT5 VOUT4 VOUT5 S_VOUT0...
  • Page 41: Board - Top Assembly Drawing

    Schematics BOARD – TOP ASSEMBLY DRAWING 15 14 13 12 11 BOARD – BOTTOM ASSEMBLY DRAWING  2021 Microchip Technology Inc. and its subsidiaries DS50003218A-page 41...
  • Page 42 1LSb Octal DAC Evaluation Board User’s Guide NOTES:  2021 Microchip Technology Inc. and its subsidiaries DS50003218A-page 42...
  • Page 43: Appendix B. Bill Of Materials (Bom)

    1x1, gold, 5.84MH, TH, vertical Note 1: The components listed in this Bill of Materials are representative of the PCB assembly. The released BOM used in manufacturing uses all RoHS-compliant components.  2021 Microchip Technology Inc. and its subsidiaries DS50003218A-page 43...
  • Page 44 R12, R13, 0603 R14, R15 Note 1: The components listed in this Bill of Materials are representative of the PCB assembly. The released BOM used in manufacturing uses all RoHS-compliant components.  2021 Microchip Technology Inc. and its subsidiaries DS50003218A-page 44...
  • Page 45: Worldwide Sales And Service

    Tel: 46-31-704-60-40 Tel: 631-435-6000 Sweden - Stockholm San Jose, CA Tel: 46-8-5090-4654 Tel: 408-735-9110 UK - Wokingham Tel: 408-436-4270 Tel: 44-118-921-5800 Canada - Toronto Fax: 44-118-921-5820 Tel: 905-695-1980 Fax: 905-695-2078  2021 Microchip Technology Inc. and its subsidiaries DS50003218A-page 45 09/14/21...
  • Page 46 Mouser Electronics Authorized Distributor Click to View Pricing, Inventory, Delivery & Lifecycle Information: Microchip EV76B70A...

This manual is also suitable for:

Mcp48cxbx8

Table of Contents