PICAXE-18X & Philips EE: Music with the PICAXE-18X


Introduction

Although the PICAXE-08M is the part that has very specific support for playing music, the 18X is still capable of generating simple songs through the use of the SOUND command, by appropriate selection of sound values. This extremely simple application shows the appropriate values for one octave, and plays a song that is very well known in many countries.


Hardware & Software Methods

We use our Philips EE (Electronic Experimentation) system for prototyping. The following input/output configuration has been used:

The SYMBOL declarations show the note values that were selected in order to create one octave, and can be extended at will by adding more declarations. The actual note values were selected through trial and error, as the values do not relate directly to frequencies (especially not in the high frequency range) as is the case with the 08M. Other SYMBOL declarations are used to indicate a note length of 1/4, 1/2 and 1 ("kwart", "half", "heel" resp.). Although the code is currently available only in Dutch, the program is very short, simple, and easy to grasp.

Code:


 

Contact me