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.

DX<br />

CX<br />

Which Timer<br />

0=Timer0 / 1=Timer 1<br />

Mode<br />

0=disable duty cycle / 1=enable duty cycle<br />

Alternate clock divider (if DX = 1)<br />

Return Value<br />

none<br />

Comments<br />

Use this function to modify the timer waveform behavior. For example a 50% duty cycle waveform can<br />

be generated by specifying here an alternate clock divider value in CX that is the same value as was<br />

used for the main clock divider value set in the Timer Initialization function call.<br />

Please note that the timer frequency will change if you use this function. If you disable the duty cycle,<br />

the timer output will no longer generate a rectangle signal. When duty cycle mode is disabled, the<br />

TMROUT pin switches low for only one clock cycle after the maximum count is reached. If you want an<br />

alternate duty cycle waveform, compute it with the following formula:<br />

Output frequency = Timer base frequency * 2<br />

/ (divider high level + divider low level)<br />

The divider high level is the divider set by the Timer Initialization function. The divider low<br />

level is the alternate clock divider passed to this function in the CX register.<br />

Related Topics<br />

Top of list<br />

Index page<br />

HAL Initialize Timer Settings<br />

Interrupt 0xA1 service 0x8C: HAL: Read Specific I/O Pin<br />

Parameters<br />

AH<br />

AL<br />

Read specified programmable I/O pin.<br />

Must be 0x8C.<br />

<strong>IPC<strong>@CHIP</strong></strong> PIO No. [0..13]<br />

Return Value<br />

AX=0 PIO pin is low, AX!=0 PIO pin is high<br />

Page 302 / 400

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

Saved successfully!

Ooh no, something went wrong!