I am looking for someone with USB protocol experience to write a small program which can be merged into my existing Arduino/Atmel source. I am new to the USB protocol and not having much success finalizing this portion of the code.
Specifically, I am having trouble resuming USB communication after the chip is put into a low sleep mode whilst simultaneously running from a Li-Po battery source, and USB power/data cable removed, then re-inserted. Program sequence is currently as below:
1: Standard Chip/USB initialization
2: Input/Pin setup, single push button that increments variable on each push via ISR.
3: Generic USB-HID keyboard driver to send variable count data via keyboard button press (to be entered into PC like a datalogger at later date)
This is where I need code expanded and tested working:
4: Chip to sleep whilst no USB detected (currently using voltage divider from 5v USB 5V+ rail)
5: Chip to awake when button pushed, increment variable, return to sleep (still not connected to USB)
6: When chip is reconnected to USB, chip must resume from sleep (stay awake) and re-establish USB communication, and allow button press to send variable count again (same as step 3)
I have been prototyping using Adafruit Metro M4 but will moving to custom PCB shortly. Attached is rough sample Arduino project that demonstrates the issue.
Please contact me for more information. The successful applicant may be offered further work as I convert my existing Arduino projects to Atmel Studio projects.
5 freelancers are bidding on average $67 for this job
Hey, I have done arduino USB 2 serial firmware coding and also developed Linux USB device driver. so i think i can helps you, I have core knowledge of USB protocol.