01.06.2013 Views

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

default is a 50% duty cycle waveform (Change waveform with HAL function 0x8B).<br />

Note that TMRIN pin and TMROUT pin can not be used at the same time.<br />

If the clock divider value is set to 0000h, the timer will count from 0000h to FFFFh (maximum divider).<br />

When the timer reaches the clock divider value, it resets to 0 during the same clock cycle. The timer<br />

count never dwells equals to the clock divider value (except for special case when divider value is set to<br />

0000h).<br />

When the timer is configured to run in single time mode, the timer clears the count and then halts on<br />

reaching the maximum count (clock divider value).<br />

If the timer interrupt is enabled, the interrupt request is generated when the count equals the clock divider<br />

value. Use HAL function 0x84 to install your interrupt service routine.<br />

If "use internal clock" is selected the associated TMRIN pin serves as a gate. A "high" on the TMRIN pin<br />

keeps the timer counting. A "low" holds the timer value.<br />

Related Topics<br />

Initialize Timer Settings Ext<br />

HAL Start Timer function<br />

Read Timer Count<br />

Write Timer Count<br />

Developer Notes<br />

The timer output frequency is dependent on the internal processor clock.<br />

For compatibility with future versions of @Chip, please use the HAL function 0x8A, "Get frequencies", to<br />

compute the correct clock divider value.<br />

Available examples<br />

1. TimerIn example, timerin.c<br />

2. TimerOut example, timerout.c<br />

Top of list<br />

Index page<br />

Interrupt 0xA1 service 0x86: HAL: Start Timer<br />

Parameters<br />

AH<br />

AL<br />

Enable the specified timer to count.<br />

Must be 0x86.<br />

Timer<br />

0=Timer0 / 1=Timer1<br />

Return Value<br />

Page 298 / 400

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!