200 likes | 302 Views
USB Mass-Storage Implementation on an Embedded System (D0113). Final Presentation – 20/4/2004. Supervisor: Dimitry Sokolik Performed by: Yoav Gershoni Shachar Faigenblat. HSDS LAB Technion - Winter 2003. Project overview.
E N D
USB Mass-Storage Implementationon an Embedded System(D0113) Final Presentation – 20/4/2004 Supervisor: Dimitry Sokolik Performed by: Yoav Gershoni Shachar Faigenblat 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: PIC Evaluation Board Flat Cable 23 bits Parallel Connection USB Host Controller USB BUS Pic Microprocessor RS 232
Block Diagram Stage B: PIC Evaluation Board Flat Cable 23 bits Parallel Connection USB Host Controller USB BUS Pic Microprocessor 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 Logical File System Layer FAT16/FAT32 Command Set Protocol Using SCSI Primary Command Set USB Mass-Storage Class Using Bulk-Only Transport protocol Host Controller Driver PC – PIC Communication
Software Development Tools • PIC: • MCC18 compiler on MPLAB IDE. • 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’)
PC-PIC Protocol • Over RS232.115200bps, 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.