Avr gcc calculator program-7 segment display

Thread Starter

Ardra

Joined Jun 9, 2017
2
I want to write a code for calculator in atmel avr c. The microcontroller i use is atmega 128, et avr start kit v1. What i want to implement i, i have two seven segment leds that is controlled by two pushbuttons, and another push button for controlling 2 leds to switch between the operations like if both leds are off, it means addition, if {01-substraction, 10-multiplication , 11 - division}. Another pushbutton for an "equal to" and the output should be displayed on 2 segment displays. Can anyone able to help me with logic i want to implement. Please help me.
 
Arduino IDE is C, well chunks of it anyway.
There are several compilers for Amtel, which of course cant actually run C code and if you are not using an IDE and boot loader yiou are going to have to buy or build a programmer to load your compilled code.

Amtel's own Studio 7 or IAR Workbench, which Amtel recommend are both well regarded.

That said, and I mean no offence here, given the simplicity of your question, and application, I suspect you may be better with an IDE that handles the complexities for you. Hence the Arduino suggestion I suspect.
Arduio host an extensive forum designed to accommodate developers at all skill levels, in fact there are probably few better places to go to start learning. You will get help with everything from blinking a single LED to building your first drone with FPV and heads up avionics, well simple ones

Is this some sort of assignment? Homework?
Your question looks a little confused. How are you getting the numbers in?
What is so important about C, its not like you are going to put much code in a uP and whatever you put in there the compiler performance is far more important than the high level language you use to define the code.

The point is that any compiler will likely have an implimentation of C that is a only subset of the language and will also requires processor specific code that may or may not be common to C in its pure form.
If you want specifics, actual code, you will need to define your environment and your project in some detail.
If you want to learn then you will still need to set some broard coals and then do some reading, asking questions as you go about concepts you are struggling with.

Your application suggests a learning opportunity but your responce to the suggestion is not showing a willingness to learn... Odd

Al
 
Top