LED Dice coded in C targeted via XC8 C compiler for PIC microcontroller

As Christmas is now on the horizon, I thought it might be fun to design an electronic dice, to give as presents to your family, or just use whilst playing traditional family games during the holidays.

This dice project has seven LED’s which can display the possible outcomes of rolling the dice…in other words, 1, 2, 3, 4 , 5 or 6. A single button instigates the ‘rolling’ of the dice, as the outer six LED’s rotate to indicate motion. When the button is released, the dice value is displayed on the LEDS’s, flashing at a frequency of 2.5Hz.

Here are a few pic’s of the dice in action:



Here the dice prototype is in reset. All LED’s are off.


Here we have pressed the button and been returned the value of 3 for our roll of the dice.


Now we have pressed the button again and been returned the value of 5.


The LED’s rotate as the button is pressed.

The software is very simple. The rotating LED’s when the button is pressed uses a Timer0 interrupt routine to illuminate the six LED’s on the edge of the dice to indicate the rolling of the dice. When the button is released, the LED’s display the value of your roll of the dice.

Here is the C source code which was compiled using Microchip’s XC8 compiler, targeted at a 16f690 microcontroller. dice-c

For those of you who wish to construct this project, here is the circuit diagram (hand drawn). dice_circuit_diagram

Have fun and Merry Christmas!


HifiGear’s Hifi Dictionary

The world of hifi can be a daunting and confusing place at first, especially when looking at different models of speakers and amps and CD players and streamers and the mighty list of technical terms they come with. Hopefully we can help bust some of that jargon here. Are we missing a word or term you’d like to know the meaning of? Leave us a comment below.

Three pairs of output transistors per channel bode well for long term reliability

Continue reading


Window display using five 8×8 LED matrices, MAX7219 drivers and PIC 16f690 microcontroller

This project was created to promote our new vinyl record department in our Hereford store, the idea being to place this scrolling text message display in the shop window to entice customers to browse. As you can see from the short video below, I’ve yet to build the final display project – what you see is a breadboard prototype.

Any message can be displayed within reason – it is simply edited from within the firmware. One of the challenges of this project was the fact that although there are many scrolling text projects to be found on the web and shown on You Tube, they invariably use pre-built software display libraries to cope with the driving of the 8×8 matrix displays, the communication between the microcontroller and MAX7219 display driver, and then the animation of the text – these libraries give you no real insight into what is actually going on inside the microcontroller.

I wanted to ‘roll my own’ display/ comms/ animation code in C language, but found very sparse information available. I hope to set this right over the course of this blog post, and hopefully you will want to create your own scrolling text display, or just use the information on offer here as a tutorial to go on to better and bigger things.

Here is a pdf file containing the C language source code for the project. It was compiled using Microchip’s free XC8 C complier, and flashed to the microcontroller with the PICkit 3.



Quad In-Store Trade-In Deal



Quad are renowned for designing and engineering some of the most impressive sounding and longest-lasting hifi components on the market, a reputation they have developed over 80 years of experience, tradition and gruelling product development. It may sometimes be difficult to justify upgrading your system; while technology as a whole and Quad in particular have grown and improved immensely over the years – your thirty year old Quad system still sounds as good as the day you bought it… But Quad are now offering two very good intensives to move on your old system and experience sound like never before…


Continue reading


Loewe: A Brief History (Sort Of)

Siegmund Loewe with Manfred von Ardenne

Siegmund Loewe with Manfred von Ardenne

Loewe are a well established and highly regarded manufacturer of television sets and hifi products, having been designing and engineering many ground-breaking innovations for almost 100 years. While renowned world-wide for their impeccable build quality, stunning picture, immersive sound, luxurious design and overall futuristic feel; Loewe have a compelling history as an impacting force behind the development of consumer electronics industry as we know it today. This history is extensive, so I’ve tried to simple it out to some of the more impacting milestones.

Continue reading


What Are MM and MC Phono Cartridges?


A Moving Magnet phono cartridge is comprised of a tiny magnet, located at the end of the cantilever of the stylus that sits between two coils. One coil caters to the left aspect of the music, while the other is for the right – this allows for the stereo sound. This magnet vibrates between the two coils and induces a small electrical current within them in the process. Because the magnet is so small, it needs less tracking/downward force to correctly manoeuvre between the grooves of a vinyl record. A Moving Iron cartridge makes use of essentially the same construction, but swaps the magnet for a tiny piece of iron or other light-weight and ferrous alloy. The iron is lighter and so reduces the necessary tracking force even further.

Moving Magnet is the most common type of phono cartridge, so many integrated amplifiers now feature a Moving Magnet phono stage and many manufacturers, such as Rega and Ortofon design and construct a wide range of MM cartridges with varying levels of quality. While every MM cartridge makes use of this fundamental construction, the way that this is implemented within a cartridge varies as do the materials used, allowing for differing qualities and a unique sound-signature depending on the brand and model.

Moving Magnet Cartridge Design

Moving Magnet Cartridge design. The Magnet sits between two coils at the end of the cantilever.

Moving Coil cartridges feature an inverted version of the Moving Magnet design. Instead of a magnet sitting on the end of the cantilever between two coils, the coils are attached the cantilever and a magnet is placed near them. Because space within the cartridge at this level is extremely limited, the coils are made from an exceptionally fine wire.

The coils tiny size results in a very low output. While Moving Magnet cartridges tend to offer a more relaxed, warmer sound, Moving Coils are known for offering a better level of detail and a wider stereofield than the Moving Magnet alternatives. Moving Coil Cartridges will often require an external phono-stage specific to their construction.

Moving Coil Cart

Moving Coil Cartridge design. Inverted to MM design, the coil is this time on the cantilever with a magnet located close-by.



Ortofon Quintet Series Cartridges



Ortofon are a Danish manufacturer of high quality phono cartridges, designed to get the very most out of your vinyl collection from a variety of price points. Ortofon cartridges, both Moving Magnet and Moving Coil configuration are commonly found supplied with high quality ProJect turntable models, but Ortofon cartridges sound exceptional with any compatible turntable


The Quintet Series is Ortofon’s range of quality Moving Coil cartridges and are the result of years of relentless product development, research and continued innovation. Each model within the Quintet series has its own specific sound style and signature, but all of them follow the same philosophy of outstanding performance and retain true to Ortofon’s commitment to refining the analogue domain to a superlative level.


Continue reading