Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Pic 16f877a

Status
Not open for further replies.

Rajeshtr

Newbie level 6
Joined
Jan 1, 2023
Messages
13
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
106
Hi,I want a solution for button program..I have 6 gas and I want to monitor the pressure level..I want to set the reference point,ie low level, normal and high level that needs to be alarmed.. this is using 3 buttons..can anybody help please?....🙄i want to save this eeprom memory..I had completed the ADC reading and it's working fine
 
Last edited:

With only three buttons your options are:

1. use one button for each setting (do you really need a 'normal' alarm?) and cycle through the whole range, saving after you have released the button for say two seconds.

2. use one button for 'up', one for 'down' and one to save the setting, then moving on to the next setting.

3. use one button to call a menu, two for up/down on the menu then the first button to select an option then follow idea 2.

Your problem is knowing which setting you are adjusting and what you are setting it to, for that you need some kind of display, LED, OLED or LCD. Which do you have in mind?

I would use raw ADC readings to do all the calculations and comparisons and only convert to human readable numbers for displaying them.

Brian.
 

With only three buttons your options are:

1. use one button for each setting (do you really need a 'normal' alarm?) and cycle through the whole range, saving after you have released the button for say two seconds.

2. use one button for 'up', one for 'down' and one to save the setting, then moving on to the next setting.

3. use one button to call a menu, two for up/down on the menu then the first button to select an option then follow idea 2.

Your problem is knowing which setting you are adjusting and what you are setting it to, for that you need some kind of display, LED, OLED or LCD. Which do you have in mind?

I would use raw ADC readings to do all the calculations and comparisons and only convert to human readable numbers for displaying them.

Brian.
This is the concept I want..thanx in advance 😊

IMG20230101165721.jpg
 

Start with a flow chart, it is always easiest that way, particularly where there are menus and the purpose of the buttons may change depending on what function is selected.

Then decide on how you are going to present the menu to the user, it will need some kind of display to tell them what levels are selected to trigger the alarms. The display type is important because some require continuous updating and others remember what was last sent to them and hold it until you change it.

You also have to decide on what language to use for programming. For a simple selection and comparison program like this I would suggest writing it in 'C' but there are alternatives. There should be ample memory in a 16F877A to hold the program and save all the settings in its internal EEPROM.

Brian.
 

Hi,I want a solution for button program..I have 6 gas and I want to monitor the pressure level..I want to set the reference point,ie low level, normal and high level that needs to be alarmed.. this is using 3 buttons..can anybody help please?....🙄i want to save this eeprom memory..I had completed the ADC reading and it's working fine
Do u have any program for this?
 

The program is your job.
Our job is to assist you in how to get started (see the advice given previously in this thread) and to help you overcome various problems that you might encounter along the way.
Start with a simple program that correctly debounces the buttons (perhaps they toggle a corresponding LED) - as that will be essential.
Next get you display working - what is displayed is not so important at this stage as getting something on the screen. You can get a menu system going later by adding the button presses (for example).
Next make sure that you can read each of your sensors individually. Perhaps get the values displayed. Then get them working together.
Carry on like this to get the whole project complete. By doing it step by step you can make sure that each part works correctly, and if something stops working, then the problem is in the part you have just added. This approach makes development, testing and debugging more straight forward. If you try to do too much all at once then it is much harder to find where the problems lie.
Susan
 

100% in agreement with Susan. If you want someone to do the design work for you there are plenty of commercial programming houses that will do it at a cost to you. If you want to do it yourself, start learning, we will help you but not do it for you.

Please understand we are all volunteers here, we do no get paid so we will not do work for you for free. What we do is help you understand how to do the programming for yourself. Even 'older' people like myself have to spend a lot of time reading data sheets and planning programs before writing them. I first programmed PICs 33 years ago and I still spend hours reading the data sheets before hitting the keyboard.

Brian.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top