Page 1 of 1

Need help interfacing atmega8, usb and lcd

Posted: Tue Sep 07, 2010 8:56 am
by chessplayer
Dear all,

I am currently a second year electronics student at my university. For the digital lab mini project, my group together with 4 others is supervised by the dean. He gave us a pretty interesting topic. His topic was to:

1. Generate a variable sinusoidal wave.
2. Capture the analog data on a microcontroller.
3. Send the data to a PC through USB.
4. Send the data out to a microcontoller through USB.
5. Display the frequency of the sine wave on a LCD Display.

Well, this is a very interesting project for us, however there is one problem. We have not learned anything on microcontrollers yet in our syllabus, therefore, most of us do not know anything on how to finish the project. I myself, have played with microcontrollers in my free time, so I have a little understanding but not enough to complete the task at hand. So, I kindly seek help from the experienced users here on what to do in order to finish the project. I plan to use atmega8 and a 4x20 LCD module because I have one lying around. I am more concerned on how to send and receive data through USB. How do I program the host software? And what do I really need for USB to work? I understand I need a driver if I am not using a HID class. Again, I am a total beginner on the subject, please help me. Thank you.

Re: Need help interfacing atmega8, usb and lcd

Posted: Fri Sep 10, 2010 8:17 am
by _frank26080115
before you begin, a sine wave on a 20x4 display sounds like a challenge, even with custom characters

for host side software, i personally use LibUsbDotNet with C#, libusb-win32 has a INF generating wizard to create the driver INF file. you won't need the INF if you use HID

for the device, i would probably leave the ADC running constantly while storing the value into a static FIFO queue, the contents of this queue will be sent out by either interrupt-in transfers or vendor specific requests

Re: Need help interfacing atmega8, usb and lcd

Posted: Sat Sep 11, 2010 12:39 am
by chessplayer
Thanks for the reply. Well, my main concern is the last section where I am supposed to receive data from usb and display it on lcd. The other sections are being solved by other students. Anyway, I am a total beginner. I do not know which device class to choose. I think the Custom Class would be easiest to implement but I do not know how. Do I need to write a custom driver for it? Because I don't know how to write drivers. And if I decide to use MVC++, any examples on how to write the host software to send data through usb?

Thanks!