![]() | ![]() | ![]() |
| | #31 |
|
The code you just posted only displays the temprature it does not seem to register any button presses
| |
| |
| | #32 |
|
Are your buttons Pulled low? Aka a resistor tied to gnd and when you press button it pushes VDD to pin.. I finished my entire menu and its working perfect. Here is my complete code ... everything is in a ZIP so i dont have to upload like 6 files heh... you can learn more from see everything i got here: http://atomsofttech.info/code/LM35_menu.zip
__________________ AtomSofts eBay Store AtomSoftTech: C18 TIPS & TRICKS v9 PDF Nokia 6100 Driver/Software My Name: Jason Lopez http://atomsofttech.info/ | My YouTube Videos! My Favorite Store: dipmicro Electronics | |
| |
| | #33 |
|
no my buttons r tied high like this: ![]() Thanks for your code I will take a look through it. | |
| |
| | #34 |
|
There the issue heh. Try changing that define to #define KeyPORT (~((PORTA>>2)&0x0F)) the. ~. Symbol means opposite I think
__________________ AtomSofts eBay Store AtomSoftTech: C18 TIPS & TRICKS v9 PDF Nokia 6100 Driver/Software My Name: Jason Lopez http://atomsofttech.info/ | My YouTube Videos! My Favorite Store: dipmicro Electronics Last edited by AtomSoft; 24th October 2009 at 09:53 PM. Reason: Additional info | |
| |
| | #35 |
|
still does not register any button press, I will take a look through your zip to try and work out where I went wrong
| |
| |
| | #36 |
|
how are you checking for a button press?
__________________ AtomSofts eBay Store AtomSoftTech: C18 TIPS & TRICKS v9 PDF Nokia 6100 Driver/Software My Name: Jason Lopez http://atomsofttech.info/ | My YouTube Videos! My Favorite Store: dipmicro Electronics | |
| |
| | #37 |
|
doesnt your code check for button press? Code: unsigned char WaitForInput(void){
unsigned char temp1; //TEMP DATA HOLDER
unsigned char done = 0; //DONE Var will determine if done
while(!done){ //while done == 0
if(KeyPORT>0){ //if KeyPORT aka PORTB&0x0F.. the &0x0f will make sure we
//return the lower part of port only RB0 to RB3
temp1 = KeyPORT; //Place the lower part of port into temp variable
while(KeyPORT==temp1);//Like a debounce for button press
done = 0xFF; //Set DONE Var so we know we are complete
}
}
return temp1; //Return our temp1 var
}
Last edited by dawson; 24th October 2009 at 10:42 PM. | |
| |
| | #38 |
|
yeah but when you are going to press menu/enter to show main menu how are you doing it?
__________________ AtomSofts eBay Store AtomSoftTech: C18 TIPS & TRICKS v9 PDF Nokia 6100 Driver/Software My Name: Jason Lopez http://atomsofttech.info/ | My YouTube Videos! My Favorite Store: dipmicro Electronics | |
| |
| | #39 |
|
__________________ AtomSofts eBay Store AtomSoftTech: C18 TIPS & TRICKS v9 PDF Nokia 6100 Driver/Software My Name: Jason Lopez http://atomsofttech.info/ | My YouTube Videos! My Favorite Store: dipmicro Electronics | |
| |
| | #40 |
|
Im not sure what you mean? and your video does not play
| |
| |
| | #41 |
|
This code wont work: Code: //--- main loop
do {
if(Button(&PORTA,2, 1, 0)) {
MainMenu();
}
else {
read_temp();
}
} while (1);
Code: //--- main loop
do {
if(KeyPORT == ENTER) {
MainMenu();
}
else {
read_temp();
}
} while (1);
#define KeyPORT (~((PORTA>>2)&0x0F))
__________________ AtomSofts eBay Store AtomSoftTech: C18 TIPS & TRICKS v9 PDF Nokia 6100 Driver/Software My Name: Jason Lopez http://atomsofttech.info/ | My YouTube Videos! My Favorite Store: dipmicro Electronics Last edited by AtomSoft; 25th October 2009 at 12:03 AM. | |
| |
| | #42 |
|
media player says it's "missing media rights"
| |
| |
| | #43 |
|
yes I have changed both those things but it does not recognise button press
| |
| |
| | #44 |
|
darn i dont know why its giving you a issue. Can you try making a simple project just to turn a LED on with a button? This way we can see if its the code or what... Im putting video on youtube now: YouTube - LM35 Temp Sensor With Menu
__________________ AtomSofts eBay Store AtomSoftTech: C18 TIPS & TRICKS v9 PDF Nokia 6100 Driver/Software My Name: Jason Lopez http://atomsofttech.info/ | My YouTube Videos! My Favorite Store: dipmicro Electronics | |
| |
| | #45 |
|
ok will give it a try
| |
| |
|
| Tags |
| lcd, menu |
| Thread Tools | |
| Display Modes | |
| |
Similar | ||||
| Title | Starter | Forum | Replies | Latest |
| LCD menu in C? | picstudent | Micro Controllers | 1 | 13th September 2009 04:48 AM |
| LCD+keypad interface -> menu structure. Concepts sought. Assembly. PIC. | astronomerroyal | Micro Controllers | 23 | 29th August 2008 04:59 AM |
| LG CRT Repair and servce menu. | dark666 | General Electronics Chat | 0 | 7th June 2008 06:17 PM |
| Electronic Music Menu | cyprio7 | General Electronics Chat | 0 | 11th April 2008 04:50 PM |
| One menu, multiple pages. Anyone good at websites? | ThermalRunaway | Chit-Chat | 6 | 25th June 2006 11:45 AM |