Page 1 of 1
LED7SEG 0-999
Posted: Fri Jan 20, 2012 4:04 pm
by brunoflow
counter in LED7SEG 0-999 could help me.
the program is attached thanks
Re: LED7SEG 0-999
Posted: Fri Jan 20, 2012 4:55 pm
by medelec35
Hi brunoflow,
I covered 3 x 7seg here:
http://www.matrixmultimedia.com/mmforum ... 033#p31308
That may help you?
Martin
Re: LED7SEG 0-999
Posted: Fri Jan 20, 2012 4:56 pm
by Gary Freegard
Hi
I have made two changes, have moved one LED to port C and have removed the 2 second delay.
The problem with using LED 7 segments is that they use at least 7 IOs just for the number (8 with decimal point) and also they have an additional connection so that only the correct display is 'enabled' when required.
Generally they share the same 7/8 IO lines but have different 'enable' lines.
i.e. If you have two 7 segments A and B you would have to do the following.
- enable A
output A's data
delay 10ms
disable A
enable B
output B' data
delay 10ms
disable B
This would be constantly repeated, the delay can be adjusted to get the best display
Gary
Re: LED7SEG 0-999
Posted: Fri Jan 20, 2012 7:35 pm
by brunoflow
Thanks for the help
More when I record this example the program together account led7segment they wanted a program that counts up from 0 to 999 in PORTD
Re: LED7SEG 0-999
Posted: Fri Jan 20, 2012 10:59 pm
by medelec35
brunoflow wrote: they wanted a program that counts up from 0 to 999 in PORTD
That will not be possible.
With 3 displays you will need 3 pins for the anodes (1 for each display) but you will also need 7 pins in total for all the cathodes is you exclude the decimal point or 8 pins if you include decimal. The cathodes (a,b,c,d,e,f,g & decimal point if used) of each display are connected in parallel. That is a total of 3 + 7 = 10 pins without decimal points or 3 + 8 = 11 with decimal points .
Since port D has a maximum of 8 pins, you will also need to use 2 or 3 pins from another port as well. Which is what Gary is saying and I totally agree with him.
Between Gary's Flowchart and my Flowchart you should have enough information to complete your own Flowchart.
If you get stuck then post your new Flowchart and we can make sure it works the way you want it to.
Martin