dasicarpodoc
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.
Hardware
The prototype hardware for this project is based on SimmStick modules from Dontronics.
Main Board – SIM100
The main board is a SIM100, with a few modifications:
- The power supply is protected from Load Dumps.
- The Tx signal is clamped to 3V to suit the iPod electrical specifications.
- A Trimpot is placed on the board for the iPod Accessory Identify signal.
- The ATMega32 SDA and SCL signals are routed to the correct SimmStick I/O line.
IO Module – DT209
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
Software
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.
Layers Baby Layers
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 |
Layer One – Hardware Interface Layer
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.
SCI
The SCI module drives the atmega’s internal SCI hardware. The SCI is initialised to 19200 8N1. The communications scheme is interrupt driven.
I2C
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.
SPI
The SPI driver is part of the video module and provides access to the atmega’s SPI subsystem.
Layer Two – Driver API Layer
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.
iPod
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.
LCD
This module provides functions that drive the LCD display, after calling lcdOpen(), the bulk of work is done by calling lcdIoctl() and lcdPrint().
Button
This module provides an interface for an array of (up to 8) buttons through the getButton() function.
Video
This module provides functions that drive the stv5730 video IC.
Layer Three – Application Layer
This layer does stuff… …this is where you would put your code if you wanted to mess around with the driver.