mikroElektronika PIC Microcontrollers PIC12 User Manual page 286

Mikroc user's manual
Table of Contents

Advertisement

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...

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the PIC Microcontrollers PIC12 and is the answer not in the manual?

This manual is also suitable for:

Pic microcontrollers pic16Pic microcontrollers pic18

Table of Contents