Which IC to make Pen drive interfacing with Microcontroller - Page 1
Forum section: electronics / beginners

author: Vindhyachal.takniki
author_rank: Frequent Contributor
timestamp: November 21, 2017, 05:14:53 am
content: 1. I have to interface a pen-drive with a microcontroller for data logging purpose.task is to create a FAT based text file in which data will be appended.2. Is there any usb host like IC available so that it can be interface with any MCU over uart to write data.Like equivalent of FTDI232 is usb slave which can be interfaced with any MCu to connect it to any computer.3. i had checked for vnc1l , it has two ports.Any other IC with single port or cheaper alternative?

author: stj
author_rank: Super Contributor
timestamp: November 21, 2017, 06:29:27 am
content: a lot of ARM cpu's have usb interface.look at the ST Nucleo boards.

author: amyk
author_rank: Super Contributor
timestamp: November 21, 2017, 06:57:31 am
content: Any MCU with a USB host controller would do.

author: newbrain
author_rank: Super Contributor
timestamp: November 21, 2017, 12:57:37 pm
content: Does it really have to be an USB pen drive?MCUs with an USB host or OTG are not a rarity (e.g. practically STM32F4xx), but still less common than USB device ones and usually more expensive.Moreover, an USB host stack is more complex than a device one.Depending on the amount and speed of data logging, using something as an SD card might be a simpler alternative.

author: poorchava
author_rank: Super Contributor
timestamp: November 21, 2017, 02:14:36 pm
content: If you are seeking the path of least resistance I recommend STM's CUBE & HAL. On parts that have USB host/OTG peripheral you just tick "usb host", "msc class" and "fatfs" boxes and off you go.Check the examples to see how to use it, but it's really simple. I got it to work in about 45 minutes without any previous experience.I'm not a huge fan of HAL because of bloated code for accomplishing simple tasks, but in this case it works. If u ever wondered - it doesn't look that good with SD cards - Some work, some don't.

author: Vindhyachal.takniki
author_rank: Frequent Contributor
timestamp: November 24, 2017, 06:43:24 am
content: VNC2 or MAX3421 looks suitable for application.http://www.ftdichip.com/Products/ICs/VNC2.htm

author: JacobPilsen
author_rank: Regular Contributor
timestamp: November 24, 2017, 08:18:15 pm
content: I would prefer MicroSD card in SPI mode.(+ It's smaller than ordinary USB pen drive.)

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: November 24, 2017, 09:09:13 pm
content: Quote from: JacobPilsen on November 24, 2017, 08:18:15 pmThat could be a disadvantage in some situations - much easier to lose!SD/MicroSD is certainly the simplest way to get from PC-style media to a MCU, but SD card readers are slightly less ubiquitous than USB drives. Using SD cards in SPI mode can also be rather slow, especially on newer, larger cards, particularly for writes.Some PIC24 and PIC32s have USB OTG, with examples for talking to USB memory. The smallest option is a 28 pin ( DIP/SO/SSOP or QFN) If you want to keep the USB stuff seperate you could use a USB OTC MCU as USB host, with a simple UART interface to your device.As USB support is typically via manufacturer-supplied frameworks, there may be good reasons to "contaminate" your code with them, or be forced to use them to get the USB part working.