??? 10/25/06 05:31 Read: times |
#126968 - BCD=IncrementByAdding01HDecByAdding99H Responding to: ???'s previous message |
Hello Matt,
BCD variables can be incremented or decrement by adding 01H or 99H. If the Accumulator initially holds 30H (representing the digits of 30 decimal), then the following instruction sequence, ADD A, #99H DA A leaves the carry set and 29H in the Accumulator, since 30 + 99 = 129. The low - order byte of the sum can be interpreted to mean 30 - 1 = 29. Regards, Charles Bannister |
Topic | Author | Date |
AT89C51 countdown timer | 01/01/70 00:00 | |
I Think... | 01/01/70 00:00 | |
Decimal Counting down | 01/01/70 00:00 | |
if you post errors | 01/01/70 00:00 | |
it seems to be non-51 | 01/01/70 00:00 | |
aha | 01/01/70 00:00 | |
I screwed up | 01/01/70 00:00 | |
we just wanted to run down on somebody :-) | 01/01/70 00:00 | |
This group | 01/01/70 00:00 | |
BCD=IncrementByAdding01HDecByAdding99H | 01/01/70 00:00 | |
RTFB | 01/01/70 00:00 | |
Why count BCD down? | 01/01/70 00:00 | |
Why microcontroller? | 01/01/70 00:00 | |
The Appliction![]() | 01/01/70 00:00 | |
Why count BCD down? | 01/01/70 00:00 |