This is only a preview of the March 2004 issue of Silicon Chip. You can view 20 of the 96 pages in the full issue, including the advertisments. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. Items relevant to "QuickBrake: For Increased Driving Safety":
Items relevant to "3V To 9V DC-DC Converter":
Articles in this series:
Articles in this series:
Items relevant to "Power Supply Demo Design":
Items relevant to "PICAXE-18X 4-Channel Datalogger; Pt.3":
Articles in this series:
Purchase a printed copy of this issue for $10.00. |
Flash! Is the Zip Disk dead?
How do you move significant
amounts of data from one
place to another? For years,
the ubiquitous Zip disk
reigned supreme.
Could USB Flash Disks be to the Zip
as the Ice Age was to dinosaurs?
Put it on
the BUS!
M
oving large amounts of data
– photos, music, video, etc,
from one computer to another
has been a problem since there have
been computers and large amounts
of data! If the files were more than
a floppy’s worth (ie, 1.4MB or thereabouts), smarter solutions needed to
be found.
Indeed, very close to home, this
problem has caused not just a few
headaches here at SILICON CHIP. As
you would imagine, magazines like
SILICON CHIP have been produced
on computers now for many years
(thank heavens for desktop publishing, photo manipulation and drawing
packages!).
But we don’t own a huge printing
press capable of printing a 100-page,
four-colour magazine (office photocopiers don’t quite cut it!)
So if the mountain won’t come to
Mohammed, Mohammed has to go to
the mountain. Ergo, each month we
have to send a complete magazine’s
worth of files to the printers.
Very early on, we used whopping
(for then!) 44MB “Syquest” disks –
many of them for each issue.
Even progressing to 88MB Syquests
helped only a little. They were somewhat unreliable and, being magnetic
recordings, occasionally suffered
catastrophic failure. There were even
16 Silicon Chip
a couple of times when we were forced
to record the magazine on a hard
disk, remove the hard disk from the
computer, package it very carefully
and then airfreight that to the printers.
(Don’t knock it – it worked. And got
us out of some tight spots!)
We also used ZIP disks – both in
their original 100MB format and their
250MB reincarnation. The disks themselves were usually very reliable in the
short term but we found the drives left
a little to be desired mechanically. We
By
Ross Tester
had several failures in the one year.
Besides, ZIP disks were/are relatively
expensive.
SILICON CHIP was a very early adopter of CD-ROMs (back when CD writers
operated at x1 or x2 maximum and
discs were several dollars each!). To
this day, we still record the bulk of the
magazine (usually about 500-600MB
per issue) on a CD-ROM and despatch
it to the printer. At least these days we
have 40x and 50x writers.
It is very difficult to buy a computer
Physically small enough to
carry around on your keyring,
capacity-wise large enough (if
you pay enough!) to take your
sensitive data with you. This
one is a 32MB drive but you
can now get them up to 2GB.
www.siliconchip.com.au
They’ve been faithful servants, but
maybe it’s time they were retired. . .
without some form of CD writer (or
rewriter, or DVD writer, etc) installed
– so just about everyone has one. So
what’s wrong with the average person
using CD-ROMs to transport data between computers?
Nothing, much. Except that copying
files to a CD or DVD is certainly not as
simple as copying files to, say, a hard
disk (or even a ZIP).
It is not an instant process and CD
writers are definitely not fault (or interruption) tolerant in the recording
process.
And if you are in a screaming hurry
(eg, the courier is tapping his fingers
loudly on the reception desk), Murphy’s law says that’s when you are
going to write a “coaster”.
Besides, what if you only need a
relatively small amount of data – say
a few dozen megs or so. Writing to a
660MB CD seems to be something of
a waste to us, even taking the low cost
of CDs these days into account.
We’re not trying to dismiss CDs out
of hand – as we said, we use them
regularly. But for the casual transporting of data between machines, there is
a better way!
ports which have been on computers
virtually since day one is in the way
data is transmitted. Serial and parallel
ports send data bit by bit. The USB
organises the data into “packets” and
sends those.
Because of this, a USB port requires
only four wires – two for power and
two for data. (See the separate box
which explains more about the USB
port).
It took some time for the USB to
catch on. Indeed, in the early days there
was so little call for USB devices (or
more likely so few USB devices available) that for some time case manufacturers kept USB ports on the back
panel of the computer – about the most
inaccessible place they could be.
But over the past couple of years, we
have seen a plethora of USB devices
released – so much so that just about
every computer sold these days has
the USB ports on the front panel and
many motherboards support four USB
ports. If not, inexpensive add-on cards
can give you more USB ports for your
computer.
While you can buy just about any
peripheral these days to operate via a
USB port, the thing that most interests
us here is the range of USB storage
devices now available.
Most particularly, we are looking
at some of the “flash disks”. These
are available in many formats – we’re
going to look at a few of these in more
detail shortly – but apart from their
healthy storage capacities, the most
noticeable thing about flash disks are
their size (or lack thereof!)
Most are only a couple centimetres
wide and perhaps five or so long. If
you have to carry data around with
you, or move it from PC to PC, this
surely must be the simplest and easiest way yet.
What’s more, on most modern machines, when you plug one of these
USB devices in, the computer not only
recognises it immediately but assigns
a drive letter to it, making it “just another hard drive” on your computer.
Anything you can do with a traditional
hard disk drive, you can do with a USB
flash disk drive.
Flash “Disk Drive”?
No, they’re not – disks nor drives!
The term has stuck because everyone
is used to, well, disk drives, where
things (disks) spin inside and make
whirring noises!
The name can be a bit confusing – a
flash disk is entirely solid state; there
is no mechanical “disk” to “drive”. In
fact, a flash disk is a type of EEPROM,
(electronically erasable programmable
read-only memory). The “ROM” part
can be anything from 16MB right up
to 1GB and now beyond. (2GB are
available but they’re expensive).
That’s a rather impressive amount of
storage for something that can not only
be hidden in the palm of your hand
(or even between your fingers!), it can
often be hidden inside other devices
such as watches, pens, etc. We’ll look
at some of these shortly.
Unlike other forms of memory, the
flash disk does not need constant
power, just while being read from or
written to. Once data is written into
it, it stays there until it is erased and
Enter the USB . . .
There probably wouldn’t be a computer sold today that doesn’t include
at least two (and sometimes more)
Universal Serial Bus, or USB, ports.
USB offers high speed and reliable
data communication (especially in its
newest incarnation, USB2.0).
The USB standard was developed by
a consortium of organisations including Compaq, Hewlett-Packard, Intel,
Lucent, Microsoft, NEC and Phillips.
The main difference between the
USB port and the serial or parallel
www.siliconchip.com.au
Flash disk manufacturers
are getting pretty clever – this
is the new “Cruzer Micro”
from SanDisk. It’s very
fast (USB2), is available
up to 512MB capacity and
even has an optional portable
docking station which turns it into
an MP3 player! SanDisk also has a
Titanium model in the Cruzer
range, claimed to be virtually
indestructible.
March 2004 17
re-written. Again, this lends itself very
much to a portable format.
USB flash disks are, by and large, “hot
swappable” – another big advantage over
many other forms of storage. You don’t
have to power down the machine, swap
the drive, and power back up again. It
can be inserted and removed at will,
with just a couple of provisos:
(a) Do we have to say it? You must
never remove flash disks (or any form
of storage) while being read from or
written to (most types of flash disks
have a LED on them to warn you
when “in use”, a la the hard disk LED
on your PC). Not only would data be
lost, the chances are very high that
other data already on the flash memory
would be scrambled.
(b) While you can simply remove
the device from the USB port once
writing is finished, most operating
systems don’t particularly like this and
give you a stern warning when you do
it (you almost expect a hand to come
out of the monitor and slap you on the
wrist).
The operating systems like to be
told that you’re about to remove the
USB device and give you an icon on
the task bar to allow you to do this
easily. They then graciously give you
permission!
With the exception of Windows
98/SE, you normally don’t need any
drivers. You simply plug ’em in and
This is a REAL USB Pen Drive –
complete with the pen! The flash
disk is in the top half of the pen
and is unscrewed from the body
to reveal the USB connector (see
inset).
your computer will tell you that it has
found the disk and is ready to rock
and roll. It will simply assign the next
available drive letter in your system
unless you specify otherwise (which
you can easily do).
Why would you do that? I have
made my USB flash disk drive “U” (U
for USB) in all computers I use it in,
because some software I use insists on
a certain drive/directory/file setup and
gets confused otherwise.
Nobody really knows (yet) how long
that data will stay in memory without
power. Various sources claim between
ten and forty years (yes, years) – but
we’re going to have to wait for quite a
while to verify those claims.
By the way, USB Flash Disks, in
all their varieties, are not the only
place you’ll find flash memory used.
It’s everywhere these days – from the
memory card inside a digital camera
(and they are also available in many
varieties!) to video games consoles, to
the PC-card memory used in notebooks
and laptops . . . even your computer’s
BIOS chip is likely to be flash memory
(definitely an EEPROM at any rate).
USB Flash Drives
Reproduced significantly
larger than life size, this
photo shows what’s inside a
typical USB flash disk drive.
As you can see, there’s precious
little in the way of a disk . . .
18 Silicon Chip
These are commonly available and
are now getting quite cheap. Sometimes they are called keyring memory
because they are small enough to go
on a keyring. Other suppliers call
them pen memory (though that could
be confusing, as we will see in a moment).
Our sample 128MB drive came
from Oatley Electronics in Sydney
(www.oatleye.com; 02 9584 3563) who
have drives from 16MB to 512MB.
Most of them are 78mm long, 22mm
wide and 11.8mm deep (the largest drive is 82mm long). There is a
write-protect switch to prevent you
accidentally destroying data.
Prices from various suppliers vary
enormously – we found Oatley’s compared well. The 16MB sell for $24.00,
while the 512MB sell for $340.00.
Obviously, the larger capacity drives
are the best value at about 66c per
megabyte.
www.siliconchip.com.au
Look, it’s a watch. No, it’s much more than that: it’s also a 128MB flash disk
drive. This one is from Dick Smith Electronics and sells for $99.86. The package
includes a driver CD and USB extension cable. This drive has the incredible
advantage (for me) of going wherever I go – no more lost data or lost disks!
And here is the interface: a standard
USB cable (albeit pretty short!) which
normally hides in the watchband. By
the way, this watch is definitely NOT
waterproof . . .
They’re supplied with a USB extension cable and a mini CD containing
Win98SE drivers and other goodies. A
neck lanyard is also supplied so you
can actually wear the disk!
The latest models from Oatley have
a couple of new really worthwhile
features: an advanced email server;
Zip compression and decompression
to pack more onto your drive; a PC
lock (you can use the flash drive to
lock your PC – just be careful not to
lose the drive!); and data encryption
so if you do lose the drive, no-one else
will be able to read it.
One of the biggest advantages of
these drives, the tiny size, is sometimes a disadvantage to me: I’m
forever losing it in the bottom of my
briefcase!
Similar flash drives are also heavily
flogged on Ebay so if you’re an Ebay
user and prepared to take some risk,
you might save a little bit. And at
least one US webstore was selling a
128MB flash drive for $US19.99 (about
$AU26) around Christmas time!
Since starting the research for this
feature, one problem with flash drives
has emerged. We said they are tiny
but perhaps, not tiny enough for some
computers.
Flash drives have the USB connector
moulded into the end of the case, usually with some form of collar around
the end. We have come across several
notebook computers where the USB
port is recessed slightly into the case
and the collar prevents the connector
making reliable contact (sometimes
not at all).
Again available in capacities from
16MB to 512MB, these came from an
Ebay shop: Chansnetwork. Once again,
prices vary depending on size – they
range from $27.00 for 16MB through to
$280.00 for the 512MB version. Again,
the larger the capacity, the better value
– the 16MB costs $1.68 per megabyte;
the 512MB costs 54c per megabyte.
You can access chansnetwork via
Ebay (search USB pen) or give them
a call toll free on 1800 002 810, ext
8633.
www.siliconchip.com.au
In this case, the simplest answer is
to use the USB extension cable that
is supplied with many flash drives
(or is available from computer stores
very cheaply).
Pen drives
Remember we said before that calling flash drives “pen drives” could be
confusing? Here’s why: we found a
flash drive actually built into a pen! The
top part of the pen unscrews to reveal
a USB plug – the drive’s indicator LED
is built into the pen case top.
These pen drives operate exactly the
same as a “normal” flash drive. And,
surprise surprise, just like a normal
pen (OK, so maybe just a tad heavier
than your Bic Biro!). They come in a
gift box with a mini CD driver disk.
USB watch drive
If you thought the pen drive was
nifty, have a look at this one from
Dick Smith Electronics. It’s a USB
flash drive built into a fully functional,
fashionable man’s watch.
It looks just like a
digital camera –
and it is, until you
want it to become
an emergency
flash disk drive!
March 2004 19
should be able to read and write to
the camera card – and it could! I
copied the files I needed to the camera, unplugged it and transported it.
I plugged it in the other end: presto,
another hard drive.
I am not saying every digital camera
will work like this. But I would assume the vast majority would – if they
operate via the USB port and have a
drive letter assigned, you should have
no problem.
It’s a USB drive but it’s
not a flash drive. This box
contains a standard 80GB
IDE hard drive (see inset
above) along with the IDE
to USB interface. You can
buy cases without drives
as well. Not shown here
is the 12V power supply
required by this box.
There was (at time of writing) only
one capacity available, 128MB, and
this sold for $99.86. That compares
very favourably with either the flash
drives or the pen drive above AND you
get a great-looking watch thrown in.
For reasons best known to themselves, DSE call it the Dataspy (Cat
XH8138). You also get a full-size CD
with a user’s guide (PDF), drivers
for Win98/98SE and OpenOffice.org
plus ZoneAlarm software. There’s
also a quite comprehensive printed
user manual.
I mentioned before that I am forever
misplacing the flash drive because of
its tiny size. Same thing will happen,
I’m sure, with the pen drive. (Where
did I leave my pen?). It simply won’t
happen with the watch drive because
it’s there, on my wrist, when ever I
need it.
The connection to the USB port is
made via a small (50mm) lead which
normally sits in the watch band. Like
the flash drive, an extension cord is
provided for the USB port so you don’t
even have to remove the watch to read
the disk (just remember to disconnect
yourself before you walk away!).
I’m not exaggerating when I say
that everyone who has seen the DSE
Dataspy is impressed – the usual
comment is “I’ve gotta have one of
those!”.
You can get yours at any Dick Smith
Electronics/DSE PowerHouse store, or
mail/net order (1300 366 644 or www.
dse.com.au).
Thinking outside the box . . .
A few weeks before starting this
20 Silicon Chip
Thinking inside a box!
feature (before I acquired these goodies!) I needed to move, in a hurry, some
large (50MB) graphics files between
two computers several kilometres
apart. Trouble was, I didn’t have any
means to do it. And as luck would
have it, my CD burner was in yet
another machine.
I figured I had two choices. Move the
CD burner (naaaaah!) or “ftp” the data
over the ’net – but I really didn’t want
to wait the eight hours or so it would
have taken on my (painfully slow) dialup connection. What to do?
It suddenly dawned on me that I
was looking straight down the barrel
(or should that be lens?) of the answer:
my digital camera! It too has a flash
disk inside it – in this case, a 64MB
SmartMedia card. And it has a USB
connection cable. When plugged in
and turned on, the camera behaves
just as any hard disk drive, just like
the flash memory.
I reasoned that being the case, I
OK, so we have extolled the virtues
of USB flash drives. But what happens
if you want REAL storage capacity –
more than the one or two gigs currently
available.
Of course, there is an answer. It’s not
a flash drive – though it behaves pretty
much the same (you plug it in to the
USB port and away you go).
It’s a bog-standard 3.5-in IDE hard
disk drive (in this case an 80GB Seagate), mounted inside a case which
also contains an IDE-to-USB converter.
Because “normal” IDE drives also require 12V, there is an also an external
plugpack mains supply.
We found this solution at one of
our usual computer suppliers, Cam1
(www.cam1.com.au; 02 9999 5600),
although these are also very commonly available at computer stores
and through Ebay. With the drive, it
cost us $350.00
We’ve also seen these cases sold
without drives (significantly cheaper),
so you can put your own one in (or
change it as required).
Incidentally, you can buy similar
cases for 2.5-inch “notebook” drives
(these don’t need an external supply because they need only 5V and
this is available from the USB port).
These “Dazzle” USB card readers from Oatley Electronics accept a variety of
flash memory cards and can also be used for data storage – if you happen to
have the right card! The readers themselves are very cheap.
www.siliconchip.com.au
These are also much cheaper – you
shouldn’t pay much more than about
$30.00 -$50.00.
Card readers
Before we finish with USB devices,
it’s worth noting how cheap USB card
readers have become lately. Oatley
Electronics have them for $6.90 each,
with models handling secured digital/
multimedia, CompactFlash, or SmartMedia cards. (If you buy all three, you
can get them for $15.00).
Jaycar Electronics (www.jaycar.
com.au; 1800 022 888) have a 6-in-1
internal USB card reader for $54.95.
These cards are all examples of flash
memory in use. You can write to or
read from these cards just as you would
a normal USB flash disk.
We found the reader particularly
handy because we’d recently purchased a second SmartMedia card
for the digital camera. So when not
needed for the camera, the card became yet another hard disk.
Depending on the computer and
operating system, it could be as simple
as plugging the reader in. If drivers are
needed, they can be downloaded from
the Oatley website.
Removable drives (non-USB)
These have been around since Adam
played half-back for the under-7s, so
it’s unlikely you haven’t at least seen
them advertised, if not used them
yourself. We looked at them in detail
way back in the October 1997 issue.
First, what they are not: unlike all of
www.siliconchip.com.au
This is a standard IDE
drive in a removable
drawer (often sold as
a “Mobile Rack”) and
for some time has been
a popular method of
making data portable.
However, we have had
a few instances of data
loss or damage, possibly
due to poor contacts
between the drawer and
the frame.
the other storage media we’ve looked
at in this feature, they are not a USB
drive. What they are is a standard IDE
hard drive used on the IDE bus, just
like your normal (internal) IDE hard
disk drive. A plug-in drawer contains
the hard disk drive, while a matching
caddie is located inside the computer,
with the drawer pushing into place
via a flap.
The caddie has a multi-pin socket
and the drawer a matching plug;
when pushed home the two mate and
provide all the connections (data and
power) required by the drive. They’re
quite cheap and readily available at
most computer stores or Ebay.
The drawback (pardon the pun!) is
that you need to buy more than one
caddie if you are going to use them on
more than one machine. Of course, if
you buy two sets you can also use a
second hard disk.
One point to note about these drives
if you use an older (slower) drive: if
you fit the drawer drive as the slave
drive on your primary IDE port (ie, the
port which also has your master drive),
the master drive will be crippled back
to the speed of the older drive. It’s always best to fit the draw drive as the
slave on the secondary IDE port, the
one which has your CD-ROM or CDR
on it as master.
Finally, these drives are exactly
the same as any other IDE drive – you
must power down before removing
the drawer – unless you buy one specifically intended for “hot swapping”.
These are not uncommon but are more
expensive.
We must be honest here: over the
years we have had problems with this
drawer system. Perhaps it’s oxidation
of the contacts; we’re not sure.
But there have been intermittents
and loss of data, even a dead drive – to
the extent where now we do not trust
them (nor use them!). Not when USB
flash disks are available!
March 2004 21
About the Universal Serial Bus . . .
As you may know, there have been
two versions of USB – USB1 (or more
correctly 1.0 then 1.1) and USB2. The
difference is mainly speed: USB1.1
allowed a data throughput of between
1.5 and 12MB/s, the newer version
1.5, 12 and a whopping 480MB/s.
While 12MB/s is quite respectable,
the differences are quite staggering. Looking at manufacturer’s data
sheets, a typical flash drive could back
up 1MB of data in 17min 33sec via
USB1.1. Via USB2 this would be thirty
times faster at just 37sec. Transferring
50 hi-res (25MB) digital photos or
MP3s wouldn’t be quite so dramatic:
32 seconds vs 7 seconds, or about
five times faster.
USB 1.1 and USB2 are usually (with
some exceptions) interchangeable
because USB2 encompasses low
and medium speeds as well. Most
plug-in USB flash drives conform to
the USB1.1 standard.
The USB port has four contacts. Pin
1 is typically colour coded red (+5V),
pin 4 brown (power ground) and pins 2
and 3 connect to a twisted pair (yellow
and blue) to carry the data. The cable
is also shielded.
The USB cable is generally limited
to five metres and up to 500mA can
be supplied from the port for devices
which need power, although many
USB peripherals have their own power
supply. Needless to say, USB flash
disks do NOT fit into this category.
Upstream and downstream
Most flash disks plug directly
into the host computer via the plug
moulded in.
Other devices which need to connect via a USB lead usually have
different plugs on each end.
(Above): upstream (or type “A”)
USB plug connects to the PC.
(Below): downstream (type “B”)
connects to the USB device.
The USB plugs are designed to work a
certain way around. The “upstream” connector (also called a type “A” connector)
is designed to plug into to the host computer. Conversely, the “downstream (or
type “B”) connector plugs into the USB
device. Most type “B” plugs are smaller
and squarer than the flat, rectangular
type “A”. Note that there are at least three
(and probably more) sizes of type “B”
plugs, depending on the manufacturer
of the USB device.
There are also USB “extension leads”
which have a type “A” connector on one
end and a socket the same as the host
PC on the other end.
Using hubs
Up to 127 USB devices can connect to
the host device, either directly or (if you
run out of ports) via a USB hub. Two and
four-port USB hubs are very common
(and cheap!), while larger numbers of
ports are not hard to get.
Hubs can be either self-powered (via
a supply) or themselves powered by the
USB bus. If you need to add power-hungry USB peripherals (or a lot of them!)
you’ll need self-powered USB hubs to
ensure enough power is available. Also,
if you wish to exceed the 5m limit, you
can do it by daisy-chaining hubs.
How does it know?
When the host computer powers up,
it queries (or “polls”) all of the devices
connected to the bus and assigns each
one its own address. This also occurs
when a new device is plugged in.
If the device is a flash drive (or even
contains a flash drive, such as a digital
camera), the host computer then assigns
the “drive” the next available drive letter.
From then on, it behaves just like any
other disk drive until it is removed.
Each device is queried as to what type
of data transfer it wishes to use. There
are three types:
Interrupt - A device which sends little
Pin
Name
Description
1
VBUS
+5V DC
2
D-
Data –
3
D+
Data +
4
GND
Ground
USB Port pin assignments.
22 Silicon Chip
A close-up view of the USB port as
would be fitted to your PC.
data, such as a mouse or keyboard,
would use the interrupt mode.
Bulk – Where data is received in one
big packet (for example in a printer),
the bulk transfer mode is used. A block
of data is sent to the printer (in 64-byte
chunks) and verified to make sure it
is correct.
Isochronous – A streaming device (such as speakers) uses the
isochronous mode. Data streams
between the device and the host in
real-time, and there is no error correction.
The host keeps track of the total
bandwidth that all of the isochronous
and interrupt devices are requesting.
They can consume up to 90% of the
480Mbps of bandwidth that is available.
After 90% is used up, the host denies
access to any other isochronous or
interrupt devices. Control packets
and packets for bulk transfers use any
bandwidth left over (at least 10%).
The Bus divides the available
bandwidth into frames with the host
controlling them. Frames contain 1,500
bytes with a new frame every millisecond. During a frame, isochronous and
interrupt devices get a slot so they
are guaranteed the bandwidth they
need. Bulk and control transfers use
whatever space is left.
System compatability
On the PC, USB works with most
recent operating systems from Windows 98 on. It also works on the Mac.
Drivers will probably need to be loaded
for Windows 98/SE but more recent
operating systems (eg, Me, 2000 and
XP) have the drivers built in.
However, if you run Windows 95 or
Windows NT on your computer, you’re
out of luck. Neither recognise the USB
– Win95 because it is simply too old;
WinNT because it was never designed
to work with USB.
SC
www.siliconchip.com.au
|