I want to use my mega16 to control a charger. This charger should also work without being connected to the PC. Is this possible and how?
If this is possible, what happens if I connect the Controller to my PC during a loading. My programm gets interrupted and then?
Paul
use µC with AVR-USB with no connection to PC
This is possible, of course. In this case you should add a 1 MOhm pull-down resistor on D+ to avoid spurious interrupts.
When USB is connected, the driver's interrupt routine handles all necessary requests. When your application sends requests to the device, the function usbFunctionSetup() is called in your firmware to handle them.
When USB is connected, the driver's interrupt routine handles all necessary requests. When your application sends requests to the device, the function usbFunctionSetup() is called in your firmware to handle them.