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.
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...
• 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.
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...
(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...
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...
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...
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...
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...
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...
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...
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 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 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;...
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...
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...
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...
Need help?
Do you have a question about the MCP47CXBX8 and is the answer not in the manual?
Questions and answers