Diamond Quartz-MM-10 Counter PWM & ARM

Quartz-MM-10 Counter PWM & ARM block (not recommended)


Simulink® Real-Time™ Library of Drivers No Longer Recommended for Use


The Quartz-MM 10 has two AM9513A chips with five counters.

The Quartz-MM 10 PWM & ARM driver programs the AM9513A for PWM or disarmed signal generation (a square wave with fixed frequency and variable duty cycle). Additionally the driver allows you to arm and disarm the counter by using the second block input. For the corresponding counter channel, the PWM signal is output at the pin named OUT.

Scaling Input to Output

Hardware Output

Block Input Data Type



Duty cycle: Double
Arm: Double

0 to 1
<0.5 disarmed
≥0.5 armed

Block Parameters


From the list, choose 1, 2, 3, 4, or 5 to select which counter is used with this driver block. One block is required for each counter used.

Frequency base

From the list, choose F1=4MHz, F2=400kHz, F3=40kHz, F4=4kHz, or F5=400Hz to set the base frequency.

Relative output frequency

Enter a value between 0 and 0.25. The Relative output frequency is multiplied by the Frequency base to set the fixed output frequency of the PWM signal.

For example, if the output frequency of a square wave must be 17.5 kHz, then choose F2=400kHz as the Frequency base and enter 0.04375 as the Relative output frequency. 400 kHz x 0.04375 = 17.5 kHz

Level sequence of square wave

From the list, choose either high-low or low-high:

  • If you choose high-low, the square wave period starts with the TTL high part followed by the TTL low part.

  • If you choose low-high, the square wave period starts with the TTL low part followed by the TTL high part.

In either case, the duty cycle entering the block defines the duration of the TTL high part.

Level when disarmed

From the list, choose either high or low. The counter is automatically disarmed when the real-time application is not running. If the application is running, the second input port controls whether the counter is armed or disarmed. This parameter sets the TTL level when the counter is disarmed.

Sample time

Enter the base sample time or a multiple of the base sample time. The sample time indicates the update rate of registration on the input (duty cycle)

Base address

Enter the base address of the board. This entry must correspond to the DIP switch setting on the board. For example, if the DIP switch setting is 300 (hexadecimal), enter 0x300.

Was this topic helpful?