Skip to main content

Posts

Showing posts with the label PIC32

Hacking the PIC32 Comparator Reference to obtain a DAC

The PIC32MX250F128B has a myriad of peripheral features that makes this cheap little 28-pin 32-bit microcontroller extremely powerful. However, it does lack a digital-to-analog converter (DAC). A simple approach to digital-to-analog conversion is to use one of the PWM channels and then to use an RC low-pass filter at the output. However, there is another neat little feature of the device that can be exploited or rather utilized to obtain a rather crude DAC – the analog comparator module. Rather, the analog comparator reference module. The PIC32MX250F128B contains an internal voltage reference module that was created to be used as a reference voltage for the internal analog comparator module. However, it does allow you to output this reference voltage to an output pin. Analog voltage output with digital control? Sounds like a DAC. The voltage reference module is built off of a 16-tap resistor ladder network with two selectable ranges – from 0 to 0.67 CVREF or from 0.25 to 0.75 CVREF. CV...

PIC32 Proto Board Details Schematic PCB and Pictures

I previously showed you my PIC32 proto board I made on verroboard (http://www.blogspot.com/2016/02/pic32-development-proto-board-on.html). To make the proto board “more of a product” and easy to reproduce, I was working to make the proto board on a PCB. I used ExpressSCH to draw the schematic, and used ExpressPCB to design the PCB. Once designed, Professor Bruce Land got the PCB made from ExpressPCB themselves. The PCB is just to be a basic board with the PIC32MX250F128B placed on it. The power supply connections are provided as are external oscillator connections (if needed). Additionally, there is a nice convenient power supply input connector (standard 2.5mm jack/plug). All the IO pins along with power (Vin and +3.3V) and ground are placed on a SIL connector at the edge of the board so that the board can be conveniently placed on a breadboard for experimenting and prototyping (see pictures below). It's a nice little 2-layer PCB measuring only 3.1 inches by 1.8 inches. I chose t...