Emil's Projects

OpenHardware & OpenSource

Entries tagged "avr".

Graphic LCD display 28th August 2005

I've recently bought online a large quantity of displays and paid a very good price for the lot. The displays came "as is" with absolutely no documentation or hint from the web. The company that originally produced them was out of business and their website was gone. I hopped that I will be able to reverse engineer these displays and my work paid off.

LCD Front ViewLCD Back View

First of all I've decapsulated the display controller (using nitric acid heated at 70 degrees) and then I've took pictures of the die using a Nikon Optiphot microscope.

The following images show different shots of the KS0713 controller.

Decapsulated Die

The die marking and the analog circuitry to multiply the voltage

Die MarkingCharge Pump

The LCD segment drivers

Row DriversColumn Drivers

The LCD static memory (twice the display size)

Dual Port RAMRAM cells

The die marking immediately pointed out to the Samsung datasheet for the controller KS0713 and for one of its close relatives S6B1713.

Then I have reversed the PCB schematic to find out the controller's hardwired operating modes. Notice that there are 3 pairs of jumpers on the PCB if you ever need to change the display behaviour.

If you plan to use the (green) backlight you need a higher voltage power supply (min 8.1V) otherwise the LEDs won't work. You can modify the LEDs series resistors directly on the PCB by replacing R3-R6. Turn VR1 anti-clockwise if you want to increase the LCD contrast. The picture bellow shows the display without backlight so you can see the contrast is quite good in normal light.

The controller's memory is twice the display size. This means you can set a pointer in the RAM with one simple command to tell the controller which part of the RAM to display. This is handy for two reasons. One you can implement scrolling displays by updating only one (new) row of characters and then moving the RAM pointer. This saves a lot of time because you don't need to update the whole display each time you need a new row of characters. Secondly you can use the hidden memory as general purpose RAM for the microcontroller. There is enough space (528 bytes) to store a full NAND page including the spare area if your project uses this kind of nonvolatile memory.

The display can be mirrored both horizontally and vertically in software so you can position it any way you like.

PCB viewDisplay Schematics

I've used a STK500 Atmel development board to write the software with an ATMega16. If you use processors with parallel port modes (like the ATMega128 or even the PIC16F877) then writing data to the display is faster because you don't have to bitbang the latch signals. Here's an example of using the ATMega128 mapped memory:

  unsigned char *ks0713 = ( unsigned char * ) 0x1100;  // external memory
  XMCRB = 0x87;                 // Bus keeper, full port C
// XMCRA = _BV( SRW11 );       // extra delay
  MCUCR = _BV( SRE );           // enable external memory
//  MCUCR |= _BV( SRW10 );      // extra delay

You simply do then 
	c = *ks0713 	or 	*ks0713 = c 
if you want to read or write data to the display

LCD Demo

This entry has been cut, click to read on.

3 comments. Tags: avr, graphic lcd, reverse engineering.
I2C interface with a cheap PCI GPS 19th April 2013

This project describes how to make a small GPS module suitable for use with RC quadcopters and airplanes from an inexpensive laptop GPS.

This entry has been cut, click to read on.

1 comments. Tags: avr, gps, i2c, ublox.
Making a better HC-SR04 Echo Locator 22nd January 2014

I have bought several cheap echo location circuits from AliExpress and I'm planning to use them in one of my robotics projects.

HC-SR04 Front ViewHC-SR04 Back View

They are very cheap especially if you buy a dozen you can get them bellow 2$ shipped. Once they've arrived, to test them, I wrote a quick C test program for an AVR board which displays the distance in cm to an obstacle. The results were pretty accurate for as far as 3-4m distance for hard obstacles. Unfortunately when there are no obstacles in front of this detector or when the obstacles don't have hard surfaces then erroneous results are returned.

I wanted to understand why this was happening so the first step was to reverse the HC-SR04 module schematic.

This entry has been cut, click to read on.

160 comments. Tags: avr, hc-sr04, ultrasound.
RGB Matrix Clock 9th August 2014

This is an example of over-engineering: a clock with 4 microcontrollers! Three of these are ATmega368 which are part of a cheap development board the Colorduino. Each of these controls one third of the display namely one 8×8 RGB LED matrix. The synchronization and communication between these 4 microcontrollers will happen via a multi-master I2C bus. So far I've finished the case and I've written a simulator in GTK of the various display modes which you may download bellow.

Clock simulator
Linux versionWindows version
and GTK runtime
design file (QCAD)

This entry has been cut, click to read on.

Tags: arduino, avr, clock, i2c, rgb.

RSS Feed