Jump to content

USB VNC1L module

From HW wiki
Revision as of 12:15, 27 July 2007 by Calvi (talk | contribs) (Results)

Project definition

Main task is to create universal C library for microprocesors (ATmega, MSP340, ARM7) which will communicate with VNC1L module. VNC1L module is USB host and its giving possibility to connet any USB device (Flash Disc, web camera, and etc.) to microprocesors. Current task is to connect USB data disc and VNC1L to ATmega microprocesor with SPI and RS232 interface.


Developing phase

VDAP firmware loaded on VNC1L:

VDAP Firmware

VDIP1 is sold with the ‘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:

SPI Cabling

Both devices exchange data through a SPI protocol. They are linked to each other as shown on the figure beside.

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 the data sent back. In this way I can start communicating with a flash disk.


// Upon starting the Monitor, the following string is displayed indicating the firmware version  
number (02.08) and the firmware type (VDAP)

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 for 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.

Documentation

Links