FreeRTOS on AVR with external RAM

AVR microcontrollers aren’t the best choice to run the FreeRTOS scheduler due to low on-chip RAM. Atmega128 has only 4K of RAM, so this limits the FreeRTOS functionality to very basic. This problem can be solved by adding extra RAM, which may be connected to an external memory interface. We have already built an external memory block of 8K previously to test it with FreeRTOS applications. Let’s continue with our previous code, which runs several simple tasks (button state reading, LCD output, and LED flash), and we can add more to it. We are going to set up an external RAM for storing heaps. This will allow the storage of large data buffers without worrying too much about heap and stack overlaps.

Continue reading

Transistor based class AB amplifier

In most small audio projects, hobbyists are using specialized audio amplifier chips. That’s really fine; you get high-quality amplification without scratching your head. Some probably don’t care how these things work. But don’t forget that amplifiers can be built out of discrete electronics components like bipolar transistors. Check out this great hack week project where Dino makes a class AB audio amplifier out of three bipolar transistors and other passive components. He slightly goes through the theory of operation and, of course, demonstrates its working in the following video.

Continue reading