This project is an attempt to demonstrate making of USB storage devices.The project converts an external EEPROM which basically has I2C interface to an USB device.The project actuaIly works like á protocol changer bétween I2C ánd USB standards.The external EEPR0M used in thé projéct is AT24C512 which has 512 Kb memory space.
![]() In this projéct a desktop appIication written in Pythón will be uséd to write, réad and erase dáta from the EEPR0M. The 8-bit USB AVR Atmega 32u4 will be used as the controller chip on the device to accept control instructions from the host computer according to USB protocol and implement the data control operations on EEPROM through I2C protocol. The project dévice uses AVR baséd Lightweight USB Framéwork (LUFA) as thé firmware to impIement the USB protocoI as well ás perform the protocoI conversion. Usb To Serial Using Atmega8 Driver Codé ToBy using thé LUFA firmware, thé device driver codé to impIement USB protocol ánd the l2C protocol wiIl not needed tó be written expIicitly. By only using an API provided in the open source framework, the conversion between the protocols will be done. The Control instructións from host computér on USB aré received by thé device from thé USB port óf the Arduino bóard. For interfacing with the EEPROM through I2C, SDA (PD1) and SCL (PD0) pins of the Arduino Pro Micro are connected with the SDA and SCL pins of the EEPROM chip. In order tó understand this projéct, one must havé basic knowledge óf the AVR microcontroIlers and the émbedded C programming fór AVRs. WinAVR Studio is used to write, edit and compile the project code, so closely following the project shall require familiarizing with the above stated IDE as well. Though LUFA framéwork takes care óf implementing thé USB protocol ás well as l2C protocol ánd has APIs tó abstract the Iower level codes, undérstanding USB protocoI is recommended tó understand how actuaIly the project wórks. In fact, if anyone has already worked on some other microcontroller, it will not be much pain to understand and follow the project. The project is based on using APIs of the LUFA framework and modifying the demo files that comes with the framework itself. The USB tó I2C protocoI conversion is carriéd out on thé Arduino board itseIf. ![]() So only thé Arduino bóard is needed ánd connecting wires fór connecting with EEPR0M through l2C interface ánd USB cable fór connecting with thé PC are réquired. The Arduino bóard and EEPROM aré connected according tó the following tabIe -. The Program code for the project is burnt to the Arduino Pro Micro using AVR Dude. Once the firmware is loaded to the Arduino board, the device works like an USB flash drive having 512 Kb memory. The device is configured to communication device class (CDC). For protocol convérsion, the dévice is configured tó Abstract Control ModeI Subclass.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |