All About Circuits Forum  

Go Back   All About Circuits Forum > Software, Microcomputing, and Communications Forums > Embedded Systems and Microcontrollers

Notices

Embedded Systems and Microcontrollers Discussion forum for projects and working with embedded systems and microcontrollers (FPGAs, PICs, AVRs). Get help with hardware issues and embedded programming.

Reply   Post New Thread
 
Thread Tools Display Modes
  #1  
Old 07-16-2012, 06:41 AM
shom_show shom_show is offline
Junior Member
 
Join Date: Sep 2010
Location: Kolkata,Shibpur
Posts: 13
Send a message via Skype™ to shom_show
Default Operation of 7 segment LED display with avr studio4 without using max7221 driver ic

Myself Sumanta Kumar Show is trying to operate a 7 segment LED with avr

studio4 using Atmega32. What I have seen in internet that normally

MAX7221/7219 driver IC is required. I am trying to do that same thing without

using MAX7221. Can anyone please give me his suggestions or any sample

program if you have for operating the 7 segment LED with avr studio4 but

without using max7221 ic. Yours suggestions will be highly appreciated. If

possible please email me on the below Email IDs.

Thanks in advance.


Email Id - <SNIP>

Last edited by bertus; 07-16-2012 at 06:47 AM. Reason: removed email to protect you from spambots
Reply With Quote
  #2  
Old 07-16-2012, 09:38 PM
bretm bretm is offline
Senior Member
 
Join Date: Feb 2012
Posts: 151
Default

Max7221 is generally used when you need to drive multiple seven-segment displays. Is that what you want to do? Are your displays common-cathode or common-anode? What's the rated forward voltage of the segments that you want to drive?

Edit for more questions: How many I/O pins do you have available on the Atmega to drive the displays? Are you trying to avoid all extra driver chips? Because the point of the Max7221 is to reduce the part count and simplify circuit design. Going without it will probably require even more parts, such as resistors and transistors.

Last edited by bretm; 07-16-2012 at 09:43 PM.
Reply With Quote
The Following User Says Thank You to bretm For This Useful Post:
shom_show (07-17-2012)
  #3  
Old 07-17-2012, 06:26 AM
shom_show shom_show is offline
Junior Member
 
Join Date: Sep 2010
Location: Kolkata,Shibpur
Posts: 13
Send a message via Skype™ to shom_show
Default

Yes I want to drive multiple seven segment displays. The LEDs I am using are COMMON

ANODE (LTS543). The rated voltage forward voltage which I am applying is 2.5 volts. I

have the 4 ports available (port A, port B, port C, port D) with total 32 output pins. Yes

its true that MAX7221 is reducing the part count and simplifying the circuit. But with all

these ports of ATMEGA32 is it not possible to display a particular digit without driver ic.

Please have your suggestions.


Sumanta
Reply With Quote
  #4  
Old 07-17-2012, 11:32 AM
Papabravo's Avatar
Papabravo Papabravo is offline
Senior Member
 
Join Date: Feb 2006
Location: Michigan, USA (GMT-5)
Posts: 5,521
Default

The technique is a trivial application of the "one-hot-enable". A transistor switch supplies Vcc to one and only one 7-segment display. The common segment lines are turned on for a small time and then turned off. The transistor switch that was on is turned off, and the next one is turned on and the process repeats.

If you want to do "Charlieplexing" then you just have to stare at the picture until it comes to you, but the idea is essentially the same.
__________________
We never have time to do it right,
But we always have time to do it over.
Reply With Quote
  #5  
Old 07-17-2012, 12:06 PM
John P John P is offline
Senior Member
 
Join Date: Oct 2008
Location: Massachusetts
Posts: 1,276
Default

Are you maybe trying to avoid the high cost of the MAX7219? I think we all want to do that if we have to drive LED digits, or LEDs in general.

Trouble is, you pay for replacing the expensive chip by being forced to use a pile of hardware. You need a PNP/P channel transistor per digit, with a base resistor if it's bipolar. Then you need 7 NPN/N channel transistors and 7 resistors to limit current, and base resistors for each if they're bipolar. Or 8 of each if you want to use the decimal point. Total processor pins used, 1 for each digit and 1 for each segment, so 16 to drive 8 digits with 8 segments.

Then of course you have to program the thing. You might end up wishing you had given Maxim the money in the first place.
Reply With Quote
  #6  
Old 07-17-2012, 02:00 PM
Papabravo's Avatar
Papabravo Papabravo is offline
Senior Member
 
Join Date: Feb 2006
Location: Michigan, USA (GMT-5)
Posts: 5,521
Default

@John P -- you are not wrong about the economics of LED control. Don't forget the cost of assembly and layout. One part on a pick and place machine verses several dozen discrete parts. The Maxim chip is a bargain no matter how you slice it. Maybe the OP is more interested in having a "positive learning experience". After all any damn fool can take and slap a chip upon a board.
__________________
We never have time to do it right,
But we always have time to do it over.
Reply With Quote
  #7  
Old 07-17-2012, 02:19 PM
MrChips's Avatar
MrChips MrChips is offline
Super Moderator
 
Join Date: Oct 2009
Posts: 8,355
Blog Entries: 23
Default

How many digits do you wish to display?

You can interface the displays directly to the MCU plus current limiting resistors if you don't mind less than full brightness. All you would need are two 8-bit ports at the most.
__________________
Most computer problems can be attributed to a simple problem - a loosewire behind the keyboard.

Reply With Quote
  #8  
Old 07-17-2012, 06:34 PM
John P John P is offline
Senior Member
 
Join Date: Oct 2008
Location: Massachusetts
Posts: 1,276
Default

OK, yes. But if you multiplex pins of the processor directly, you need to drive all the segments that are "on" in any given digit from a single port pin (or maybe you could control two or more pins in parallel?) And on the cathode side, you have to recognize that the segments must be driven with more than the normal current, because each digit is only on for a fraction of the time. So for 8 digits, you'd need 8 times the rated current, per segment, to get the same perceived brightness.

You would need to make a careful assessment of how much current you need from the processor pins; worst case would be if the display is showing all 8's and every segment is lit. Then compare that with the processor specs.
Reply With Quote
  #9  
Old 07-18-2012, 02:13 AM
MrChips's Avatar
MrChips MrChips is offline
Super Moderator
 
Join Date: Oct 2009
Posts: 8,355
Blog Entries: 23
Default

Here is an example of driving four digits directly from an mcu:

__________________
Most computer problems can be attributed to a simple problem - a loosewire behind the keyboard.

Reply With Quote
  #10  
Old 07-18-2012, 02:50 AM
John P John P is offline
Senior Member
 
Join Date: Oct 2008
Location: Massachusetts
Posts: 1,276
Default

That processor has a limit of 25mA per pin, so your current per segment is a maximum of 25/7, or about 3.5mA (when it's lit, the anode for each digit has to be driven by a single processor pin, supplying current to all 7 segments). That's roughly equivalent to 1mA on a continuous basis, as each digit is only lit for 25% of the time. I'm sure the LEDs will be visible, but they'll be operating at a low brightness level.
Reply With Quote
Reply   Post New Thread

Tags
, , , , , , ,


Related Site Pages
Section Title
Worksheet Microcontroller principles
Worksheet Digital display circuits
Textbook Ring counters : Shift Registers
Textbook 7-segment display : Digital Integrated Circuits
Textbook 3-bit binary counter : Digital Integrated Circuits


Similar Threads
Thread Thread Starter Forum Replies Last Post
Arduino code Noob Need help Turkish The Projects Forum 8 02-27-2014 02:33 PM
Using the double digit seven segment display anamta Homework Help 4 12-30-2010 05:18 PM
The Seven Segment Display zhhgw Programmer's Corner 0 01-11-2008 10:19 AM
7 Segment LED display noltex The Projects Forum 17 08-08-2007 07:10 AM

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:29 AM.


User-posted content, unless source quoted, is licensed under a Creative Commons Public Domain License.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.