Archive for AVR

LC7981/HD61830 Driver for EL Backlit Samsung LCD

I’ve found the time to post this LC7981/HD61830 driver (only graphics mode implemented) and some images of this Samsung LCD I’m using. I bought the LCD off of ebay ( http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&rd=1&item=230070938443 ) and shortly after I wrote the driver for it from scratch. I finished this driver about a month and a half ago, but I have just been too busy lately to post anything about it till now.

This is will eventually be a part of my GPS project, which I will get into later next week.

For now, here are the specs: an EL backlit 160×80 monochrome graphics LCD that supports text and graphics mode (I just coded for graphics mode and found a font/character pixel set online), controlled by an ATMega32. The LCD is driven by an LC7981/HD61830 controller (easy parallel interface). I’ll try to get the pinout up, including the EL connections with the inverter as soon as possible.

Pictures (no, I’m not running linux, the linux penguin just happened to be a convenient pixmap to demonstrate):
LCD Prototype Board
LCD Close Up Flash #2
LCD Close Up Flash #1
LCD Close Up Dark

And the free source, currently coded for the ATMega32 but can be easily adapted to other uCs: avr-lc7981.tar.gz.

Alternatively, feel free to browse the images and source here: http://www.frozeneskimo.com/samsunglcd/.

Comments (7)

USBasp Perf. Board Build

The computer I’m currently on (intel mac mini) doesn’t have a parallel port, so I can’t use the STK-200 style AVR-ISP to program/flash AVR chips. So, looking for the USB alternative, I stumbled across the USBasp. From the site, “USBasp is a USB in-circuit programmer for Atmel AVR controllers. It simply consists of an ATMega48 or an ATMega8 and a couple of passive components. The programmer uses a firmware-only USB driver, no special USB controller is needed.”

It’s cross-platform (Linux, Windows, Mac OS X), and since it implements USB as firmware in the AVR, it keeps the parts count pretty low.

I’ve gotten around to building the USBasp on a perf board, since I’m too cheap for a real pcb. I have confirmed it working on both Windows and Mac OS X (and as of today Linux too), and have used it extensively the last couple of days to write an LC7981/HD61830 driver on an ATMega32 (will post this up soon) without any problems.

There is also USBtiny, which is probably the fastest way to get up and running with USB AVR programming if you already have a parallel port STK200 clone. Like the USBasp, it implements USB entirely on the AVR firmware, but is actually more of a parallel-port to USB converter (it interfaces to an existing STK200-style AVR-ISP parallel port programmer).

USBasp Perf. Board Build - click for a high-res picture:
USBasp Perf Board Build

Comments (2)

AVR Servo Control

Well, my two days worth of figuring out AVR timers and PWM produced a very small and clean servo driver. Today my two 5g servos arrived and I hooked up one of them to the chip. I setup a test program and it worked out of the box. If you care to see it, just watch this:

http://www.frozeneskimo.com/electronics/wp-content/uploads/Videos/avrservo.avi

Comments

Manchester Encoding/Decoding

Like I said in the previous post, the RF receiver will pick up junk data when the transmitter isn’t transmitting anything. This means that you need some sort of encoding or decoding method of the data to differentiate from junk in the air and actual data. This can be easily done through Manchester Encoding, which was used in Ethernet until 100Base-TX came along.

Manchester Encoding actually halves the data rate. The encoding is extremely simple, though. If you have a 1 in your data, it will be followed by a 0, if you have a 0 in your data, it will be followed by a 1. So the ASCII letter ‘A’, or 0100 0001 in binary, would be encoded as 01 10 01 01 01 01 01 10.

This allows for easy error checking- if a bit in the received data is not followed by its inverse, you know that the data is invalid. In other words, there are an equal number of ones and zeroes in the Manchester encoded data. Of course, there is that small chance that one byte of the random junk floating around is actually properly encoded, but these bytes can be avoided with a basic protocol on top of the encoding (possibly with a checksum).

__(’Read the rest of this entry »’)

Comments