You are on page 1of 4

FLASH TO FLASH DATA COPIER

DEVICE
A.W.S Martirez, M.B Rubis, L.F Gube L.R Rempillo,

College of Engineering, Ateneo de Naga University


Ateneo Ave, Naga City
Philippines

Abstract-The Flash to Flash Data Copier device include offering devices the option to be powered by the
transfers and deletes any kind of file. It comprises USB ports, host (with a maximum power consumption of 500mA per
USB host controller, and microcontroller. The device transfers physical connector) and releasing of Version 1.0 of the USB
data from the source USB disk to its destination disk, it also specifications delivered on 15 January 1996. Version 1.0
copies and deletes file individually. The USB host controller specifies 2 forms of signaling transfer rate: Low Speed
used was SL811hs with a capacity of 256-byte and supports
12Mbps at full speed. It also uses a PIC18f242 microcontroller
(1.5Mbits/sec) and the Full Speed (12Mbits/sec).
for handling a program and processes. USB devices, such as The motivation of differentiating two transfer speed
Source and Destination Flash, communicate its transaction was to maintain the low-cost implementation of computer
using the protocol for file system FAT 32. peripherals such as keyboards and mice, and, still allow
On the other hand, the main software used assembly higher speeds devices such that printers and scanners to be
language to directly control the IC’s and for faster execution of able to use the same serial bus. The physical layers were
commands. Aside from copying and deleting a file individually, layered with the protocol layer. The protocol layer divides
the Flash to Flash Data Copier is user friendly because it has the bus time into several priorities of Control, Interrupt,
LCD to visualize the processes that occur while the user is
Bulk and Isochronous transfer. This protocol is handled
using the device. Also, the device has individual ports for
source and destination disks. The capacity of data that can be through a combination of hardware and software on the
transferred is limited to 32KB because the memory of the Personal Computer as discussed in [12]
device that the researchers used was not enough to support the Opening a Universal Serial Bus device that is
operation so it is suggested that as long as the file header is less inserted to the USB port of a computer is an easy to learn
than the data to be copied else it will be corrupt, it is suggested task because it is just a plug and play device. Having a
that a device with a higher memory should be used for freely computer, which already has drivers and guide on how to
sending back and forth of data. Further study uses Bulk-Only operate USB devices can be done even by a common
Transport Protocol to accommodate the specification of USB student, however designing a new device with embedded
Mass Storage Devices.
drivers and display without the use of a computer is an
interesting and challenging project. Designing out of
nothing will likely be reading a several books for the first
I. INTRODUCTION
time.
Universal Serial Bus (USB) as stated in [1] is the
newest bus designed by an ATX class system; it is intended
to connect peripheral devices like keyboards, mouse, a II. STATEMENT OF THE PROBLEM
modem, and sound cards to the microprocessor through a
serial data path and a twisted pair of wires. It is also The FLASH to FLASH Data Copier Device, using a
designed to allow peripherals to be connected without the flash memory or a flash disk is becoming a popular device.
need to plug expansion cards into the computer sockets and It is used by MP3 players, digital cameras and others. The
also to improve plug-and-play capabilities by allowing device was carefully designed to help all flash disk users.
devices to be hot-swapped, meaning that the systems do not It has been a problem to every user of flash disk to
need to be powered down before connection or look for a computer to plug in their USB devices just to get
disconnection. the needed data. Aside from waste of time, it consumes a
Universal Serial Bus came into life when a group of bigger rate of power bill, which in fact USB device just
7 companies: Compaq, Digital Equipment, IBM, Intel, needs 3.3V to 5V.
Microsoft and Northern Telecom decides to form a And the worst, if there is an urgency to copy a certain
specifications to merge legacy connectivity such as RS232, file or files and blackout/power interruption occurs.
Printer port, PS2 port into a single common connector to the
Personal Computer cited in [11]. These improvements
III. METHODOLOGY host controller for the data flow and controller for the USB
and the USB ports for the flash disks socket.
The main framework of the design is divided into two Upon inserting the USB device on its designated
systems, hardware and software operations. ports the FLAG register of SL811HS will become 0 and
The hardware part is generally contains two pieces of PIC18f242 will be updated.
USB controller (SL811HS), one microcontroller
(PIC18F242), four push button, one Liquid Crystal Display
(LCD), and power supply for microcontroller(5 Volts) and
USB controller(3.3 Volts). The USB controllers and the
microcontroller are the two main parts of the project. The
PIC18F242 manipulates the file system and segregates the
needed data, such as: filename, location of sector, cluster,
part of the FAT and size.

Figure 3-1 Block Diagram

In figure 3-1 shows the relationship of each parts of


the device. Arrows represents the flow of instructions and
the microcontroller acts as the main brain of the device.
USB controller controls the USB Device, which is
also controlled by the PIC18F242. There is a command that
is being sent by microcontroller to USB controller, stated on
its data sheet. There are two USB host controller used, one Figure 3-2 Flow
for the source and the other for the destination.
Power source is either 9 volts of adopter or 9 volts of For the software part, the flow of the program which
battery, it uses LM 7805 to regulate a 5 V supply for the will handle the file system and as well as the device
PIC18F242, transistors and diode was used to step-down the operation is shown in figure 3-2. The device has mainly this
voltage to produce 3.3V for the SL811HS host controller. function, upon inserting the USB flash disks and turned ON,
Crystal oscillator is the heart of PIC18F242 and SL811HS the LCD will prompt the title of the study and waits for the
for communication and synchronization to the USB user to press the OK button. After pressing the OK button
Flashdisk. The device can operate on its own operating the screen will display the files that are located on the
system embedded on the microcontroller. Push buttons was source disks and users can freely choose the file they want
used to choose the desired filename to be copied or delete. to copy or delete by the use of UP and DOWN buttons.
Liquid Crystal Display for the visual interface, SL811HS If the user choose a file that is greater than 32KBytes
it will ask if the user wants to continue to the selected
process, after pressing the OK button for yes and CANCEL microprocessor has a full control to the USB device port
for no then it will prompt with the copy and delete process. through the program. This will eliminate the unplugging and
If it selects the copy command, it will ask a question if you plugging of the USB device to the USB port for the purpose
want to continue the process. If yes it will copy the selected of wanting to reset the USB device. With this design, it can
file from port A to port B otherwise it will go back on reinitialize again and return to the previous process from
displaying the file for selection. If you select the delete where it was stopped.
command, it will also prompt with a question if the user
really wants to continue the process or not, if yes it will These are the following files that the device can
delete the file, otherwise it will go back on displaying the transfer as long as the file size is not more than 16KB.
file for selection. Then, the device can now be turned off
and remove the USB disks. *.txt,*.dat Text Document
*.rtf Rich Text Format
IV. RESULT AND ANALYSIS *.jpeg JPEG image
*.htm Internet Explorer
The device can displays the filename of the files in *.xls Microsoft Excel Wordsheet
the USB flash disk, through the LCD, and be able to delete *.ckt Circuit File
or copy the file on its destination port but with several *.bmp Windows Bitmap Image
limitations stated previously. As of now, the device can be *.gif Graphics Interchange Format
able to detect whether a device is inserted and if it is a flash Image
memory or not. *.tif Microsoft Office Document
The device was able to delete and copy an individual Imaging File
file with an average size of 32Kbytes. This was taken *.png Portable Network Graphics
through experiments but it still depends on the how the file Image
is allocated on the memory. Greater than the limited file *.obj Object File
size, the device might stop in responding and it can be *.o O file
visual seen through a loss of power of the USB device. An *.lst MASM listing
indicator that the device losses its power or the incapability *.hex Hex File
of the device to respond is the turning off of the LED of the *.asm Assembly Source
device. A lit LED indicates that the device is ready and an *.ld LD file
alternate on and off of the LED indicates that the device is *.h Header File
processing. *.c,*.cpp C++ Source File
The Flash to Flash Data Copier was designed to *.map Linker Address Map
transfer any size of files but because of the problems *.zws ZDS Document
encountered, the operation of the device was not *.m M File
maximized. Upon implementation and experimentation *.fig Fig File
problems were encountered during the process of working *.vb Visual Basic Source
with the device. One of these was to increase the random
access memory (RAM) so that it will have enough or large
RAM memory for a large files to stored the clusters where
the files is allocated and also to have enough or large RAM
memory for data buffering for the data to be copied. A large
RAM memory is better because it will lessen the read and
write command that will be thrown by the USB host
controller to the USB device.
It will also speed up the data transfer. The second one
is to look for that USB specification where you can refresh
the USB device so that it can go back and be able to respond
to the USB host command. Previous studies show that the
host must issue a bulk-only mass storage reset but it is
lacked on support command. It is suggested that there must
be a follow up command that must be issued after the reset
command so that it works properly and be able to wake up
the device from not responding. The third one is to include
on the overall design to the microcontroller or
microprocessor the control of the +5 volts supply to the Figure 3-3 Actual Picture of the Flash to Flash Disk
USB port. In this way, the microcontroller or Data Copier Device
As shown in figure 3-3 is the actual prototype of the [2] Catsoulis , John,” Designing Embedded
device. The LCD serves as a display and the four buttons Hardware”, 2005
serve as an input for human interaction and manipulation. [3] Norton, Peter, “Programmer’s Guide to the IBM
The device will not work properly if either the source or the PC”, 1985, pp 99-125
destination port doesn’t have the flashdisk. So be sure to [4] USB in a Nutshell: “Making Sense of the USB
insert the flashdisk on both ports before turning ON the standards”, a PDF file taken form www.usb.org
device. [5] Axelson, Jan,”USB Complete: Everything you
need to develop USB Peripheral, Third Edition”,
Copyright 1999-2005
V. CONCLUSION [6] Universal Serial Bus Mass Storage Class: “Bulk-
Only Transport”, Revision 1.0,September 31, 1999
The main objective of this project is to create a [7] Microsoft Extensible Firmware Initiative FAT32
FAT32 based file system device, which can transfer data File system Specification FAT: General
from one USB Flash device to another USB Flash disk Overview, found on the Internet using
device without the use of a computer. The device has two www.google.com
main processes, to copy and delete a certain file. [8] FAT32 Structure Information - Written by Jack
There are several devices that is use to transfer data Dobiash Updated: December 4th, 2005
but were restricted to the given operating system of [9] “D12 Mass Storage Kit (USB to CompactFlashTM
Windows. or IDE)”, December 2000, a PDF taken from
One of the main advantages of this system is that www.flexiusb.com
USB Flash disk is very much popular; therefore, the general [10] Meerman, Robert,” USB Implementation to
public can participate and anticipate the quick and available communicate with a Nintendo Game Boy
data using this device. Advance”,2005
Although the design approach is not completely [11] Leong, Chui Wei,”Understanding Universal Serial
decided, a very good foundation has been established to Bus (USB)”. Taken from www.usb.org. ( accessed
base the current design and approach. Programming in 2006 )
assembly language will allow for direct execution of [12] USB mass Storage Chapter-1: Mass Basics, A PDF
programs. Simulation will be needed to project the circuit taken from www.google.com(accessed 2006)
and for troubleshooting. Firmware will then be used to
allow interaction between the hardware and software.
The limitation of the capacity of the data will be
limited because there was problems occurred. A deep
research on FAT32 file system structure and the USB
specification command must be done and properly
implement it. A deep study on the efficient and effective
algorithms on how the clusters of the files be transferred
from source disk to the destination disk must also put into
program code depending on the microcontroller used.
The project can contribute to the institution by using
it as a stepping stone to give importance and some focus on
directly manipulating and controlling the hardware and
some standard set by the present industry like file system
and Universal Serial bus (USB). While working on the
project, it gives the innovators the actual basic knowledge
on how the flash disk works and it gives proof on what other
references says, thus, the process makes the innovators
closer to the present industries.

VI. BIBLIOGRAPHY

[1] Brey Barry B.,”The INTEL


MICROPROCESSORS” Architecture,
Programming, and Interfacing, Seventh Edition,
2006