Up to this point, we have focused on generating signals without necessarily observing those signals. In this post, we will begin to give the microcontroller the capacity to observe those signals using the Analog-to-Digital Converter (ADC).
There are 5 signals to be observed:
In the initial schematic, you will recall that U1 is an opamp in the differential configuration. This means that the voltage at the reference input will be the 'center' or '0' voltage of the output. We decided to place a small RC filter at the input of that opamp …
more ...In the previous post code-oriented post, we got the DAC generating waveforms of reasonable frequencies. Unfortunately, a DAC usually has a high output impedance, which will distort our signals if we place it in the wrong circuit. Fortunately, we can make up for this using the on-board operational amplifiers …
more ...As always, there are some schematic errors. This is one of the issues with highly integrated ICs, it is so easy to mix up the pins! Maybe I should stop doing schematic and layout so late at night...
Go back to the first post to get some background on this project!
Just a couple of notes before we begin coding. I was using the pinout for the "PIC24F" part on the datasheet whereas I should have been using the "PIC24FJ" part. This will involve a small …
more ...You have all had to implement a moving average algorithm from time-to-time. Moving averages make life easier, especially for mixed-signal applications in which you have a few extra A/D cycles available.
This article is intended for a fixed-point audience; however, the techniques shown can apply to floating point …
more ...There have been several times that I have had to sense current in an application for one reason or another. I was working on just such an application recently when I thought to myself, "Hey, why don't I just make a quick solderable module and just always use that …
more ...You may also be interested in our article regarding fixed-point math!
Division and modulo operations should be avoided on 8- and 16-bit hardware. We would like to present you with a few techniques that can help you avoid the cycle-heavy division operations by replacing your modulo operators with bit …
more ...For a quick primer on libmathq15, check out How Fixed-Point Math Works.
Recently, I have been curious as to the accuracy of libmathq15 over
the entire sine range, which is 0 to 65535 for trigonometric functions
and -32768 to 32767 for the standard Q1.15 functions. Realizing quickly
that …