PDA

View Full Version : Using a MAX7219 (LED digit multiplexer) with a 16F88



flotulopex
- 13th February 2007, 14:06
Hello,

I have some trouble making a 5 digit LED display working.

The display is driven by a MAX7219 multiplexer. My PIC16F88 pilots (well, it should...) the MAX7219.

The actual status is: when I powerup the circuit, the LED display shows up some digits and nothing more. The program should make the display count up from 00000 to 65535.

Before I invastigate the program, I think I may have a timing problem.

Can somebody tell my if, according to the MAX7219's datasheet (I have attached an extract), I need to set 10MHz clock frequency on the PIC yes or no?

If yes, can I do it with my 16F88 and how?

Darrel Taylor
- 13th February 2007, 14:33
No. That just means that you can clock data in at "UP TO" 10mhz.
It will work at much lower data speeds too.

The pic doesn't need to be running at that speed.

Are you using MSBFIRST in your SHIFTOUT statements?
<br>

flotulopex
- 13th February 2007, 15:25
Hi Darrel,

No, I use "1" since I do not include any variables definiton file.

If I'm not wrong, I read that "1" stands for MSBFirst in the PBP compiler manual.

I also took big care to make short wiring and good power feed (caps) as stated in the MAX7219's datasheet.

Btw, I clock my PIC at 4Mhz.

skimask
- 13th February 2007, 23:46
Hi Darrel,

No, I use "1" since I do not include any variables definiton file.

If I'm not wrong, I read that "1" stands for MSBFirst in the PBP compiler manual.

I also took big care to make short wiring and good power feed (caps) as stated in the MAX7219's datasheet.

Btw, I clock my PIC at 4Mhz.

Do ya got the code handy for us to see, maybe a schematic we can look at?
At 4mhz, the fastest you could shiftout (using the hardware) is 1mhz (if I remember right). So, assuming everything else is ok, you could run the PIC all the way up to 40mhz and be alright.

I have to wonder why you aren't using a PIC to handle this job instead of the MAX7219 (besides having to develop a 2nd PIC application in addition to the one you're working on in the 1st place)?

Archangel
- 13th February 2007, 23:54
I have to wonder why you aren't using a PIC to handle this job instead of the MAX7219 (besides having to develop a 2nd PIC application in addition to the one you're working on in the 1st place)?
I can think of a couple of reasons, 1. learn something new, 2. possible free sample:)

skimask
- 13th February 2007, 23:58
I can think of a couple of reasons, 1. learn something new, 2. possible free sample:)

I like the 2. the best.

flotulopex
- 14th February 2007, 08:31
I already thought about using my PIC to pilot the display. Isn't the MAX7219 a kind of µc itself, after all?

But, due to my poor knowledge, I have problems to understand how I would do the MAX job's directly myself since I don't clearly understand how it exactly does the job; I just assume how it works.

I have drawn the LED display matrix and then I noticed that I would have to adress each Digit (not segment) one by one and then display it for a very short period of time (maybe ns) and then adress the next Digit and so on.

If this is correct, yes, I should do it with my PIC ("don't let others do what you can do yourself if you can do it at least as good as the other one"). This means, I'm ready to do all with my PIC if somebody can confirm my assumings.

And NO, I paid CHF 16,25 (around $13.-) for my MAX7219. Sometimes people do silly things; I do often... Sorry.

TimV
- 11th March 2007, 20:47
Hi:

I can provide some help with the MAX7219 if this thread is still active.

I have used this chip in most of my 7 segment project since it is quite flexible.

Let me know

TimV

flotulopex
- 11th March 2007, 21:11
Hello TimV,

I have made my project without the use of the MAX7219.

But if you have any code example involving this chip, it would be nice.

I still want to make my MAX7219 work... ;)

Thanks in advance.