USB Mass-Storage Implementation on an Embedded System (D0113) Supervisor: Dimitry Sokolik Performed by: Yoav Gershoni Shachar Faigenblat Final Presentation – 20/4/2004 HSDS LAB Technion - Winter 2003
Project overview The project provides generic means to read files from a FAT32 formatted USB-Flash-Disk. Stage A: PC implementation: all the logic and the protocol layers will be implemented on the PC. Stage B: Full on board implementation (hardware & application).
Block Diagram Stage A: USB BUS USB Host Controller Pic Microprocessor Parallel Connection RS 232 PIC Evaluation Board Flat Cable 23 bits
Block Diagram Stage B: USB BUS USB Host Controller Pic Microprocessor Parallel Connection PIC Evaluation Board Flat Cable 23 bits The application will be implemented on the PIC itself
Project Specification Components: PIC 18F452 evaluation board. Philips ISP1362 USB Host Controller. Power supply: 9v from external PS converted to 5v and 3.3v. 5v for the evaluation board, PIC and USB bus. 3.3v for the host controller. Interfaces: USB bus between Flash Disk and Host Controller. parallel bus between PIC ports and Host Controller. RS-232 bus between the PC and the PIC board.
Project Specification – Cont’ Connectors: Type A USB connector. D-Type-9 connector. (for RS-232 – already exists on the evaluation board and on PC).
Project background Stand alone device. Stage A: Application on the PC. Microprocessor instead of FPGA to control the USB HC. Future implementations - MP3 decoder.
Software Architecture Host Controller Driver USB Mass-Storage Class Using Bulk-Only Transport protocol Command Set Protocol Using SCSI Primary Command Set Logical File System Layer FAT16/FAT32 PC – PIC Communication
Software Development Tools PIC: MCC18 compiler on MPLAB IDE. PC: PC: Code in C, with Visual Studio compiler. USB protocol: USB Inspector.
Project Status PC-PIC Communication. HC Board. USB Protocol Analysis.
PIC-HC Connection HC has 16 I/O bits. Command or Data Control bit (A0). Method: – –Send Command. (A0=‘1’) – –Send/Receive Data. (A0=‘0’)
Writing 16/32 bits to HC
PC-PIC Protocol Over RS bps, 8 bits, no parity, 1 stop bit. Transactions has Command and Data.
Software Design PC-PIC Connection Protocol Design. Learn RS232 Communication on PC. RS232 on PIC using Lee & Ehud LIB. Implementation of PC-PIC Protocol on PC and PIC.
HC Board – Design Connection To PIC (ports assignment) Buffers to Convert Logical Levels: 5v 3.3v Power Supply: 5v, 3.3v USB Connector with Over Current Sense. Good Link Led. Manual Reset. Clock.
USB Protocol Analysis SCSI Commands – Understanding. SCSI Commands – Specifications Drafts not Final.
PC-PIC Protocol
Ports Table