Help with Embedded Design: Push Buttons & 7 Segment Displays

  • Thread starter Ian_Brooks
  • Start date
  • Tags
    Design
In summary, the conversation discusses a project involving developing a microcontroller code that takes inputs from push buttons and displays the output on 3 7-segment displays. It also mentions using a fixed binary number to communicate with another microcontroller or for internal use. The poster plans to use C and convert it into assembly using the ctoasm function. They also provide a rough pseudo code and discuss the need for defining push button addresses and output ports. They also mention the possibility of using an interface chip for driving the displays and suggest different microcontrollers depending on the number needed.
  • #1
Ian_Brooks
129
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 [Broken]

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
  • #2
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.
 
  • #3


I would recommend starting by breaking down the problem into smaller, more manageable steps. First, you will need to familiarize yourself with the specific microcontroller you are using and its capabilities. This will help you determine the best approach for coding and using push button inputs and 7 segment displays.

Next, I would suggest researching and experimenting with different coding languages and techniques, such as using C and converting it to assembly, to find the most efficient and effective solution for your design.

Additionally, it may be helpful to consult with other experienced embedded designers or seek out online resources and tutorials to gain a better understanding of the design process and potential challenges you may face.

Overall, it will take time and effort to develop a successful microcontroller code for this design, but with persistence and a methodical approach, you can achieve your goal.
 

1. What is an embedded design?

An embedded design refers to the process of creating a single-purpose, specialized computer system that is integrated into a larger device or system. The design typically includes hardware components, such as microcontrollers and sensors, and software programming to control and monitor the device's functions.

2. How do push buttons work in embedded design?

Push buttons are commonly used as input devices in embedded design. They work by completing an electrical circuit when pressed, which sends a signal to the microcontroller. The microcontroller can then interpret the signal and trigger a specific action or function in the device.

3. What is a 7 segment display in embedded design?

A 7 segment display is a commonly used output device in embedded design that can display numbers and some letters using seven individual LED segments. The segments are arranged in a specific pattern and can be controlled by the microcontroller to display different characters or numbers based on the input it receives.

4. How are push buttons and 7 segment displays typically used in embedded design?

Push buttons and 7 segment displays are commonly used together in embedded design to create user interfaces for devices. For example, a push button can be used to cycle through different functions on a device, while the 7 segment display can show the current state or mode of the device.

5. What are some common challenges when working with push buttons and 7 segment displays in embedded design?

Some common challenges when working with push buttons and 7 segment displays in embedded design include understanding the electrical connections and programming logic needed for them to function properly, as well as ensuring their compatibility with the overall design and other components. It is also important to consider the physical placement and size of these components to ensure they are user-friendly and functional for the intended purpose.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
11
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
9
Views
11K
  • Engineering and Comp Sci Homework Help
Replies
9
Views
1K
  • Electrical Engineering
Replies
2
Views
388
  • Engineering and Comp Sci Homework Help
Replies
4
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
5
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
0
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
6K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
8
Views
1K
Back
Top