Chapter 3
Microcomputer Basics 1
asm (" | nop\n"); |
| |
asm (" | nop\n"); |
| |
TM1MD | = TM1MD 0x80; | /* Start the counter */ | |
while(1){ |
|
| |
} |
|
|
|
} |
|
|
|
|
| ||
*/ | |||
void initialize(void) |
|
| |
{ |
|
|
|
asm (" | and | 0xF0FF,PSW\n"); | /* Disable all maskable interrupts */ |
asm (" | nop\n"); |
| |
asm (" | nop\n"); |
| |
CPUM | = 0x0000; |
| /* Set normal mode */ |
} |
|
|
|
|
| ||
*/ | |||
void int_timer1(void) |
|
| |
{ |
|
|
|
if(P4OUT & 0x10){ |
|
| |
P4OUT = 0x00; |
| /* Set P44 Low(VSS level) */ | |
} |
|
|
|
else{ |
|
|
|
P4OUT = 0x10; |
| /* Set P44 High(VDD level) */ | |
} |
|
|
|
} |
|
|
|
III−43 |