Hi folks,
I've been working for a year or so now on a runtime for AVR microcontrollers, called MHVLib. It has been built in Eclipse (although I also include Makefiles so that you can work with the editor of your choice), and has been developed with code speed & compactness in mind.
For example, one of the early projects I developed using MHVLib was a BLDC controller, which I wrote in both Arduino and MHVLib. The controller took a value from a serial port, and generated a servo signal to run a BLDC helicopter motor (driving the spindle on my CNC mill ). The Arduino version took (at the time) 11,900 bytes of flash, and 500 bytes of RAM, while the MHVLib version took 5930 bytes of flash and 177 bytes of RAM, to do the same job.
The latest version of MHVLib is moving towards an event driven model, which is awesome for battery driven projects, as the microcontroller can go into a low power sleep, waking up only when there is work to be done.
Here is what we have at the moment:
- Digital I/O
- Timers
- Serial (both busy-waiting and asynchronous)
- External Interrupts
- PinChange Interrupts
- Servo control
- Analogue to digital
- Hardware PWM
- Gamma correction - calculate on the fly, or lookup tables (recommended)
- Fast synchronous serial shifter
- Software H Bridge for driving naked transistors (with PWM support)
- Realtime Clock & event triggering
- Debouncing (detect button presses, as well as held buttons)
- Software PWM Matrix (for passive LED matrices)
- HT1632 based LED matrix displays such as the Sure Electronics DE-DP105 (search for 0832 led matrix on Ebay)
- HD44780 & compatible LCD character displays
- Software controlled voltage regulator
- EEPROM
- Power Saving (via AVR LibC)
- PID algorithm
- Voltage Regulator (buck/boost controller)
- USB Keyboard emulation (via V-USB)
Documentation is also online: http://www.makehackvoid.com/docs/mhvlib/classes.html
For full details & to download the library, please check the project page: http://www.makehackvoid.com/project/MHVLib