Author Topic: Which IC to make Pen drive interfacing with Microcontroller  (Read 2096 times)

0 Members and 1 Guest are viewing this topic.

Offline Vindhyachal.taknikiTopic starter

  • Frequent Contributor
  • **
  • Posts: 487
Which IC to make Pen drive interfacing with Microcontroller
« on: November 21, 2017, 05:14:53 am »
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?
 

Offline stj

  • Super Contributor
  • ***
  • Posts: 2155
  • Country: gb
Re: Which IC to make Pen drive interfacing with Microcontroller
« Reply #1 on: November 21, 2017, 06:29:27 am »
a lot of ARM cpu's have usb interface.
look at the ST Nucleo boards.
 

Online amyk

  • Super Contributor
  • ***
  • Posts: 8264
Re: Which IC to make Pen drive interfacing with Microcontroller
« Reply #2 on: November 21, 2017, 06:57:31 am »
Any MCU with a USB host controller would do.
 

Offline newbrain

  • Super Contributor
  • ***
  • Posts: 1719
  • Country: se
Re: Which IC to make Pen drive interfacing with Microcontroller
« Reply #3 on: November 21, 2017, 12:57:37 pm »
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.
« Last Edit: November 21, 2017, 03:33:57 pm by newbrain »
Nandemo wa shiranai wa yo, shitteru koto dake.
 

Offline poorchava

  • Super Contributor
  • ***
  • Posts: 1672
  • Country: pl
  • Troll Cave Electronics!
Re: Which IC to make Pen drive interfacing with Microcontroller
« Reply #4 on: November 21, 2017, 02:14:36 pm »
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.

I love the smell of FR4 in the morning!
 

Offline Vindhyachal.taknikiTopic starter

  • Frequent Contributor
  • **
  • Posts: 487
Re: Which IC to make Pen drive interfacing with Microcontroller
« Reply #5 on: November 24, 2017, 06:43:24 am »
VNC2 or MAX3421 looks suitable for application.
http://www.ftdichip.com/Products/ICs/VNC2.htm
 

Offline JacobPilsen

  • Regular Contributor
  • *
  • Posts: 140
  • Country: cz
Re: Which IC to make Pen drive interfacing with Microcontroller
« Reply #6 on: November 24, 2017, 08:18:15 pm »
I would prefer MicroSD card in SPI mode.
(+ It's smaller than ordinary USB pen drive.)
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13736
  • Country: gb
    • Mike's Electric Stuff
Re: Which IC to make Pen drive interfacing with Microcontroller
« Reply #7 on: November 24, 2017, 09:09:13 pm »
I would prefer MicroSD card in SPI mode.
(+ It's smaller than ordinary USB pen drive.)
That 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.

Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf