Winter 2019 Project ECE 4951 Project 2c: Table Lookup, Periodic Timer, 12C DAC Objectives: • To gain experience with setting up a periodic timers. • To gain experience with the I2C interface to a DAC. • Use table lookup to generate a rectified sine wave For Lab02c the rectified sine wave will be output onto the MCP4725 DAC finishing the assignment. You will be given a MCP4725 DAC breakout board in lecture. The data sheet and the schematic for the part is available on Canvas. For this part of the lab we will be generating a rectified sine wave at 100 Hz. There are 32 samples for each cycle of the sine wave. That means that the interrupt rate will need to be 32*100 or 3.2 kHz. Starter code is supplied on canvas, lab02c_start. This is the code from lecture. Modify the code to include your rectified sine wave code, rectified sine wave table, your function generator code, and your timer code from Lab02b. Your function generator code should switch between the sine wave and rectified sine wave when switch 1 is pressed. The starter code has the 1200 module set up to use. Your assignment is to send the right values to the DAC to output the rectified sine wave. Three bytes of data will sent for each value of the rectified sine wave. Write DAC Register using Fast Moderne Command (C2, C-10, ACK (MCP4725 лок мета 1st by Device Addressing and byle лок масла ) Device Code Are START BE Bts . 1 DAC Rees (12 L ower Down See Last Mode Command ICC00 Command The address byte is sent first. The values for bits A2 and Al are both 0. You can get the value for A0 from the breakout board schematic. This value is set up in the initialization module to be read timertified ein we nie Show transcribed image text Winter 2019 Project ECE 4951 Project 2c: Table Lookup, Periodic Timer, 12C DAC Objectives: • To gain experience with setting up a periodic timers. • To gain experience with the I2C interface to a DAC. • Use table lookup to generate a rectified sine wave For Lab02c the rectified sine wave will be output onto the MCP4725 DAC finishing the assignment. You will be given a MCP4725 DAC breakout board in lecture. The data sheet and the schematic for the part is available on Canvas. For this part of the lab we will be generating a rectified sine wave at 100 Hz. There are 32 samples for each cycle of the sine wave. That means that the interrupt rate will need to be 32*100 or 3.2 kHz. Starter code is supplied on canvas, lab02c_start. This is the code from lecture. Modify the code to include your rectified sine wave code, rectified sine wave table, your function generator code, and your timer code from Lab02b. Your function generator code should switch between the sine wave and rectified sine wave when switch 1 is pressed. The starter code has the 1200 module set up to use. Your assignment is to send the right values to the DAC to output the rectified sine wave. Three bytes of data will sent for each value of the rectified sine wave. Write DAC Register using Fast Moderne Command (C2, C-10, ACK (MCP4725 лок мета 1st by Device Addressing and byle лок масла ) Device Code Are START BE Bts . 1 DAC Rees (12 L ower Down See Last Mode Command ICC00 Command The address byte is sent first. The values for bits A2 and Al are both 0. You can get the value for A0 from the breakout board schematic. This value is set up in the initialization module to be read timertified ein we nie
Expert Answer
Answer to Winter 2019 Project ECE 4951 Project 2c: Table Lookup, Periodic Timer, 12C DAC Objectives: • To gain experience with s…