Categories
algorithm Arduino hardware software

Making noise with a SN76489 Digital Sound Generator – Part 2

In the first part we examined the basics of the SN76489 hardware and how to manage it at the hardware interface between MCU and IC.

To enable sound generation experiments, the first thing I did was create a library to allow me to write sketches without worrying too much about this underlying hardware management.

Categories
algorithm Arduino hardware software

Making noise with a SN76489 Digital Sound Generator – Part 1

Most computer games from the 80’s are recognizable by the bleeps and bloops they produced for sound. The easiest way to do this to toggle a single I/O pin to generate a square wave but there are some retro sound ICs that allow us to do much better for a minimal investment.

The SN76489 is one such IC that is still available at a very modest price and is easily interfaced to modern microprocessors.

Categories
Arduino electronics hardware PCB

Solenoid Driver PCB

A part of a bigger project needed control circuits for up to 16 DC solenoids. Instead of wiring up a one-off prototype, I decided to design and manufacture a PCB to do the job in a scalable manner, and with a minimum of Arduino pins, so that the same circuits could be used for future high power on/off control tasks.

Categories
algorithm Arduino software

Combining Arduino Sketches

Beginners love Arduino coding because there is so much of it available to just copy, load and go without too much thinking required.

Then they find that one thing they want to do is in one sketch and another in a second sketch. All they need to do is combine these sketches! This can be a big hurdle the first time it happens and many fail to get a satisfactorily working product.

There is a systematic approach to this that helps to ensure that things work.

Categories
algorithm Arduino software

Finite State Machine Programming Basics – Part 2

The first part of this article introduced a simple Finite State Machine through the exercise of transforming the standard linearly programmed Blink example into a FSM style application.

In this part we’ll look at other common embedded applications and how they can be coded using FSM techniques.

Categories
algorithm Arduino software

Finite State Machine Programming Basics – Part 1

Many beginner programmers, once they go beyond the ‘blinking LED’ code, get blocked by not being able to do more than one thing at once. In many cases they are directed to the ‘Blink WithOut Delay’ code (BWOD) as a hint about what to do, but this soon also runs out of steam. BWOD implies, but does not make explicit, a Finite State Machines (FSM) approach.

In this article we’ll evolve the simple linear Blinking LED sketch into a FSM to illustrate the difference in approach.

Categories
Arduino electronics software

Using the MAX7219 in your Projects – Part 2

In the first part we explored the functions of this MAX7219 and how the SPI link is the key to making the device work for us.

In this part we’ll develop code to efficiently display numeric data using 7-segment and LED matrix displays.

Categories
Arduino electronics hardware

Using the MAX7219 in your Projects – Part 1

The MAX7219 is a common and inexpensive IC used for controlling up to eight 7-segment LED displays (or 64 individual LEDs).

Beginners are often intimidated by how to use this versatile component with a microcontroller, turning to libraries to help them solve the problem. In most simple cases, it is more efficient to run the IC directly. Here’s what you need to know to get the job done.

Categories
algorithm Arduino hardware software

YX5300 MP3 Player

The YX5300 MP3 module is easily interfaced to a microcontroller, creating MP3 player with a user interface. Using the MD_YX5300 library and an understanding of how the device works (see the previous posts here and here), this article describes the code for a simple MP3 player and a more complex player with an LCD module display.

Categories
algorithm Arduino hardware software

YX5300 Serial MP3 Player – Message Sequencing

Since my previous YX5300 post I have received a number of questions related to how the serial messages between a host and the MP3 module work. Understanding this message flow is important when writing code that uses the MP3 player in an interactive application.