avr-chat
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-chat] ATmega88 + triple 7 Segment Display (CC)


From: Daniel O'Connor
Subject: Re: [avr-chat] ATmega88 + triple 7 Segment Display (CC)
Date: Tue, 11 Mar 2008 20:53:38 +1030
User-agent: KMail/1.9.7

On Tue, 11 Mar 2008, Paul Lowe wrote:
> Here's one way to do it (thought up by a Comp. E. student who thinks
> he knows everything):
>
> Otherwise, here is a solution using only one data port in parallel:
>
> - Wire each 7 segment display to a digital 8 bit latch.
> - Use one data port to send your seven bits of segment data to all
> three seven segments via a bus
> - Use two wires as multiplexing selection lines to select which seven
> segment latch will receive the data. (e.g.: [00] -> segment 1, [01]
> -> segment 2, [10] -> segment 3)
> - Use some digital logic chips to check the multiplex selection lines
> to see which digital latch to enable for loading.
>
> So:
>
>        7-bit Data line
>     (to all three displays)


I don't think that will work with this because it's 3 7 segment displays 
ganged in parallel.

The latch idea would work for 3 separate 7 seg displays, however it's 
probably more sensible to refresh each one frequently (fewer parts 
needed).

If the OP has something like this..
http://pdf1.alldatasheet.com/datasheet-pdf/view/168057/ETC/LDT-M514RI.html
(although common cathode instead)

Then they will need to update each separate display often enough so the 
user doesn't see any flicker (50Hz+).

So you have 3 pins for 'select' (connecting to pins 12, 9, & 8), say 
PORTB[0:2] and 7 for the segments, say PORTC[0:7] (pins 1, 2, 3, 4, 5, 
7, 10, 11).

Make sure you have resistors in series with the LEDs or they will 
probably get fried :)

DDRB = 0x07;
DDRC = 0x7f;
while {1} {
        PORTB = 0x06;
        PORTC = num2seg(hundreds)
        _delay_us(20);
        PORTB = 0x05;
        PORTC = num2seg(tens);
        _delay_us(20);
        PORTB = 0x03;
        PORTC = num2seg(ones);
        _delay_us(20);
}

(ie port B pulls low and port C pulls high - this presumes the AVR can 
sink & source enough current to drive your LED - should be OK I think)

You can also put this into a timer routine with minimal work.

If you aren't sure of the pinout I suggest carefully probing with a 
fairly high value resistor (5kOhm I guess) and check. I suspect that 
99.9999% of all 7 seg displays have the same pinout as on that data 
sheet though.

-- 
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
  -- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]