AVR-CDC-Driver.pdf

(119 KB) Pobierz
AVR-CDC-Driver
1 z 3
Virtual COM Port over Low-Speed USB
AVR-CDC
Home About CDC-232 CDC-IO CDC-SPI Driver Download FAQ Reference
>
About
Driver
CDC-232
Usage
It is necessary to install a device driver on PC to use "USB to RS- 232C" convert device. PC application is able to
access the device as a COM port, through the driver. In general, the dedicated chip and the dedicated driver are used
for it. FTDI and Prolific are the major vendors.
There is another way. The major OSs support the CDC (Communication Device Class) protocol on their USB stack to
use RS-232C communication. It enables PC to access the CDC device through virtual COM port, without developing
own driver.
Schematics
CDC-IO
Usage
Schematics
Sample Program
CDC protocol
CDC-SPI
Usage
CDC is a class that defines various communications over USB. The RS- 232C procedure is included in CDC-ACM
(Abstract Control Model) subclass. It uses two bulk transfer pipes for data, and one interrupt pipe for message, besides
a control pipe. The mechanism that configures terminal settings (baudrate, parity bit, etc) to device is defined too. In the
USB standard, low-speed (1.5Mbps) device is allowed to have two interrupt pipes only. In the case of using bulk
transfer or using exceeded number of pipes, some host controller or hub transmits packets at critical intervals, and the
V-USB device fails to respond. To reduce this trouble, a small patch driver assists the protocol operations on
Windows.
Schematics
Sample Program
Driver
CDC Protocol
Windows
Mac OS
Linux
FAQ
Device Recognition
Communication Problem
Others
>
Download
>
Reference
Patch Filter for Windows XP / Vista / 7
Windows
Windows system has a CDC protocol driver (usbser.sys) to generate virtual COM port. However, it requires a "Setting
Information" file at the first connection. At this time, the patch driver (lowcdc.sys) is installed together.
The low-speed bulk transfer mostly works on Windows XP, but it sometimes stalls the transfer on some host controller
or hub. Furthermore, this transfer is not allowed on Windows Vista. This patch disables the interrupt pipe that is used
for status report, and switches the bulk and the interrupt pipe configuration at the initial configuration process.
[ Transfer Speed ]
The device's RS-232C parameters (baudrate, prity bit, data size, etc) are configured from PC application
automatically. However, the transfer speed depends on USB's transfer mode, and may be slower than the configured
baudrate. If one packet contains eight bytes data, the data rate is like this.
transfer mode
packet interval
transfer speed
baudrate
Bulk
125uS -
- 8KB / Sec
- 57600 bps
Interrupt
8mS -
- 1KB / Sec
- 9600 bps
* Switch the mode using "lowcdc.vbs" .
413532789.004.png 413532789.005.png 413532789.006.png
2 z 3
* HyperTerminal blocks data transmission at each byte (1 byte/packet). It makes the transfer speed lower than 125
bytes/second. Use TeraTerm or HypoTerminal for faster transfer.
copyright (c)2011 Osamu Tamura @
Recursion Co., Ltd. All rights reserved.
[ Installation ]
Decompress "avrcdc_inf.zip".
/inf
/raw -- Windows 2000/XP
/w2k -- Windows 2000
/xpvista7 -- Windows XP/Vista/7 x32
/vista64 -- Windows Vista/7 x64
lowcdc.vbs -- Bulk/Interrupt mode switcher
/raw
This INF only loads "usbser.sys". It may be unstable since it violates the standard. Windows Vista does not allow this
mode.
/w2k
This INF installs both "usbser.sys" and "lowcdc.sys". Only the bulk(fast) transfer works on Windows 2000.
/xpvista7
This INF installs both "usbser.sys" and "lowcdc.sys". It enables switching the bulk(fast) transfer and the
interrupt(stable) transfer. XP requires upgrading to SP3.
(1) Clean up the previously installed AVR-CDC drivers, if any. See the [Uninstallation] section.
(2) Connect the device to the system. Windows launches the "New HardwareWizard". Specify the folder in which
"lowcdc.inf" exists, without connecting to "Windows Update" nor searching automatically. Ignore the "not certified"
warning.
Select the messages below during the installation.
No, not this time.
Install from a list or specific location (Advanced)
Include this location in the search: (Browse) - specify the folder.
( Windows Vista )
Select messages below too. You have to confirm on "you need to confirm this operation" dialog a few times.
Locate and install driver software (recommended)
Browse my computer for driver software
Install this driver software anyway
( Windows 7 RC )
The 7 RC doesn't launch the "New HardwareWizard" automatically. Start "Control Panel"/"Device Manager", and right
click on "USB-232" or "USB-PIO", then click on "Install" to invoke the process.
(3) Confirm the virtual COM port number in the "Ports (COM & LPT)" section of the Device Manager. This is
necessary to configure a terminal software.
[ Uninstallation ]
This will uninstall the driver software installed for the device.
( 2000/XP )
(1) Connect the device.
(2) Start "Control Panel"/"Device Manager", right click on the "Ports (COM & LPT)"/"Virtual Communications Port
(COM*)", then click on "Uninstall".
(3) Disconnect the device.
(4) Remove the "avrcdc.inf"-corresponded "oem**.inf/pnf" pair from "/windows/inf/" folder, if any.
( Windows Vista / 7 RC )
(1)-(3) are the same. In the "Confirm Device Uninstall" dialog, check the "Delete the driver software for this device."
413532789.007.png 413532789.001.png
3 z 3
box. You don't need delete "oem**.inf/pnf" manually.
[Notice]
(*) Windows 2000/XP/Vista requests the driver installation again when connected to other USB port. Detect the
previously installed driver automatically. Another COM number will be assigned. Select these messages.
No, not this time.
Install the software automatically (Recommended)
(*) Before detaching the device, close the COM port in terminal software or in your application. Otherwise, you cannot
connect to the device again because of the broken file handle. Restart the terminal software or your application then.
(*) Vista/7 x64 does not accept unauthorized kernel-mode drivers. You have to turn "Driver Signature Enforcement" off
during system boot- up. There is a tool to sign the driver.
Driver Signature Enforcement Overrider
See the instruction in /vista64/Readme64.txt.
Mac OS
Mac OS9 and OS X recognize the device instantly when connected. Make sure the device is registered correctly in
"Apple Menu / About This Mac / More Info.. / Hardware / USB". The USB device name is /dev/cu.usbmodem* (* is
some numbers).
The terminal software ZTerm (shareware) works fine on both PPC and Intel CPU. Configure "Delay" to 0 in
"Settings/Text Pacing.." menu.
Linux
Linux 2.4 and 2.6.31- recognize the device as /dev/ttyACM* (* is some numbers).
Linux <2.6.31 does not allow the low-speed bulk transfer. Replace the kernel to 2.6.31 or higher. Tiny Core Linux 3.0
has the kernel 2.6.33.
413532789.002.png 413532789.003.png
Zgłoś jeśli naruszono regulamin