Hi all,
Please, correct me if I'm wrong:
I started to play with DigiUSB library: it works fine (Thanks again to Bluebie for her digiterm application).
But, I believe it's stupid to not benefit of the USB code already present in the bootloader.
I also noticed
usbdrvasm.S monopolizes the pin change interrupt vector, so, it's currently impossible to use Pin Change for other purposes whilst using
DigiUSB library.
I suggest to centralize the pin change interrupt Manager in a library/function such as TinyPinChange already presented here:
http://digistump.com/board/index.php/topic,689.0.html (TinyPinChange library is in the attached zip)
As the ATtiny85 is a little micro-controller, the number of ISR to record can reasonably be limited to 3 or 4 (hardcoded).
The changes I suggest: modify usbdrvasm.S:
1) to not hardcode the pinchange interrupt vector in order to allow the pin change interrupt sharing
2) to include the Pin Change Manager
3) to declare a vector (at fixed address) in the bootloader to allow the user arduino sketch to call the related bootloader USB functions and the Pin Change Manager
This will allow to save lots of precious flash memory.
Unfortunatly, I'm not very familiar with AVR assembler (only with "vintage" intel 51 assembler).
What do you think about this idea?
Regards,
RC Navy.