Dasilib is “Dave’s Simple Library” containing a number of useful things for the AVR ATMega Microcontroller.
The source code is here.
Making things do stuff
Dasilib is “Dave’s Simple Library” containing a number of useful things for the AVR ATMega Microcontroller.
The source code is here.

DASICARPODOC means “DAve’s SImple CAR iPOd DOCk.” It is a way to integrate an iPod to a car without a headunit. It displays artist and track information on an LCD and provides simple iPod control via remote buttons. There is also a home version, using an stv5730 to provide video output for a TV or projector in the works.
The prototype hardware for this project is based on SimmStick modules from Dontronics.

The main board is a SIM100, with a few modifications:

The DT209 Module, loaded with three 8bit I/O ports, provides the I2C interface to the LCD display and push buttons.
The socketted DIP switches are loaded in place of darlington driver arrays specified in the DT209 design.

The ‘video’ version uses a DT108 from Dontronics

Get the source here. This uses my avr library which is here. You will need to install eclipse and CDT, then import the source to an eclipse “managed make C project”.
In order to build the source you will need to have avr-gcc installed. Visit this page for a step by step guide to building the complete GNU toolchain for the AVR target.
I’m currently using the AVR-LIBC and AVRGCC packages for ubuntu, go point and click Linux.
This diagram shows major software modules and software/hardware split.
| MAIN | Software | |||
| iPod | LCD | Button | Video | |
| SCI | I2C | SPI | ||
| DOCK | PCF8574 | PCF8574 | STV5730A | Hardware |
| iPod | LCD | Buttons | Video | |
The lowest software layer is comprised of three modules; I2C, SPI and SCI. The SCI module is responsible for communications between the iPod and dasicarpodoc. The I2C module drives the three PCF8574 8 bit I/O ports which in turn drive the LCD and Buttons. The SPI module drives the atmega internal SPI subsystem.
The SCI module drives the atmega’s internal SCI hardware. The SCI is initialised to 19200 8N1. The communications scheme is interrupt driven.
The I2C module drives the three PCF8574 8 bit I/O ports. Two of the ports control the LCD, the other interfaces to the buttons. The interface provided to upper layers is the function iicPortWrite(), which is a masked bit state maintaining PCF8574 driver. This module uses the atmega’s Two Wire Interface.
The SPI driver is part of the video module and provides access to the atmega’s SPI subsystem.
This layer provides a layer of abstraction, hiding direct hardware access. The four modules at this layer are the ipod, LCD, button and video modules.
The bulk of work done by this module is to format a command string to send to the iPod and to receive the iPod’s reply, interpreting the reply.
This module provides functions that drive the LCD display, after calling lcdOpen(), the bulk of work is done by calling lcdIoctl() and lcdPrint().
This module provides an interface for an array of (up to 8) buttons through the getButton() function.
This module provides functions that drive the stv5730 video IC.
This layer does stuff… …this is where you would put your code if you wanted to mess around with the driver.
The water temperature gauge in my 1989 MKII Golf died one day. Being terminally short of cash I decided to replace it with a DS18B20 temperature sensor with LCD display.

I have no idea how much a replacement gauge would have been, but it was a good weekend spent thinking, drinking, hacking and swearing.
The source code is available here
It uses my avr library which is here.
© 2026 android.geek.nz
Theme by Anders Noren — Up ↑