adding usb function to project

Discussion in 'Embedded Systems and Microcontrollers' started by bradstormer, Jan 9, 2011.

  1. bradstormer

    Thread Starter Member

    Aug 6, 2010
    65
    1
    hi all,
    i am building a project using an 8052 controller and find myself with 4 free pins.
    the project is a navigation system.
    the question is this, without purchasing any additional equipment such as ic's would it be possible to get the project to write a text file (*.txt) to a usb stick or even a computer?
    its just an add on i would like to put in there, any help would be appretiated.
     
  2. maxpower097

    Well-Known Member

    Feb 20, 2009
    795
    388
    ....................................................................
     
    Last edited: Jan 16, 2011
  3. blueroomelectronics

    AAC Fanatic!

    Jul 22, 2007
    1,758
    98
    You need a USB host to talk to a flash drive. A USB OTG micro will work but the ancient 8052 will not.
     
  4. GetDeviceInfo

    Senior Member

    Jun 7, 2009
    1,571
    230
    If you planned your design so that your spare pins where the uart, then your almost there in regards to serial communication with a PC. For USB, you will need host capabilities to enumerate a storage device. On the otherhand, you could bitbang an SD storage.
     
  5. bradstormer

    Thread Starter Member

    Aug 6, 2010
    65
    1
    thanks for the help, how would bitbanging an sd storage work? the controller is an at80c52
     
  6. blueroomelectronics

    AAC Fanatic!

    Jul 22, 2007
    1,758
    98
    You need to write 512 bytes at a time to use an SD card. They use SPI.
     
  7. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    But for a SD card with FAT 16 or 32 it is not trivial. Unless you have a C library to lean on.
     
  8. blueroomelectronics

    AAC Fanatic!

    Jul 22, 2007
    1,758
    98
    So the short answer is no. The 8052 is just too old.
     
  9. nsaspook

    AAC Fanatic!

    Aug 27, 2009
    2,906
    2,159
Loading...