??? 02/28/06 09:47 Read: times |
#110908 - The main question Responding to: ???'s previous message |
The main question was, is keyID a variable at run time or a constant at compile time ?
If keyID was constant, you can use a macro, which expand it to a single bit test instruction only. Otherwiese you need some computing, e.g. divide the value keyID into the port number (P0..P3) and a bit mask value (0x01..0x80). But using tons of switch statements was not very effective. Peter |
Topic | Author | Date |
question on keil C sbit access | 01/01/70 00:00 | |
What are you trying to do? | 01/01/70 00:00 | |
Try or doing | 01/01/70 00:00 | |
sbit access | 01/01/70 00:00 | |
The 8051 does not have indirect bits | 01/01/70 00:00 | |
send me keilc code for keypad | 01/01/70 00:00 | |
Yes sir! Right away sir! | 01/01/70 00:00 | |
How about Fries? | 01/01/70 00:00 | |
please tell more | 01/01/70 00:00 | |
Buttons library | 01/01/70 00:00 | |
how to post code | 01/01/70 00:00 | |
The main question![]() | 01/01/70 00:00 |