•
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
Содержание HT-IDE
Страница 11: ...P a r t I Integrated Development Environment Part I Integrated Development Environment 1 ...
Страница 12: ...HT IDE User s Guide 2 ...
Страница 20: ...Fig 1 6 Fig 1 7 HT IDE User s Guide 10 ...
Страница 24: ...HT IDE User s Guide 14 ...
Страница 70: ...HT IDE User s Guide 60 ...
Страница 76: ...HT IDE User s Guide 66 ...
Страница 92: ...HT IDE User s Guide 82 ...
Страница 93: ...P a r t I I Development Language and Tools Part II Development Language and Tools 83 ...
Страница 94: ...HT IDE User s Guide 84 ...
Страница 148: ...HT IDE User s Guide 138 ...
Страница 150: ...Fig 12 1 Fig 12 2 HT IDE User s Guide 140 ...
Страница 154: ...HT IDE User s Guide 144 ...
Страница 192: ...HT IDE User s Guide 182 ...
Страница 194: ...HT IDE User s Guide 184 ...
Страница 218: ...HT IDE User s Guide 208 ...
Страница 235: ...P a r t V Appendix Part V Appendix 225 ...
Страница 236: ...HT IDE User s Guide 226 ...
Страница 250: ...HT IDE User s Guide 240 ...