Category Archives: Other Tech

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.

Continue reading

google_pluspinterest

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.

8x8_matrix_vinyl

google_pluspinterest

Infra red remote control tester for Philips RC5 protocol

DSC09892
Electronics giant Philips invented the RC5 protocol for controlling electronic equipment such as CD players, VCR’s and audio amplifiers way back in the 1980’s. The RC5 standard has been adopted and used with great success ever since, which means it is probably the most common IR remote control format in your home today. We have recently been playing around with a PIC microcontroller based RC5 decoder programmed in C, with the purpose of testing any RC5 based remote handset you may have. The image above shows the RC5 code for a button press of ‘1’ on the CD player remote control decoded into binary and displayed on the 14 LEDS – the address data for a CD player is ’20’ hence the 10100 binary pattern on the green LEDS. The RC5 command for ‘1’ is unsurprisingly 000001 in binary as shown on the red LEDS. The two start bit LEDS (yellow) are showing 11 binary and the toggle bit is off. In the pic below the ‘1’ button has been pressed again showing the toggle bit now being set (blue LED).
DSC09895

Continue reading

google_pluspinterest

PIC Microcontroller project – 24 hour clock and thermometer displayed via 16f690 microcontroller and LCD programmed in C

lcd_thermo_clock_bread_boar

I got to thinking that an interest in hi-fi can be a bit geek ( in a good way ) so I thought one of my latest geek projects might be of interest to some of you. You could build the project ‘as is’ without learning embedded C programming or you could use the project as a spring board to extra geekiness and weekend fun – I’ll leave that to you :-)

Learning embedded C can be hugely rewarding and creative. The tool chain needed to get you started is either free (MPXLAB  IDE  and XC8 C compiler are both free downloads from the Microchip website and the pickit 3 needed to download compiled C code to your target microcontroller (16f690 in this case) is less than 50GBP.

Continue reading

google_pluspinterest