Hardware Design By Zhi-Hern Loh

Home
Design
Results
A 2nd try
Schematics
Code
Files
Links
Contact

The hardware on this page was driven by the programs on the program design page.

Hardware design

Pictures - Taken to document the process of the project.

This section contains the following:

bulletPart list
bulletPort listings
bulletUser Interface
bulletRS-232
bulletLCD
bulletSTA013
bulletCD-ROM
bulletBi-Directional level shifting

 

Part list

bulletSTK500 - ATMEL
bulletSTK501 - ATMEL
bulletATmega128
bulletIDT71124 - S12Y (128k SRAM) IDT

The STK501 does not come with SRAM. ATMEL recommends that the IDT71124 be used with a 5V MCU. I had to solder the IDT71124 onto the STK501.

bulletSTA013 - ST Microelectronics, ordered from Future Electronics.
bulletCS4334 - Cirrus logic, ordered from Nu Horizons.
bulletMAX1840 - MAXIM
bulletSeiko 16x2 LCD
bullet16 Mhz Oscillator (Mega128)
bullet14.7456 Mhz Oscillator (STA013)
bulletVarious capacitors and resistors
bulletPrototyping adapters. ARIES, for STA013 and CS4334. Micromax surfboard for MAX1840. These can be found at Digikey.

Port Listings

There are two sets of port lists, the first set is the port lists used in the final version of the project. The second set is the port list designed for the CD-ROM version of this project.

User Interface (Serial based)

PE[0..3] Push Button[0..3] STK500

RS-232

PD.2 RXD (STK500)
PD.3 TXD (STK500)

MCU - LCD connections

MCU LCD
PB.0 RS (4)
PB.1 RD (5)
PB.2 EN (6)
PB[4..7] DB[4..7] (11..14)

Pin 0 GND
Pin 1 5V
Pin 2 VLC

Schematic 1 - LCD contrast control.

CD-ROM interface design and port lists

The CD-ROM drive that I started with was a TEAC CD224EB93. It had a Japan Aeronautics Engineering (JAE) connector (JAE-KX14/15). Unfortunately, the connector does not have a wire adapter and I had to solder a wire to it manually. This connector had 0.8mm spacing and soldering 30 wires to it was a nightmare. The soldering took up much of my spring break.

Schematic 2 - CD-ROM interface (part a)

 

Schematic 3 - CD-ROM interface (part b)

Schematic 4 - CD-ROM interface for TEAC-CD224EB93 notebook CD-ROM drive.

 

Bi-directional level shifting

The Mega128 operates at 5V while the STA013 operates at 3V, thus their interface required the use of a level shifter. The PJRC MP3 website did have some level shifting using resistors, however I wanted to find a more elegant solution. In my research, I found level shifting suggestions on the Phillips semiconductor website (Philips Semiconductors - I2C - About the I2C-bus). Two mosfets and a pair of pull-up resistors were used for the bi-directional level shifting.

Instead of building the bi-directional level shifter, I adapted a Maxim MAX1840for this purpose. The MAX1840 was intended for SPI/QSPI/MIRCOWIRE level translation and hence was not directly compatible with the Phillips I2C bus. However the following modification to the serial data (SDA) line allowed me to use the MAX1840.

Note that although the I2C specification requires a pull-up on the serial clock line (SCL), this is not needed when there is only one master (MCU) on the bus. Moreover because only masters can set the SCL level, the SCL line need not be bi-directional since only the MCU is the master. The bi-directional requirement of the SCL line is mainly for arbitration between masters and fortunately is not required for this project.

Creative use of the I/O, CLK and Reset lines of 2 MAX1840s is sufficient for the I2C interface.

 

Max1840 #1

Max1840 #2

Max1840

STA013

Function Pin # Function Pin# Function Pin#
I/O 10 SDA I2C 3 DATA_REQ 28
Vcc 9

3V

CLK 8 SCL I2C 4 SCKR 6
RST 7 !Reset 26 SDI 5
GND 6

GND

 

MCU

!Shutdn 5 5V
Rin 4 !Reset PF.7 SDI PD.7
Cin 3 SCL(TWI1) PD.0 SCKR PD.6
DVcc 2 5V
Data 1 SDA(TWI1) PD.1 DATA_REQ PD.5

Table 1. Port connections for the MCU and STA013 Interface

TWI1: Two wire interface. ATMEL documentation refers to the I2C functions for the Mega128 as TWI.

There was another MAXIM part (MAX 3370) that was made specifically for I2C level shifting. However this part only had two input and output lines which was insufficient for my use. (Click here for a picture of my work on the MAX3370).

Home | Design | Results | A 2nd try | Schematics | Code | Files | Links | Contact

For problems or questions regarding this web contact Zhi-Hern Loh.
Last updated: 05/02/02.