ABL electronic PIC12 Personal Computer User Manual


 
mikroC
- C Compiler for Microchip PIC microcontrollers
mikroC
making it simple...
27 8
MikroElektronika:
Development
tools
-
Books
-
Compilers
page
// Timer 0
T0CON = 0x07;
TMR0H = (65536-156) >> 8;
TMR0L = (65536-156) & 0xFF;
INTCON.T0IE = 1;
// Enable T0IE
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();
}
//~!