Help with Embedded Design: Push Buttons & 7 Segment Displays

  • Thread starter Thread starter Ian_Brooks
  • Start date Start date
  • Tags Tags
    Design
Click For Summary
SUMMARY

The discussion focuses on developing a microcontroller code for handling three push buttons and displaying the output on three 7-segment displays. The user intends to program in C and utilize the ctoasm function for assembly conversion. Key components include defining push button addresses and output ports, with suggestions to consider using a Basic Stamp or PIC microcontroller for simpler projects, or an 8051 for larger-scale applications. The need for an interface chip to manage the 7-segment displays due to I/O pin limitations is also highlighted.

PREREQUISITES
  • Understanding of microcontroller programming in C
  • Familiarity with 7-segment display interfacing
  • Knowledge of push button input handling
  • Experience with assembly language conversion using ctoasm
NEXT STEPS
  • Research interfacing techniques for 7-segment displays with microcontrollers
  • Learn about Basic Stamp and PIC microcontroller capabilities
  • Explore the 8051 microcontroller architecture and development kits
  • Study push button debounce techniques in embedded systems
USEFUL FOR

Embedded system developers, hobbyists working on microcontroller projects, and anyone interested in interfacing push buttons with 7-segment displays.

Ian_Brooks
Messages
127
Reaction score
0

Homework Statement



I'm very new to embedded design and wanted to develop a micro controller code that

*takes 3 inputs from 3 push buttons
- hundreds, tens, ones respectively
* displays the output on 3 7segment displays
* outputs a fixed binary number to another microcontroller / or perhaps use it for another aspect inside the microcontroller.


Homework Equations



None that I know of.
I'll most likely program it in C and use the ctoasm function to convert it into assembly

The Attempt at a Solution



This is the design I'm hoping for.
http://img228.imageshack.us/img228/9088/sampledesigndv7.gif

rough pseudo code for now

Code:
int hundreds, tens, ones;

boolean set = 0; // when pressed the final value is calculated and stored
boolean input1 = 0;
boolean input2 = 0;
boolean input3 = 0;

while (set != 1) {
  if (input1 == 1){
    BCDOUT_1(hundreds++);
  }
  else if (input2 == 1){
   BCDOUT_2(tens++); 
  }
  else if (input3 == 1){
   BCDOUT_3(ones++);
  }

}//end while - loop ends when set = 1

finalVal = (100*hundreds) + (10*tens) + ones;

things to include:
i'll have to #define the push button addresses
in the main code I'll have to define the output ports as

byte *output_port = (byte *) display; //or something or rather

could someone help - or atleast point me in the right direction
 
Last edited by a moderator:
Physics news on Phys.org
Which micro depends on how many you want to make.
A basic stamp or pic is easiest is you only want one or two, if you are making more then something like an 8051, but the dev kit is expensive for one off.
It is unlikely you will find a low end micro with enough i/o pins to drive 3 x 7segment directly, you probably need an interface chip to run the display.
 

Similar threads

  • · Replies 11 ·
Replies
11
Views
4K
  • · Replies 9 ·
Replies
9
Views
13K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
7K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 3 ·
Replies
3
Views
3K
Replies
1
Views
3K