| ??? 09/20/02 10:30 Read: times |
#29428 - RE: PCON.7 and SMOD ?? |
The previous answers show how to do it in C and assembler.
I only add a short explanation. You cannot use setb PCON.7 directly because PCON is not bit addressable. Therefore the SMOD bit CANNOT be defined as a bit address: SMOD bit ... and you have to use logical instructions (anl, orl) with the suitable mask to modify the desired bit. Assigning a symbol to the mask, your code will be more legible. SET_SMOD equ 80h ; or mask CLR_SMOD equ 7Fh ; and mask orl PCON,#SET_SMOD ; set SMOD to '1' anl PCON,#CLR_SMOD ; clear SMOD Regards, Alfredo del Rio. |
| Topic | Author | Date |
| PCON.7 and SMOD ?? | 01/01/70 00:00 | |
| RE: PCON.7 and SMOD ?? | 01/01/70 00:00 | |
| RE: PCON.7 and SMOD ?? | 01/01/70 00:00 | |
| RE: PCON.7 and SMOD ?? | 01/01/70 00:00 | |
| RE: PCON.7 and SMOD ?? | 01/01/70 00:00 | |
| RE: In addition to what Alfredo said... | 01/01/70 00:00 | |
| RE: PCON.7 and SMOD ?? | 01/01/70 00:00 | |
RE: In addition to what alen said... | 01/01/70 00:00 |



