Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Multiplexing 7 segment displays using AVR

Status
Not open for further replies.

justin_t

New Member
Hello

im programming an avr (atmega162) for switching a motor and heater at certain times of the day and am using a RTC chip interfaced with the avr and displaying the time of day on 4 x 7 segment displays.

The 7 segments are controlled by 7 port a output pins and each segment is activated in sequence via a sinking transistor by 4 portb pins.

This works well at the minute where i visit the refresh display subroutine once every scan and refresh all 4 segements with delays between each time. This looks good but i am aware that if i increase the rest of my program this will mean that the last segment refreshed will be slightly brighter than the rest as my increased program will increase the time period this segment is activated.

It has been recommended on another site that i should refresh one segment each time the subroutine is visited then next time refresh the next with the appropriate output on porta etc etc.

Ive tried this but it seems more cumbersome that the method im using. i guess im looking for confirmation that the method im using is sufficient for what i need. any thoughts??

justin_t
 
This works well at the minute where i visit the refresh display subroutine once every scan and refresh all 4 segements with delays between each time. This looks good but i am aware that if i increase the rest of my program this will mean that the last segment refreshed will be slightly brighter than the rest as my increased program will increase the time period this segment is activated.

Use the same delay after you refresh the fourth segment,then turn all segments off before exiting the subroutine, that way they're all active for the same time.
 
Status
Not open for further replies.

Latest threads

Back
Top