Display decimal point on 7 segment LED

tedhill

New Member
I'm new to PICAXE, using a 28X, a MAX7219 driver, and four seven segment LEDs. I've gotten the LEDs to work using a Peter Anderson routine, and also an LM34 temperature sensor using one of Anderson's routines.

What I'd like to do is display the temperature (F) on the 7 segement LEDs using a decimal point; I can find many references on how to do this via serout to an LCD screen, but nothing showing something like 78.6 deg. F on the LEDs. Links to tutorials regarding manipulating variables and memory locations also sought.

Any help greatly appreciated.
 

hippy

Ex-Staff (retired)
If you have succeeded in displaying, for example, "786", all that is needed is to set the msb of the data byte which needs the decimal point setting before the byte is transfered out to the MAX7219.

If say b0 holds the data to be output, this will set the msb ...

- b0 = b0 OR $80

As to tutorials regarding manipulating variables and memory locations the "PICAXE Manual 2 : Basic Commands" is the first place to look - the LET command describes the manipulation of variables, and the PEEK and POKE commands allow the storing and retrieving of variables in SFR ( "RAM" ).
 

tedhill

New Member
Thanks hippy- it *is* easy when you know how. Works fine now.

What should I study to know what I needed to know originally to answer my own question? (I did mention I'm pretty new to all of this computer chip stuff...)
 

hippy

Ex-Staff (retired)
Everything is easy when you know how to do it !

What to study to be able to answer such questions as you had may perhaps be best answered by the educators who post to this forum. In my case, my skills have grown over the years as my experience has been widened; everytime a problem is encountered and solved, it's in the arsenal of knowledge for potentially solving subsequent problems. I didn't know the answer you wanted but had a good idea of where to look; something else which comes with experience, as does being able to spot the answer ( it was revealed in the device datasheet ).

Asking questions is a good way to learn and even experience people do that. Understanding the answer, and understanding why it is the answer and how it was arrived at gives additional ports of call to visit before having to ask the next question. With enough knowledge and experience it becomes easier to find answers oneself before having to ask a question. If you have to do similar tasks repeatedly they become much easier to deal with.

The key to gaining knowledge is, IMHO ...

Knowing you need an answer
Knowing where the answer will be
Knowing where to find where the answer is
Being able to see the answer
Being able to understand the answer
Being able to apply the knowledge in the future

And there's nothing wrong in asking for help along the way. No matter how obvious an answer seems in retrospect - indeed the more obvious the answer appears the more you will have learned and understood !
 

hippy

Ex-Staff (retired)
And another thing ... When starting off in a new area, it's always sensible to look at what others have done, as you did with taking Peter Anderson's routines. When you did this you probably weren't clear on why the code worked as it did, but as you work with the code and look at the device datasheet you'll start to understand the code, how it works, and why, and pretty soon you'll be in a position to be able to have written the code needed without having to use someone else's example at all. Electronics and computing is pretty much about repeating that process until you have the knowledge and understanding to develop from first principles yourself.
 

tedhill

New Member
Yes - I believe that's called "standing on the shoulders of giants" <g> It was very reassuring to come home after work today and see my handy dandy jameco breadboard tell me it was 83 POINT 3 degrees F in my study! Thanks again-
 

RickAlty

Senior Member
Just as an aside, if your display is always going to be displayed to the same number of decimal places, you can just hardwire the decimal point on the relevant 7-seg to make it be on whenever the unit is powered.
 

Rickharris

Senior Member
What to study - well as always it pays to start with "silly" simple things play around and then progress.

I start students with 6 commands:

High, Low, Goto, If ..Then, For ..Next, Wait.

using these they can do much of what they need to develop simple circultes, build robot s and robot arms etc.

I get them to do a practical session with bread board and a couple of LEDS, turn on - off, flash, flash a number of times, (need to understand varables),set up a switch as an input, understand the need for a pull down resistor, graduate to an LDR and readadc - set up a night light and security light and develop and alarm system using all of these factors. (we build a pressure pad from 3 bits of card, Top had some aluminium foil glued to it, middle has a couple of holes in it, bottom has a layer of foil. Wires from the foil to ground and an input and when you press the sandwich it acts like a switch.

At this point they know about as much as they need. The very good go on to develop robots and get multi processors talking to each other, use LCD displays, Use ultra sonic range finders for a number of innovative projects, build line followers and maze solvers (kids like us like things that move)

My current group are using 2 motors tilted to put the shaft on the ground and positioned at the base of a cut out figure they get from the net (starwars is popular and various pop stars) thy then use PWM and develop various routines to make the figures "dance" and "march"

Incremental learning is better than a huge challange that becomes a burdon and may ormay not get finished.

There is a huge store of information in this forum as well and old posts are worth browsing through.

Edited by - rickharris on 6/9/2005 6:36:58 PM
 
Top