Close

Integrated op-amp and DAC config

A project log for Tiny PCB weighing 2.5 grams w/ a few features

2 channel constant current programmable output, IR communications, weight < 3 grams

sophi-kravitzSophi Kravitz 03/22/2020 at 22:050 Comments

I started the work sesh with these main tasks:

1. Configure both the DAC and the op-amp in MPLAB. This checks out, there is 1.005V on pin 17 (DACOUT2)

2. Configure the Curiosity board to measure current. I added a 22k resistor across pins 13 to GND, and a red LED between pins 13 and 14. POT1 on the curiosity board ramps the DAC input up and down.

3. Write firmware to ramp the DAC input up and down.

I'm not sure if/ how to do an input to the DAC internally (right now I'm using an external pot). I'm also unsure if it's even possible to have multiple digital levels. 

I *think* so as it says in the data sheet: The DAC has 256 voltage level ranges. The 256 levels are set with the DAC1R<7:0> bits of the DAC1CON1 register.

Discussions