Hi All.
I'm going to create some kind of usb storage device, and I'm planning to use LPC2148 microcontroller in it. I need some advices. Is this controller suitable for such task? Can external flash memory be mapped to the controllers adress space (to work with it like with internal controllers memory in the programm)? Which protocol is better to choose for this task (which one will be faster) to connect external memory chip and controller: I2C or something else?
Thanks for your answers!
Elaborate more about the application. You said just 1) USB connection, 2) external FLASH chip, briefly.
a) USB connection - How the device appears on the PC As a mass storage (like USB stick or drive) - Fit to static data exchange (like stand-alone data logger) - - Stored data is not changed by the device while USB connection - Data is handled as files on the File system of the PC - Host app accesses to it through File system API of the OS - File system handler is also required on the device side
As a direct device (bulk or HID) - Fit to dynamic data exchange (like FLASH writer) - - Stored data may be changed by the device while USB connection - Data is exchanged over File I/O API for USB (or HID API) on the PC - Device firmware is much simpler than above
b) Data storage size of the external FLASH on the device board - Mega-Giga Bytes - SD card over SPI or SD_MMC card interface - 64K-16M Bytes - Parallel FLASH (SST 39, etc) over address/data bus - 64K-16M Bytes - Serial FLASH (ST micro M25P, Winbond, etc) over SPI - 128-128K bytes - I2C EEPROM
Tsuneo
Thanks for your answer, Tsuneo. You are right, I need to say more. The device will work like flash drive, but the data will not be handled as files on the File system of pc. Data will be handled using special application running on PC. If HID connection can give me normal transfer speed (like normal usb flash drive devices) - I will use it. Amount of data will be 1 or 2 GBs. I need to decide which controller to use (does LPC2148 can solve my tasks?), how to connect it to the pc (does HID connection can be such fast as I need?) and what flash memory chip to use in the device (what protocol of connection between controller and memory can give me required speed and handle required amount of dat?).
Thank you.
"what protocol of connection between controller and memory can give me required speed"
Q1: How fast is the required speed, in MByte/sec?
Give us the figure. An approximate number will do. Your description is literary. We are engineers who are far from literature :-) Unfortunately, we can tell nothing until we see the figure.
USB connection "Data will be handled using special application running on PC.... Amount of data will be 1 or 2 GBs."
Seems a good application for High-Speed (HS, 480Mbps) bulk transfer.
LPC2148 supports just Full-Speed (FS, 12Mbps). On FS, the transfer speed is about 1.2 Mbytes/sec at most. Then, the transfer of 1-2 GBytes data results 1000-2000 sec. On HS, practical transfer speed is 10-20 MBytes/sec. The 1-2 GBytes are transferred in 100-200 sec.
HS ARM MCU: NXP LPC288x, Atmel AT91SAM9R64 HS '51 MCU: Cypress EZ-USB FX2LP (CY7C68013A) HS Peripheral: NXP ISP1582, Cypress EZ-USB SX2 (CY7C68001)
I recommend you to combine EZ-USB SX2 with your favorite MCU. It's a simple solution for USB beginner.
On the other hand, I don't recommend LPC288x to you; read this Olimex fight with the chip. forum.sparkfun.com/viewtopic.php
The problem for the device of generic bulk transfer is the device driver selection on the PC. It depends on the OS on the PC.
Q2: What is the target OS on the PC? Windows? Then what is the Windows version(s) to be supported?
Q1: I'm not sure yet will I stop on LPC2148 or on some of the HS MCUs. When I'm saying the required speed I mean what memory chip can operate with controller not slower then controller with PC. Q2: target OS is Windows. versions to be support - 2000 and higher I think (if Windows 2000 is a problem I can think about XP and higher). Can HID device work on 10-20 MBytes per second? Or I will need to create a driver for the device?
I'm a beginner in this. This is something like study work. So I'm thankful to you for your help.
What do you mean by "something like" study work?
This mean that I'm just learning how to create devices on this device. Why are you asking?