Skip to main content

Posts

Showing posts with the label bit

A Comparative Study between two 32 bit microcontrollers the Atmel AT91SAM3X8E and the Microchip PIC32MX250F128B

As previously mentioned (http://www.blogspot.com/2016/09/200000-views-ithaca-arm-and-dmips.html) I’m doing an independent study under the supervision of Professor Bruce Land here at Cornell University. A semester has passed and I will be continuing my independent study next semester. The independent study (that I'm doing and will be continuing) is on exploring and comparing the peripheral modules of the Microchip PIC32MX250F128B (on the Microstick II platform) and the Atmel AT91SAM3X8E (on the Arduino Due platform). This semester, I've done a good amount of introductory exploration of the two 32-bit microcontrollers. Here are the links to the datasheets of the two microcontrollers on which my independent study is based: AT91SAM3X8E: www.atmel.com/Images/doc11057.pdf PIC32MX250F128B: http://ww1.microchip.com/downloads/en/DeviceDoc/61168E.pdf The Microchip PIC32MX250F128B is a 32-bit RISC microcontroller based on the MIPS M4K core. In this independent study, I have used the Micro...

PIC32 SPI Using the MCP4822 12 bit serial dual DAC

I recently got a few pieces of the MCP4822 DAC. You can check out the datasheet here: http://ww1.microchip.com/downloads/en/DeviceDoc/22249A.pdf I found them to be neat little devices. In a small 8-pin PDIP package, the MCP4822 comes with 2 12-bit DACs, which you can easily configure over SPI. This was a great opportunity to get a simple PIC32 SPI application going. I worked on this today to see how fast I can get the DAC output going. Here's the pinout of the MCP4822: Fig. 1 - MCP4822 pinout (taken from datasheet) The MCP4822 can be supplied a voltage in the range of 2.7V to 5.5V. Since I use 3.3V for my PIC32, I used the same 3.3V supply for the VDD for the MCP4822. Pin 5 is the active low signal LDAC that is used to synchronize the two DAC channels. When this pin is brought low, the data in the DAC's input register is copied to the output and both outputs are updated at the same time. I just had this tied to ground. VoutA and VoutB are the two output pins. The other pins are...

Simple LCD Module in 4 bit Mode

In many projects use is made of alphanumeric LCDs that are driven internally by Hitachi’s industry-standard HD44780 controller. These displays can be driven either in 4-bit or 8-bit mode. In the first case only the high nibble (D4 to D7) of the display’s data bus is used. The four unused connections still deserve some closer attention. The data lines can be used as either inputs or outputs for the display. It is well known that an unloaded output is fine, but that a floating high-impedance input can cause problems. So what should you do with the four unused data lines when the display is used in 4-bit mode? This question arose when a circuit was submitted to us where D0-D3 where tied directly to GND (the same applies if it was to +5 V) to stop the problem of floating inputs. The LCD module was driven directly by a microcontroller, which was on a development board for testing various programs and I/O functions. There was a switch present for turning off the enable of the display when it wa...