Axe027 Picaxe Usb Cable: Revolution
Axe027 Picaxe Usb Cable: Revolution
Axe027 Picaxe Usb Cable: Revolution
Index:
1.0) Introduction
2.0) General tips for using the AXE027 USB cable
3.0) Windows 2000/XP/Vista Installation
3.1) Windows 7 (32/64 bit) Installation
4.0) Linux Installation
5.0) Mac OS X Installation
6.0) Windows CE/PocketPC/Mobile Installation
7.0) PICAXE Download Circuit
8.0) AXE027 Circuit Diagram
1.0) Introduction
The PICAXE USB download cable is used to download PICAXE programs into
PICAXE chips. It can be used with any PICAXE chip or project board. The cable is
compatible with any software application that supports programming of PICAXE
chips.
The PICAXE USB download cable connects via the computer’s USB port. However
the cable contains a tiny circuit board, moulded into the compact USB connector.
This circuit contains a USB to serial convertor chip, and so the actual data transfer
to the PICAXE chip is via a 5V logic level serial connection.
Always plug in the USB cable before starting the software application.
Always use the USB cable in the same USB port on your computer.
Most operating system regards each individual USB port as a unique location.
Therefore if you plug your cable into a different USB port on the computer you
may be prompted to reinstall the driver files for this new location.
The USB cable’s internal circuit board is powered by the computer’s USB port.
Therefore remove the cable from the PICAXE project when the USB end of the
cable is not inserted into a computer, as the cable will not then be powered.
revolution Revolution Education Ltd. Email: info@rev-ed.co.uk Web: www.picaxe.co.uk v2.2 02/09
AXE027.PMD
PICAXE USB CABLE 2
After you have installed the drivers, if you are not sure
which COM port number has been allocated, you can use
Windows ‘Device Manager’ to study the configuration. To
use Device Manager click:
The Device Manager will then start - click the ‘+’ symbol beside ‘Ports (COM & LPT)’ so that all
the entries are visible. Beside the ‘AXE027 PICAXE USB’ entry will be the currently allocated
COM port number. The instructions given later in this manual explains how to change this
COM port number if necessary.
Please ensure you are using the correct driver package for your operating system.
The available Windows driver options are:
- Windows Vista, XP, 2003, 2000, ME, 98SE
There is no operating system support for USB in Windows 95 or NT.
If using the downloaded driver files from the website, unzip the downloaded files into a
temporary folder (e.g. c:\temp) before proceeding. On computers setup with user accounts (e.g.
school networks) please ensure you are logged in as an ‘administrator’ before proceeding.
Step 1
Plug the AXE027 USB cable into an available USB port on
your computer. Remember which port you have used as it is
important to always use the same port in the future.
revolution (c) Revolution Education Ltd. Email: info@rev-ed.co.uk Web: www.picaxe.co.uk V2.2 02/09
AXE027.PMD
PICAXE USB CABLE 3
Step 2
Select ‘Install from a list or specified location (Advanced)’
and then click ‘Next’
Step 3
Select ‘Search for the best driver in these locations’.
Remove the tick from the ‘Search’ box and add a tick beside
the ‘Include’ box. Click the ‘Browse’ button and then
browse to the driver folder. This is either the appropriate
folder within the ‘USB_drivers_AXE027’ folder on the
Programming Editor CDROM or the temporary folder on
your hard-drive where the website downloaded driver files
have been saved (e.g. c:\temp).
Click ‘Next’
Step 4
If a Windows logo testing warning is displayed click
‘Continue Anyway’
Step 5
Click ‘Finish’ when the installation completes.
Step 6
Please note the entire process (steps 2 to 5) will now
repeat. This is completely normal as the Windows
operating system requires two separate driver files for the
AXE027 cable to operate.
The Windows operating system will now automatically allocate the
AXE027 USB cable a default ‘COM port number’ to use within the
Programming Editor software. However this automatically
allocated COM port number may not be suitable (e.g. COM20)
and may need to be re-assigning to another port (e.g. COM4).
revolution (c) Revolution Education Ltd. Email: info@rev-ed.co.uk Web: www.picaxe.co.uk V2.2 02/09
AXE027.PMD
PICAXE USB CABLE 4
Step 1
Start the Programming Editor software.
Select the View>Options menu and click on the ‘Serial Port’
tab. Note which ports are greyed out (not used).
Select one of these greyed out port numbers (e.g. in this
example COM4)
Click the ‘Setup’ button to launch Device Manager.
Step 2
Click on the ‘+’ beside ‘Ports (COM and LPT)’ to browse the
current ports. Select the ‘AXE027 PICAXE USB’ entry and right
click the mouse. Select ‘Properties’.
Step 3
Select the ‘Port Settings’ tab and then click the ‘Advanced…’
button
Step 4
The COM Port number currently allocated is shown on screen
(COM20 in this example).
From the COM port number list select the desired new COM
port number and then click ‘OK’ twice to save the new port
number (none of the other settings need to be changed).
Step 5
In the Programming Editor now click the ‘Refresh’ button.
The desired COM port should now become available. Select
this port and then click ‘OK’. The system is now ready for use.
revolution (c) Revolution Education Ltd. Email: info@rev-ed.co.uk Web: www.picaxe.co.uk V2.2 02/09
AXE027.PMD
PICAXE USB CABLE 5
After you have correctly installed the drivers, if you are not
sure which COM port number has been allocated, you can
use Windows ‘Device Manager’ to study the configuration. To
view Device Manager click:
then click
The Device Manager will then start - click the ‘+’ symbol beside
‘Ports (COM & LPT)’ so that all the entries are visible. Beside
the ‘AXE027 PICAXE USB’ entry will be the currently allocated
COM port number.
revolution (c) Revolution Education Ltd. Email: info@rev-ed.co.uk Web: www.picaxe.co.uk V2.2 02/09
AXE027.PMD
PICAXE USB CABLE 6
revolution (c) Revolution Education Ltd. Email: info@rev-ed.co.uk Web: www.picaxe.co.uk V2.2 02/09
AXE027.PMD
PICAXE USB CABLE 7
This process MUST now be repeated to setup the Virtual USB serial
port driver.
revolution (c) Revolution Education Ltd. Email: info@rev-ed.co.uk Web: www.picaxe.co.uk V2.2 02/09
AXE027.PMD
PICAXE USB CABLE 8
revolution (c) Revolution Education Ltd. Email: info@rev-ed.co.uk Web: www.picaxe.co.uk V2.2 02/09
AXE027.PMD
PICAXE USB CABLE 9
revolution (c) Revolution Education Ltd. Email: info@rev-ed.co.uk Web: www.picaxe.co.uk V2.2 02/09
AXE027.PMD
PICAXE USB CABLE 10
However, as many different products from many different companies all use the same FTDI chip,
each product is given a unique ‘product id’ number for identification purposes. This unique product
id is programmed into the chip inside the cable, so that when the cable is connected to the
computer it can be uniquely identified.
The unique product id for the AXE027 USB cable is 0xbd90. The vendor id is 0x0403.
However the default driver ftdi_sio, as installed by most Linux distributions, only recognises a
couple of (default) product ids for the FTDI chip (e.g. 0x6001). Therefore it is required to ‘patch’ the
driver so that it correctly supports the AXE027’s 0xbd90 product id.
There are 3 different ways to do this, depending on user expertise with using the Linux operating
system.
Option 1 is to simply patch (“modprobe”) the driver details every time the cable is used. This is very
simple, but needs to be carried out every time the computer is restarted (before the AXE027 cable is
inserted). This method also works when running Linux from a Live CD (without installation).
Option 2 (recommended) is also fairly straight forward, and permanent as it involves adding a new
‘udev rule’ file to the operating system. The rule runs automatically each time the computer boots.
Option 3 is advanced and only for those familiar with kernel module recompiling. It involves
modifying the original driver source code and recompiling.
All 3 options are checked for correct operation in the same simple way – after inserting the AXE027
cable into the USB port the symbolic link file called
/dev/ttyUSB0
should automatically appear within the operating system.
Note that any application using the AXE027 cable needs to address this USB symbolic link
/dev/ttyUSB0
which is not the same as the traditional serial (e.g. “COM1”) port link
/dev/ttyS0
Remember the Linux operating system is case sensitive - ‘ttyusb0’ is not the same as ‘ttyUSB0’. If you
have more than one similar USB device attached the name of the second device will be ttyUSB1 etc.
The following instructions were tested on an Asus eeePc 900, running the default Xandros (Debian
derived) distribution and on a PC booted with a Ubunto live CD (not installed).
Note that although the principles are the same for most Linux distributions, different distributions
will use different methods for becoming root (aka “superuser”) (e.g. use su -l rather than sudo) or
for opening a Console Terminal. See the online documenation for your distribution for more
specific details.
revolution (c) Revolution Education Ltd. Email: info@rev-ed.co.uk Web: www.picaxe.co.uk V2.2 02/09
AXE027.PMD
PICAXE USB CABLE 11
Create a new file (e.g. using KWrite, gedit or similar text editor) named
/etc/udev/rules.d/99-axe027.rules
Then enter the following text (note the last 2 lines below should be entered as one long line) and then save the file.
# /etc/udev/rules.d/99-axe027.rules
# contains axe027 udev rule to patch default
# FTDI product id to AXE027 product id (0xbd90)
SYSFS{idProduct}=="bd90", SYSFS{idVendor}=="0403",
RUN+="/sbin/modprobe -q ftdi_sio product=0xbd90 vendor=0x0403"
The new rule will then always be applied when the system boots. To immediately try out the new rule without
rebooting open a Terminal console and then type
Patch the original kernel source files orig/drivers/usb/serial/ftdi_sio.c (3 extra lines required as overleaf) and orig/
drivers/usb/serial/ftdi_sio.h (1 extra line required) and recompile.
After patching these two files also make sure in addition to normal USB support you have
CONFIG_USB_SERIAL_GENERIC and CONFIG_USB_SERIAL_FTDI_SIO enabled in kernel .config.
Then recompile and install the kernel (or at least this module).
revolution (c) Revolution Education Ltd. Email: info@rev-ed.co.uk Web: www.picaxe.co.uk V2.2 02/09
AXE027.PMD
PICAXE USB CABLE 12
*** orig/drivers/usb/serial/ftdi_sio.c
*** linux/drivers/usb/serial/ftdi_sio.c
***************
*** 350,355 ***
*** 350,356 ***
{ USB_DEVICE_VER(FTDI_VID, PROTEGO_SPECIAL_3, 0, 0x3ff) },
{ USB_DEVICE_VER(FTDI_VID, PROTEGO_SPECIAL_4, 0, 0x3ff) },
{ USB_DEVICE_VER(FTDI_VID, FTDI_ELV_UO100_PID, 0, 0x3ff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_AXE027_PID, 0, 0x3ff) },
{ } /* Terminating entry */
};
***************
*** 431,436 ***
*** 433,438 ***
{ USB_DEVICE_VER(FTDI_VID, PROTEGO_SPECIAL_3, 0x400, 0xffff) },
{ USB_DEVICE_VER(FTDI_VID, PROTEGO_SPECIAL_4, 0x400, 0xffff) },
{ USB_DEVICE_VER(FTDI_VID, FTDI_ELV_UO100_PID, 0x400, 0xffff) },
+ { USB_DEVICE_VER(FTDI_VID, FTDI_AXE027_PID, 0x400, 0xffff) },
{ USB_DEVICE(FTDI_VID, FTDI_CCSICDU20_0_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_CCSICDU40_1_PID) },
{ } /* Terminating entry */
***************
*** 537,542 ***
*** 541,545 ***
{ USB_DEVICE(FTDI_VID, PROTEGO_SPECIAL_3) },
{ USB_DEVICE(FTDI_VID, PROTEGO_SPECIAL_4) },
{ USB_DEVICE(FTDI_VID, FTDI_ELV_UO100_PID) },
+ { USB_DEVICE(FTDI_VID, FTDI_AXE027_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_CCSICDU20_0_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_CCSICDU40_1_PID) },
{ } /* Terminating entry */
*** orig/drivers/usb/serial/ftdi_sio.h
*** linux/drivers/usb/serial/ftdi_sio.h
***************
*** 143,148 ***
*** 143,149 ***
revolution (c) Revolution Education Ltd. Email: info@rev-ed.co.uk Web: www.picaxe.co.uk V2.2 02/09
AXE027.PMD
PICAXE USB CABLE 13
/dev/tty.usbserial-xxxxxxxx
cd /dev
ls-l
revolution (c) Revolution Education Ltd. Email: info@rev-ed.co.uk Web: www.picaxe.co.uk V2.2 02/09
AXE027.PMD
PICAXE USB CABLE 14
Check that the driver is owned by root and wheel. The most
common symptom is the group for FTDIUSBSerialDriver is
not wheel. To change the group, login as root and perform
the following script in a Terminal window (Go >
Applications > Utilities > Terminal):
cd /system/library/extensions
chgrp -R wheel FTDIUSBSerialDriver.kext
revolution (c) Revolution Education Ltd. Email: info@rev-ed.co.uk Web: www.picaxe.co.uk V2.2 02/09
AXE027.PMD
PICAXE USB CABLE 15
6.0) Windows CE (v4.2 up, including PocketPC 2003, Mobile 5, Mobile 6) Installation
Please note that not all PDAs/Smartphones can act as a ‘USB host’. Acting as a USB host is NOT the same technology
as using a USB cable for ‘synching’ - whilst synching the computer is the USB host, and the PDA is a USB client. If you
can connect a ‘USB memory stick’ directly to your PDA to transfer files then the PDA can act as a host, if you cannot
do this your PDA does not support USB host mode and the AXE027 cable will not operate with your PDA.
Most PDAs that support the USB host function will require some kind of host adapter (e.g. USB host cable,
presentation pack or Compact Flash card) before they will operate as the USB host. In this case the adapter must be
correctly installed before the AXE027 cable is inserted.
Windows CE 4.2 (and later) is supported. Please note different versions of Windows CE (e.g. 4.2 to 5.2 or 6.0) and
each different type of PDA processor (e.g. x86 or ARM/XScale) require a different driver. Therefore please ensure you
are downloading/installing the correct driver for your system (details at Start > Settings > System > System Info)
6.1) Installation
Step 1
Download the latest available drivers for the required PDA
processor model from the software pages at
www.picaxe.co.uk and unzip them.
The two files in the driver package are:
ftdi_ser.dll
FTDIPORT.inf
Step 2
If the PDA requires a host adaptor (e.g. USB host cable,
presentation pack or Compact Flash host card), make sure
that it is connected and installed before proceeding.
Step 3
Copy the two files to a USB memory stick and then copy
them to the \\Windows directory on the PDA (use File
Manager > Edit > Copy/Paste to copy the files). Alternately
use ActiveSync from a PC to carry out this copying.
Step 4
Connect the AXE027 cable to the host USB port on the PDA.
An ‘Unidentified USB Device’ window will appear.
Type the full name of the driver file
ftdi_ser.dll
into the dialog box and click OK.
If the file name is incorrectly spelt, the driver will not be found and the AXE027 cable will not function.
If the driver is correctly installed the AXE027 cable ID (04 03 BD 90) should now be visible when clicking
Start > Settings > System > System Info > USB Host Connections
(ignore all fields except Manufacture, which will state 04 03 BD 90 if cable is correctly recognised).
The AXE027 will be given the next available free COM port number (e.g. COM0 or COM2). Valid COM port numbers
on Windows CE are COM0 to COM9 only. Note that other devices (e.g. GPS / bluetooth etc.) may also make use of
COM ports. Unfortunately it is not possible to view which COM port is allocated to the AXE027 via ‘System Info’, so
some experimentation trying COM0 through to COM9 in turn may be required!
revolution (c) Revolution Education Ltd. Email: info@rev-ed.co.uk Web: www.picaxe.co.uk V2.2 02/09
AXE027.PMD
PICAXE USB CABLE 16
serial out
Above view
serial in
22k 0V
x x
x x
10k
x
PICAXE
The standard PICAXE download socket (part CON039) and 10k/22k download circuit is unchanged for use with the
AXE027 USB cable (ie the same circuit is used for both the AXE026 serial cable and the AXE027 USB cable).
As the AXE027 interfacing voltage is at true logic levels (5V, rather than RS232 voltage levels) it is theoretically
permissible to reduce the value of the 22k resistor (e.g. to 1k), but only if a AXE026 serial cable is never to be used.
However for maximum versatility it is recommended to leave the circuit unchanged.
There is no advantage to using the ‘enhanced’ download circuit (see main PICAXE manual) with the AXE027 USB
cable, as the enhancements in this circuit are to compensate for negative variations in RS232 voltages (which do not
apply when using the 5V logic level AXE027 USB cable). However, if already built into a project board, it is
acceptable to continue to use the enhanced circuit.
The AXE027 USB cable may also be used to transmit/receive serial data from the PICAXE input/output pins (via serin
and serout commands).
AXE027
PICAXE
100n
USB Cable 1 18 19 16
(c) 2006 FB 4.7u
+ 100
3.5mm
100n 30 TXD
FT232RQ
USB A
2 RXD
15 32 100 OV
14 8
2x
4 17 20 24 26 10k
10n 47p 47p
revolution (c) Revolution Education Ltd. Email: info@rev-ed.co.uk Web: www.picaxe.co.uk V2.2 02/09
AXE027.PMD