Electronics > Microcontrollers

Making a usb host for arduino

(1/3) > >>

carbon dude oxide:
Hello, i am currently making an arduino project and i would like it to be a stand alone arduino project without the arduino board. Currently i have been using a standard atmega328 in a DIP package ad plugging it into an arduino board and then transfering the chip to my project but now i would like to use the TQFP of the atmega328 to reduce the height of the project. So in order to program this is need to be able to connect via a usb :)

What do i need to do to attach a usb host and is there a schematic for it? I did have a look around but i could only find a schematic for the standalone board without the usb host on it.

From memory aswell the TQFP does not come with the arduino boot loader on it so would that mean i need to put an isp header onto it? (I belive thats whats there called)

amspire:

--- Quote from: carbon dude oxide on May 08, 2013, 09:58:00 am ---Hello, i am currently making an arduino project and i would like it to be a stand alone arduino project without the arduino board. Currently i have been using a standard atmega328 in a DIP package ad plugging it into an arduino board and then transfering the chip to my project but now i would like to use the TQFP of the atmega328 to reduce the height of the project. So in order to program this is need to be able to connect via a usb :)

What do i need to do to attach a usb host and is there a schematic for it? I did have a look around but i could only find a schematic for the standalone board without the usb host on it.

From memory as well the TQFP does not come with the arduino boot loader on it so would that mean i need to put an isp header onto it? (I belive thats whats there called)

--- End quote ---
You can use the circuit of the Arduino version you are using from the Arduino website to see how to wire up the USB circuit, or you can leave the USB off the project and just have the 6 pin header that you can plug a FTDI serial cable into:

https://www.sparkfun.com/products/9718

Achieves exactly the same result with a cheaper build for your project. The USB chip just moves from your project to the cable. If you want a reference circuit for an Arduino with a 6 pin header, you can use the RBBB (Really Bare Bones Board) Arduino circuit as a guide:

http://cdn.shopify.com/s/files/1/0038/9582/files/RBBB_Instructions_06.pdf?1260749296

carbon dude oxide:
Im guessing i cant use an arduino board and connect the 5v, ground, rx and tx to the corresponding pins on the stand alone to programs it or lead the bootloader?

blewisjr:
In all honesty you don't need USB technically.  Use can some jumper wires to set up ISP from the arduino to the chip. Then upload the Arduino ISP programmer sketch to your arduino you already have.  Then if you setup ISP on your standalone board you can use the Arduino to burn your sketch hex files right to the flatpack bypassing the bootloader all together.  This gives you the advantage of still being able to use the arduino libs and save some flash space where the bootloader was.

Note you must keep in mind that the arduino messes up the pin layouts in their API's so you need to figure out which pin on the flatpack matches which pin on a standard arduino uno otherwise things will break with your code.  Then again you could always set up headers to match the arduino pins if you wanted.

Here is a link to a tutorial really easy to do. http://www.instructables.com/id/Turn-Your-Arduino-Into-an-ISP/#step1

Hideki:
If you have a blank AVR, there's no program running that checks the serial lines, so you can't use them to program a blank chip.
To initially get the bootloader in, you can do this: http://arduino.cc/en/Tutorial/ArduinoISP
Note that it's also possible to get the bootloader in using this little "hack": http://playground.arduino.cc//Hacking/AvrdudeFTDIBitbang

Once that is done it's possible to use program it over serial. The most common way to get USB device support is the FT232R chip. http://www.ftdichip.com/Products/ICs/FT232R.htm
This is exactly what's inside an "FTDI" cable, so people use that for the convenience. Since you're doing you're own board you can include the chip and usb connector instead.

Also get the terminology right. USB host means something that can host USB -- ie. you would be able to plug a mouse, keyboard or memory stick, etc. into the board.
What you want is a USB _device_ that plugs into a USB host - typically a PC.

For schematics, look at http://arduino.cc/en/Main/arduinoBoardDuemilanove

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod