circuitcellar.com
Magazine Support   Digital Library   Products & Services   Suppliers Directory 
 
 





 

July 2006, Issue 192

Dual-Axis Level Sensor
Philips ARM Design Contest 2005 Winner


by Stefan Morley


Start System Overview LCD Analog Software Implementation Hand that Feeds Where to Now? Sources and PDF

LCD

The displays were surprisingly easy to drive with software. The Epson E2202CKR LCD with a SED1565 controller can be driven in Parallel mode, which allows the status and busy bits to be read, or SPI mode, which allows only writing. However, writing to the display at 2.5 MHz in SPI mode appeared to have no negative effect. The datasheets suggest 6 MHz, but this appeared to present a problem. It might be feasible in Parallel mode because you’d be able to read the busy bit. But in SPI mode, I had no choice but to limit the speed. However, a full-screen refresh at 2.5 MHz takes roughly 7.2 ms, which includes the indexing of arrays overhead. That’s no problem because 2.5-MHz update rates of moving objects prove to be too fast for the LCD anyway. Moving objects become blurred because the pixel elements take too long to change state.

The display runs at 3.3 V, which makes it perfectly compatible with the LPC2138 microcontroller (see Figure 2, p. 50). It draws a maximum of 260 µA, which makes it easy to appreciate where the displays came from. The screens retain their information without having to be physically refreshed. The SED1565 LCD controller takes care of this. Therefore, it’s feasible that you could capitalize on the low-power consumption of the ARM device in Power Down mode at 500 µA to get long life from a battery.

(Click here to enlarge)

Figure 2—Three elements are mounted on the board: the E2202CKR LCD, the DX-045D-90 sensor, and the buttons for calibration functions. The other two elements are the LPC2138 and the speaker on the MCB2130 evaluation board.

A first look at the register set will put you in a comfort zone. Some of the functions and the way they’re selected aren’t too dissimilar from a simple alphanumeric display with an HD44780 controller. The E2202CKR LCD doesn’t have a character ROM or display control commands, but there is enough there to write information to the screen. The biggest difference is that you can control the LCD bias voltages with the register set instead of a simple preset potentiometer.

The only problem I experienced involved driving the screen’s contrast. There are a number of parameters for setting up the onboard switcher that controls the bias to the LCD. The one that matters the most, v5_volume, appears to be a lot more critical than any of the others. With a value of 0x20, you have a black screen. With a value of 0x05, you wouldn’t know the screen was on. It is a balancing act between v5_volume and v5_res_ratio to get the screen to be useful.

The LCD seems to have an infrared sensor in it to adjust contrast. No, it isn’t about the rise in temperature changing the switching characteristics of the pixels, because a simple infrared LED changes the contrast of the display. I stumbled onto it when I tried to take a picture of the project in sunlight. It makes sense—not that the controller part of the screen would ever see sunlight, but the fact that the unit is sensitive to IR. This means the contrast can be automatically adjusted in the intended application of mobile phones. It’s a useful little undocumented feature (or a pitfall if you didn’t find out about it).