Full Version : SCSI ZIP Drive Digital Camera (AVR)
avr >>PROJECTS (AVR) >>SCSI ZIP Drive Digital Camera (AVR)


AVR_Admin- 04-26-2006
Introduction
The original motivation behind our project was a desire to interface with some type of real world device. Since one of the clear limitations of the Atmel chipset is the lack of storage space, we felt it would be useful if we could connect to some type of mass media storage device. Implementing a SCSI interface would allow us to connect to virtually any type of storage device - hard drives, CD-ROM drives, and various removable media. Since Sean had a SCSI Zip drive lying around his apartment, our project concept began to come together.
However, we felt that connecting to a Zip drive wouldn't do much by itself; we needed some data to store! After some research, we found that there were digital cameras that would connect through a serial port and had a simple programming interface. This was the perfect application of the Zip drive's 100 MB storage capacity.
We have designed a board, using two of Atmel's 90s8515 8-bit microcontrollers, that will retrieve a picture from a Barbie Cam and store that image onto a Zip drive with the press of a button. Additionally, our device can take stop-motion video and store the images in a numbered sequence of files. It is necessary to run these images through a Java program that will interpolate the raw pixel data into a readable bitmap file.

Although our project focuses on the Zip drive and Barbie camera, our project would also be able to handle data from any serial source and store it onto any type of SCSI-2 device with some minor code changes. A really neat feature of SCSI is that it's totally backwards compatible, so any modern SCSI device can easily communicate as a single ended asynchronous device and thus interface with our board


High Level Design
As mentioned above, we are using two Atmel microcontrollers in our project; one is responsible for interfacing with the camera, and one with SCSI. The camera chip connects to the camera through the UART at 57,600 baud. There are two buttons connected to the camera chip for taking snapshots and stop-motion video. The main while loop of the camera chip will test if either the snapshot button is pressed or the chip is in video mode. If so, the camera chip will send a few commands over the UART connection, and the camera will respond by streaming 20,680 bytes of picture data over the serial port. The camera chip buffers the image into external memory, and then transfers the data byte by byte to the SCSI chip.
The data transfer code uses four pins for data (to conserve usage of the I/O pins) and four for control. The SCSI chip controls the data transfer procedures by either requesting that an image byte be sent from the camera chip or that data be stored in/retrieved from the camera chip's external memory.
When the SCSI chip receives its first data, it constructs a new file on the Zip drive in the file allocation table (FAT) of the disk. It then writes the image data to the Zip drive byte by byte. The SCSI protocol allows the usage of an asynchronous handshake for each byte transferred, which we took advantage of since our microcontrollers couldn't handle fast, synchronous SCSI transfers. Additionally, the SCSI chip has its own UART which can be used to browse the contents of the Zip drive's root directory using the familiar DOS "dir" command and eject the Zip disk remotely by using an "eject" command!


Link: http://instruct1.cit.cornell.edu/courses/e...k26/Default.htm


Forumer™ is Voted #1 Free Forum Hosting provider
Build your own community today with the largest message board hosting company.