AVR GCC LCD library allows connecting pins in any order

Probably some of you are struggling in finding a proper LCD driver that would work on any circuit. I just wanted to point out that I found some time to improve my current LCD library to support a mixed pin connection case. Earlier, you had to connect LCD in a pretty strict way where pins had to be aligned and attached to a single AVR port. Sometimes this can’t be done for various reasons – you want to use those pins for other alternative functions, or you want to trace your PCB better, etc. In this updated version of the library, there are two more modes added: LCD_4BIT_M and LCD_8BIT_M that allow controlling LCDs either in 4 or 8-bit mode but with any pin connection layout. So data pins and control pins can be connected to any PIN and any port. A couple of examples should give some clue on how to start using it. If you used this library for some project, you only need to modify the header file while the project source code can remain the same.

Continue reading

Modeling of analog part for DDS3 signal generator

When building an AVR DDS2 signal generator, there were many discussions about signal conditioning in the analog part of the device. The first argument was that LM358 wasn’t the best choice for this purpose. Another one pointed to the sine wave that wasn’t smooth enough. As you can see, there are some dents on it. Other waveforms also are distorted, especially when higher voltages are selected. This asks for a better analog part. Some people suggested replacing LM358 with OPA2134, but it seems to be quite an expensive choice. In my opinion, low noise, a general-purpose op-amp can be great too. I’m going to give a try to Texas Instruments TL074 low noise op-amp. It is low power, high slew rate (13V/us) IC – almost five times faster than LM358 and for the same reasonable price.

Continue reading

Multivibrator – back to basics

Multivibrator circuit is one of the first projects you start learning electronics. It is a beautiful circuit widely used for educational purposes and even in end projects as waveform generators. Lots of hobbyists grab a microcontroller/Arduino to blink LEDs. But using basic circuits like multivibrator may be cheaper, faster, and even fun. [Ray] decided to go through multivibrator theory and explain its working in detail step by step. The circuit itself consists of two transistors, two capacitors, and four resistors. When powered, the circuit generates a square wave signal that can be used to flash LEDs or clock other circuits. You will get an intuition on what causes multivibrator to develop generate. Formulas allow calculating resistor and capacitor values for a particular frequency. If you are a starter in electronics, build one on a breadboard and do some experiments, why not start with Christmas lights.

Continue reading