mikroC - C Compiler for Microchip PIC microcontrollers
// Timer 0
T0CON
= 0x07;
TMR0H
= (65536-156) >> 8;
TMR0L
= (65536-156) & 0xFF;
INTCON.T0IE = 1;
T0CON.TMR0ON = 1;
} //~
/** Main Program Routine **/
void main() {
Init_Main();
Hid_Enable(&userRD_buffer, &userWR_buffer);
do {
for (k = 0; k < 255; k++) {
// Prepare send buffer
userWR_buffer[0] = k;
// Send the number via USB
Hid_Write(&userWR_buffer, 1);
}
} while (1);
Hid_Disable();
} //~!
page
278
// Enable T0IE
MikroElektronika: Development tools - Books - Compilers
mikroC
making it simple...
Need help?
Do you have a question about the PIC Microcontrollers PIC12 and is the answer not in the manual?