??? 06/01/05 19:44 Read: times |
#94201 - Inferences Responding to: ???'s previous message |
Leo Paul said:
If you want to check an individual input declare first using sbit as you have done in your first post and check on that Hi all, After a day of trying out all the combinations, I came to know what was the mistake I was doing. In the loop, I have given like this: while(P0^7==x); But when i used something like this: sbit my_bit=0x87; while(my_bit==x); This one is working. Nevertheless, I have found out where I had made the mistake. I think P0^7 is not defined as a sbit in reg51.h. Only P0 is defined as sfr P0=0x80. When I explicitly define my_bit and use, things are working fine. I have tested using a different logic having delays for debouncing. Everything is going fine. Thanks a lot. By the way, this is the kit I have developed for testing all the prototypes which I design. I am glad to inform you that most of things which I learned were only from this forum. Hats off to everyone here.(this pcb is designed using FreePCB, you may find a similar photo there also) (Raghu Sir, crystal is oscillating and this board also serves the purpose of master board! ![]() |
Topic | Author | Date |
Keil: getting input | 01/01/70 00:00 | |
If it works in ASM it Works in C | 01/01/70 00:00 | |
Why C?! | 01/01/70 00:00 | |
Irrelevant | 01/01/70 00:00 | |
Of Course | 01/01/70 00:00 | |
key scan | 01/01/70 00:00 | |
Delay.. | 01/01/70 00:00 | |
Delay | 01/01/70 00:00 | |
Software Delay Loops | 01/01/70 00:00 | |
Software Delay Loops | 01/01/70 00:00 | |
Learning 'C' | 01/01/70 00:00 | |
to be precise.. | 01/01/70 00:00 | |
Debounce | 01/01/70 00:00 | |
completely missed it.. | 01/01/70 00:00 | |
to be precise... | 01/01/70 00:00 | |
Sorry Leo ! | 01/01/70 00:00 | |
Inferences | 01/01/70 00:00 | |
Right answer, wrong reason | 01/01/70 00:00 | |
and therefore | 01/01/70 00:00 | |
Congratulations | 01/01/70 00:00 | |
to: Raghu Sir![]() | 01/01/70 00:00 | |
BIts! | 01/01/70 00:00 |