3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

LED Dot-Matrix Display

Step 6Programming

Programming
So you've made it, you've plugged the battery in, but wait, no, it's not working, or maybe you just have to program it ...

Ah that'd be a good idea. Becasue of my forthought, I have a download socket already on the PCB, so, just whack in the download cable, plug that into a serial port on your PC, get Programming Editor, and get coding!

Of course it helps if you've programmed a PICAXE before, I've had about 4 years experience so far, GCSE and AS/A level.

The first thing to do is to type:

main:goto main

This just sets up the PICAXE for the program, put the important code between the main and goto main, I do this so I don't forget to do it later. The next task is to set the outputs, which pins do you want high, and which low. The long and time consuming way is to go:

high 1high 2high 3low 1low 2low 3

Or you can be cool and set the states all in one line with:

let pins = %00001110let pins = %00000000

This works by giving each pin a specific digit, so pin 8 is the fist digit, pin 0 is the last digit and so on. We also need to be able to put a time delay in there so the pins are actually left on long enough for the LEDs to light. There are 2 main PICAXE waiting commands, wait and pause, wait 1 waits for 1 second, where as pause 1 waits for 1uSecond, which is what we need.

Those inclined to nit picking will have noticed that there are only 8 pins on the pins=%00000000 command. Yes, the ninth output on a PICAXE18X is infact the serial out pin. This requires a completely new piece of code to set.

poke $05,%00000000poke $05,%00001000

I'm not too sure why this works, or why it's nessesary, but I did get it from the friendly people at the PICAXE Forum

So putting all that together gives us:
main:			              ' Letter Alet pins = %00011000	          'poke $05,%00000000 		' Set SERTXD line lowpause 1				           'let pins = %00100101		  'poke $05,%00001000 		' Set SERTXD line highpause 1				           'let pins = %01000101		  'poke $05,%00001000 		' Set SERTXD line highpause 1				           'let pins = %10001000	          'poke $05,%00000000		' Set SERTXD line lowpause 1				           'goto main                               '

That should display the letter A on you dotmatrix display

« Previous StepDownload PDFView All StepsNext Step »
6 comments
Mar 14, 2007. 7:21 PMchinnokker999 says:
Hey i was wondering how you'd make a "T" with this setup... Since there's an even number of horizontal rows, you wouldn't be able to center the vertical line coming down from the top of the "T"...
Apr 13, 2008. 6:37 PMthermoelectric says:
Could You make another one that is 5x7?
Jul 25, 2009. 8:46 PMaklem says:
Lol just use a multiplexer... and are u using the x10 firecracker?
Oct 30, 2007. 10:24 AMAnkush says:
I was wondering, can you display a sinusoidal wave-form in ur 4x5 dot matrix. I know u r using it to display alphabets & numbers. But i believe that you cannot have a sine-wave on this type of display device.........as un-neccesary LEDs would glow.
Oct 30, 2007. 10:15 AMAnkush says:
Well you could display a T with a 4x5 dot matrix.......just that it is the small T...."t"!!!!
Oct 31, 2007. 12:04 PMAnkush says:
I actually meant small "t".....unless ur looking to display only capital alphabets. Actually if you draw the schematic diagram of your 4x5 matrix you will find that to display only a diagnol 3 LED's , unneccesary 3 other LED's would glow, try it & tell me if thats not true!!.
Nov 2, 2007. 1:36 PMAnkush says:
Ok, yeah thats right. But a standard 5x7 matrix has a problem with diagnol LEDs lighting up....& i mean continuosly ON. Its all because its connected that way. Maybe a circuit diagram would show you what i mean.
Jul 12, 2009. 10:45 PMchrisapalo says:
Hey... That's cool. Just thinkin'... Is there a way to use this with arduino? I have 3x3 matrix that is homemade.
May 29, 2009. 11:24 AMGasburner says:
Just reading the buzz, and as to the "T" argument, could you not use a PICAXE 28?
Jun 4, 2009. 5:53 PMmman1506 says:
oh yes the picaxe cip is better but if you need you you can use a pic chip with the same pcb .picaxe chips are pic chips with bootstrap program except you'll need to redo the programmer
Apr 19, 2007. 12:48 PMsalmanmufti says:
hi im student of bio medical engineering and i have assigned a proj to display a counter from 0 to 9 on dot matrix through a switch means whenever i press a switch it counts and stop untill the switch is pressed next time i have to make hard ware also and by using atmel 89c51 microcontroller and 8x8 dotmatrix plz help me i have to submit it after 3 days plz give me coding and circuit diadram plzzzzzzzzz im counting on u plzzzzzz
May 29, 2007. 9:18 AMsammy_pic says:
i could help but its going to be using a PIC microcontroller instead. and i hope your assignment is not too late at this time. My e-mail is osafehinti5@yahoo.com

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
11
Followers
1
Author:pinski1