Interacting with the host OS

atmegaatmelattinymicrocontroller

I am wondering if an ATMEL micro controller such as an ATMEGA8 or ATTINY2313 has libraries to interact with a computer (windows OS) over USB? If so is there any premade libraries that does the bulk of the coding work for me? I would be using the Atmel Studio IDE for programming. If possible is there separate libraries for keyboard events/interaction, and raw USB interaction which software running on the OS can capture. A bonus would be an example of how to capture raw usb messages from my device in simple software on windows.

My next question is, is it possible to run native windows code directly from the micro controller. I am lead to believe it is not possible since in order to interact with the windows API which I want, you would need to have a windows compiled binary with the API library on your device and somehow run it from memory or the like.

Thanks for any answers you can supply me with.

Best Answer

I shall answer your second part first.

is it possible to run native windows code directly from the micro controller

Certainly not, no. Simply because native Windows code need Windows to run, and needs to be compiled for the host processor - and neither of those can be done on a little Atmel.

The first part of your question:

is there any premade libraries that does the bulk of the coding work for me?

Almost certainly, yes. Look on the Atmel site, you will find some. I personally am not up on Atmel, but all the other manufacturers I can think of provide either full example code, or libraries to incorporate in your own code (such as Microchip's Harmony library), so Atmel certainly will too.

Related Topic