•
void clrPXi()
clear bit i of port X, i=0,1,2,3,4,5,6,7 and X=A,B,C,D,E,F,G
–
Example
clrPB7(); //clear bit 7 of port B
→
Set/Clear bits of port control register
•
void setPXC()
set port X control register, X=A,B,C,D,E,F,G
–
Example
setPDC(); //set port D control register
•
void setPXCi()
set bit i of port X control register, i=0,1,2,3,4,5,6,7 and X=A,B,C,D,E,F,G
–
Example
setPEC3(); //set bit 3 of port E control register
•
void clrPXC()
clear port X control register, X=A,B,C,D,E,F,G
•
vold ClrPXCi()
clear bit i of port X control register, i=0,1,2,3,4,5,6,7 and
X=A,B,C,D,E,F,G
–
Example
clrPAC0(); //clear bit 0 of port A control register
clrPCC4(); //clear bit 4 of port C control register
Reset and interrupts
The Holtek C language provides a means for implementing reset and
interrupts vectors through the preprocessor directive #pragma. The direc-
tive #pragma vector is used to declare the name and address of the reset
and other interrupt vectors. A function with the same name as the reset
vector becomes the reset routine, which is executed when the IC is powered
on or reset. Any function with the same name as the interrupt vector is the
interrupt service routine for the vector. The return statement within the
interrupt service routine generates a RETI instruction. An example of reset
and interrupt is shown as follows:
#pragma vector __RESET @ 0
×
0000
#pragma vector __INT @ 0
×
0004
void __RESET(void){
...
}
void __INT(void){
...
}
HT-IDE User’s Guide
110
Summary of Contents for HT-IDE
Page 11: ...P a r t I Integrated Development Environment Part I Integrated Development Environment 1 ...
Page 12: ...HT IDE User s Guide 2 ...
Page 20: ...Fig 1 6 Fig 1 7 HT IDE User s Guide 10 ...
Page 24: ...HT IDE User s Guide 14 ...
Page 70: ...HT IDE User s Guide 60 ...
Page 76: ...HT IDE User s Guide 66 ...
Page 92: ...HT IDE User s Guide 82 ...
Page 93: ...P a r t I I Development Language and Tools Part II Development Language and Tools 83 ...
Page 94: ...HT IDE User s Guide 84 ...
Page 148: ...HT IDE User s Guide 138 ...
Page 150: ...Fig 12 1 Fig 12 2 HT IDE User s Guide 140 ...
Page 154: ...HT IDE User s Guide 144 ...
Page 192: ...HT IDE User s Guide 182 ...
Page 194: ...HT IDE User s Guide 184 ...
Page 218: ...HT IDE User s Guide 208 ...
Page 235: ...P a r t V Appendix Part V Appendix 225 ...
Page 236: ...HT IDE User s Guide 226 ...
Page 250: ...HT IDE User s Guide 240 ...