USB VNC1L module: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
== Project definition == | == Project definition == | ||
Main task is to create universal C library for | Main task is to create universal C library for microprocessors (ATmega, MSP340, ARM7) which will communicate with VNC1L module. VNC1L module is USB host and its giving possibility to connect any USB device (Flash Disc, web camera, and etc.) to microprocesors which have not integrated USB. Current task is to connect USB data disc and VNC1L to ATmega microprocesor with SPI and RS232 interface. | ||
== Vinculum VNC1L USB host controller (VDIP1 DIP format VNC1L) == | == Vinculum VNC1L USB host controller (VDIP1 DIP format VNC1L) == |
Revision as of 12:37, 6 August 2007
Project definition
Main task is to create universal C library for microprocessors (ATmega, MSP340, ARM7) which will communicate with VNC1L module. VNC1L module is USB host and its giving possibility to connect any USB device (Flash Disc, web camera, and etc.) to microprocesors which have not integrated USB. Current task is to connect USB data disc and VNC1L to ATmega microprocesor with SPI and RS232 interface.
Vinculum VNC1L USB host controller (VDIP1 DIP format VNC1L)
The device transparently handles the FAT file structure communicating via UART, SPI or parallel FIFO interfaces via a simple to implement command set (Monitor port). The VNC1L device features two USB Ports which can be individually configured by firmware as Host or Slave ports. The device has two USB host ports as well as a combined UART, SPI or FIFO interface. Command Monitor port can be activated on either the combined interface or one of the USB ports.
Developing phase
VDAP firmware loaded on VNC1L:

VDIP1 is sold with a ‘VDAP Firmware’ preloaded which typical application is using the Vinculum VNC1L to provide USB Host functionality to a microcontroller. This will have the monitor port on the combined interface allowing BOMS devices (Bulk Only Mass Storage, e.g. Flash Disk) to be connected to Port 2 and USB Slave Peripherals to Port 1 as shown on the figure beside.
The firmware version actually loaded on the VNC1L is ‘VDAP_02.08’ which is an old one while ‘VDAP_03.55’ is available on the Vinculum website. It is possible to load it to VNC1L but this old version seems to be operational enough so I start working like this.
Communication between ATmega88 and VNC1L:

Both devices exchange data through a SPI protocol. They are linked to each other as shown beside.
I/O on data and control bus pins of the VDIP1 are configured in SPI mode using J3 and J4 three way jumper pin headers (J3 pull down ACBUS5 and J4 pull up ACBUS6).
The software is loaded on ATmega88 through its /RESET pin using an AVR Dragon interface which also provides the power supply unit (5V0 / GND).
PORTB0 and PORTB1 on ATmega88 are used to command DATAREQ# and DATAACK# on VNC1L in order to switch it between command mode and data mode.
Results
The software:
I have already made software allowing from ATmega88 to send commands to VNC1L and to receive data sent back. In this way I can start communicating with a flash disk. Here follows an example of communication.
// Upon starting the Monitor, the following string is displayed indicating the firmware version number (02.08) and the firmware type (VDAP) loaded on VNC1L Ver 02.08VDAPF On-Line: // While a device is not detected VNC1L does not send new data ........................ ........................ ...... // As soon as a device is plugged on USB Port 2, the following string is displayed Device Detected P2 // And no new data is sent while the device is scanned ........................ ........................ ...... // When the scan disk is over, the following strings are displayed No Upgrade D:\> // ATmega88 is now able to send a command like ‘DIR’ for example DIR // VNC1L lists files in current directory SUBDIR1 DIR SUBDIR2 DIR FILE1.XXX FILE2.XXX D:\>
Notes :
The ‘’ character represent a single carriage return.
When ATmega88 reads data sent by VNC1L waiting for it to be ready to receive an other command while it is not sending new data, the software returns null characters '0x00' (......).
A prompt (D:\>) is sent when VNC1L is ready for a new command.