Configure the selected timer.
| Function | Processor |
| OpenTimer0 | All supported processors that have Timer 0 |
| OpenTimer1 | All supported processors that have Timer 1 |
| OpenTimer2 | All supported processors that have Timer 2 |
| OpenTimer3 | 18F1220 18F1320 |
| OpenTimer3 | 18C601 18C801 18F2220 18F2320 18F2420 18F4320 18F2221 18F2321 18F4221 18F4321 18F2410 18F2510 18F2515 18F2610 18F4410 18F4510 18F4515 18F4610 18F2423 18F2523 18F4423 18F4523 18F2455 18F2550 18F4455 18F4550 18F2480 18F2580 18F4480 18F4580 18F2420 18F2520 18F4420 18F4520 18F2525 18F2620 18F4525 18F4620 18F2682 18F2685 18F4682 18F4685 18F6390 18F6490 18F8390 18F8490 18F6585 18F8585 18F6680 18F8680 |
| OpenTimer3 | PIC18F6520 PIC18F8520 PIC18F6620 PIC18F8620 PIC18F6720 PIC18F8720 PIC18F6527 PIC18F6622 PIC18F6627 PIC18F6722 PIC18F8527 PIC18F8622 PIC18F8627 PIC18F8722 PIC18F65J10 PIC18F65J15 PIC18F66J10 PIC18F66J15 PIC18F67J10 PIC18F85J10 PIC18F85J15 PIC18F86J10 PIC18F86J15 PIC18F87J10 PIC18F66J60 PIC18F66J65 PIC18F67J60 PIC18F86J60 PIC18F86J65 PIC18F87J60 PIC18F96J60 PIC18F96J65 PIC18F97J60 PIC18F66J11 PIC18F66J16 PIC18F67J11 PIC18F86J11 PIC18F86J16 PIC18F87J11 |
| OpenTimer3 | 18F6310 18F6410 18F8310 18F8410 |
| OpenTimer4 | All supported processors that have Timer 4 |
| OpenTimer5 | All supported processors that have Timer 5 |
Also See: CloseTimer StartTimer StartTimerInterrupt StopTimer StopTimerInterrupt
| Requirements: | <libs/timers.bas> | ||||||||||
| Syntax: | OpenTimer0(config as uByte, intConfig as uByte) | ||||||||||
| Processors Valid For: | All supported processors | ||||||||||
| config Constants: |
|
||||||||||
| intConfig Constants: |
|
||||||||||
| Example: | Open Timer 0 as an 8 bit timer with an internal clock
source, a prescaler selection of 1:1, and the high priority interrupt
enabledOpenTimer0(T0_8BIT + T0_CLK_INTERNAL + T0_PS_1_1,T0_INT_HIGH) |
| Requirements: | <libs/timers.bas> | ||||||||||||
| Syntax: | OpenTimer1(config as uByte, intConfig as uByte) | ||||||||||||
| Processors Valid For: | All supported processors | ||||||||||||
| config Constants: |
|
||||||||||||
| intConfig Constants: |
|
||||||||||||
| Example: | Open Timer 1 with 16 bit R/W, internal clock source, a
prescaler selection of 1:1, and the high priority interrupt enabledOpenTimer1(T1_16BIT_RW + T1_PS_1_1 + T1_INT_CLK ,T1_INT_HIGH) |
| Requirements: | <libs/timers.bas> | ||||||
| Syntax: | OpenTimer2(config as uByte, intConfig as uByte) | ||||||
| Processors Valid For: | All supported processors | ||||||
| config Constants: |
|
||||||
| intConfig Constants: |
|
||||||
| Example: | Open Timer 2 with a prescaler of 1:1, a postscaler of
1:3, and a low priority interrupt.OpenTimer2(T2_POSTSCALE_1_3 + T2_PRESCALE_1_1 ,T1_INT_LOW) |
| Requirements: | <libs/timers.bas> | ||||||||||||
| Syntax: | OpenTimer3(config as uByte, intConfig as uByte) | ||||||||||||
| Processors Valid For: | 18F1220 18F1320 | ||||||||||||
| config Constants: |
|
||||||||||||
| intConfig Constants: |
|
||||||||||||
| Example: | Open Timer 3 with 16 bit R/W, internal clock source, a
prescaler selection of 1:1, and the high priority interrupt enabledOpenTimer1(T3_16BIT_RW + T3_PS_1_1 + T3_INT_CLK ,T3_INT_HIGH) |
| Requirements: | <libs/timers.bas> | ||||||||||||
| Syntax: | OpenTimer3(config as uByte, intConfig as uByte) | ||||||||||||
| Processors Valid For: | 18C601 18C801 18F2220 18F2320 18F2420 18F4320 18F2221 18F2321 18F4221 18F4321 18F2410 18F2510 18F2515 18F2610 18F4410 18F4510 18F4515 18F4610 18F2423 18F2523 18F4423 18F4523 18F2455 18F2550 18F4455 18F4550 18F2480 18F2580 18F4480 18F4580 18F2420 18F2520 18F4420 18F4520 18F2525 18F2620 18F4525 18F4620 18F2682 18F2685 18F4682 18F4685 18F6390 18F6490 18F8390 18F8490 18F6585 18F8585 18F6680 18F8680 | ||||||||||||
| config Constants: |
|
||||||||||||
| intConfig Constants: |
|
||||||||||||
| Example: | Open Timer 3 with 16 bit R/W, internal clock source, a
prescaler selection of 1:1, and the high priority interrupt enabledOpenTimer1(T3_16BIT_RW + T3_PS_1_1 + T3_INT_CLK ,T3_INT_HIGH) |
| Requirements: | <libs/timers.bas> | ||||||||||||
| Syntax: | OpenTimer3(config as uByte, intConfig as uByte) | ||||||||||||
| Processors Valid For: | PIC18F6520 PIC18F8520 PIC18F6620 PIC18F8620 PIC18F6720 PIC18F8720 PIC18F6527 PIC18F6622 PIC18F6627 PIC18F6722 PIC18F8527 PIC18F8622 PIC18F8627 PIC18F8722 PIC18F65J10 PIC18F65J15 PIC18F66J10 PIC18F66J15 PIC18F67J10 PIC18F85J10 PIC18F85J15 PIC18F86J10 PIC18F86J15 PIC18F87J10 PIC18F66J60 PIC18F66J65 PIC18F67J60 PIC18F86J60 PIC18F86J65 PIC18F87J60 PIC18F96J60 PIC18F96J65 PIC18F97J60 PIC18F66J11 PIC18F66J16 PIC18F67J11 PIC18F86J11 PIC18F86J16 PIC18F87J11 | ||||||||||||
| config Constants: |
|
||||||||||||
| intConfig Constants: |
|
||||||||||||
| Example: | Open Timer 3 with 16 bit R/W, internal clock source, a
prescaler selection of 1:1, and the high priority interrupt enabledOpenTimer1(T3_16BIT_RW + T3_PS_1_1 + T3_INT_CLK ,T3_INT_HIGH) |
| Requirements: | <libs/timers.bas> | ||||||||||||
| Syntax: | OpenTimer3(config as uByte, intConfig as uByte) | ||||||||||||
| Processors Valid For: | 18F6310 18F6410 18F8310 18F8410 | ||||||||||||
| config Constants: |
|
||||||||||||
| intConfig Constants: |
|
||||||||||||
| Example: | Open Timer 3 with 16 bit R/W, internal clock source, a
prescaler selection of 1:1, and the high priority interrupt enabledOpenTimer1(T3_16BIT_RW + T3_PS_1_1 + T3_INT_CLK ,T3_INT_HIGH) |
| Requirements: | <libs/timers.bas> | ||||||
| Syntax: | OpenTimer4(config as uByte, intConfig as uByte) | ||||||
| Processors Valid For: | 18F66J10 18F65J15 18F6520 18F66J10 18F66J11 18F66J15 18F66J16 18F6527 18F66J10 18F66J15 18F6620 18F6622 18F66J60 18F66J60 18F6627 18F67J10 18F67J11 18F67J60 18F6720 18F6722 18F85J10 18F85J15 18F8520 18F8527 18F86J10 18F86J11 18F86J15 18F86J16 18F8620 18F86J60 18F86J65 18F8622 18F8627 18F87J10 18F87J11 18F87J60 18F8720 18F8722 18F96J60 18F96J65 18F97J60 | ||||||
| config Constants: |
|
||||||
| intConfig Constants: |
|
||||||
| Example: | Open Timer 4 with a prescaler of 1:1, a postscaler of
1:3, and a low priority interrupt.OpenTimer4(T4_POSTSCALE_1_3 + T4_PRESCALE_1_1 ,T4_INT_LOW) |
| Requirements: | <libs/timers.bas> | ||||||||||||||
| Syntax: | OpenTimer5(config as uByte, intConfig as uByte) | ||||||||||||||
| Processors Valid For: | 18F2331 18F2431 18F4331 18F4431 | ||||||||||||||
| config Constants: |
|
||||||||||||||
| intConfig Constants: |
|
||||||||||||||
| Example: | Open Timer 5 with no special event, disabled during
sleep, 1:1 prescale, continuous running, internal oscillator, initial
state of on, and no interrupts.OpenTimer5(T5_SPECIAL_EVENT_DIS + T5_SLEEP_DISABLED + T5_CONTINUOUS + _
T5_PRESCALE_1_1 + T5_INT_CLK + T5_ON, T5_INT_OFF)
|