Motorola MC68340 manual Variable-Width Single-Shot Pulse Generator

Models: MC68340

1 441
Download 441 pages 2.45 Kb
Page 354
Image 354

Freescale Semiconductor, Inc.

Freescale Semiconductor, Inc.

successive timeout causes the counter to be loaded alternately with the values from PREL1 and PREL2.

TOUTx behaves as a variable duty-cycle square wave when the CR OC bits are programmed for toggle mode. The second timeout occurs after N2 + 1 periods (allowing for the zero cycle), resulting in a change of state on TOUTx. The third timeout occurs after N1 + 1 periods, resulting in a change of state on TOUTx, and so on (see Figure 8-6). The OUT bit in the SR reflects the level of TOUTx.

COUNTER

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CLOCK

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

COUNTER

0

0

4

3

2

1

0

2

1

0

4

3

2

1

0

2

1

0

TOUT

 

 

N1: N1 + 1

 

 

 

 

 

N2 + 1

 

 

 

N1 + 1

 

 

N2 + 1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ENABLE

 

 

 

TIMEOUT

 

 

TIMEOUT

 

 

 

 

TIMEOUT

 

 

TIMEOUT

MODEx Bits in Control Register = 010

Preload 1 Register = N1 = 4

Preload 2 Register = N2 = 2

OCx Bits in Control Register = 01

Figure 8-6. Variable Duty-Cycle Square-Wave Generator Mode

If TGATEis negated when it is enabled (TGE = 1), the prescaler and counter are disabled. Additionally, the TG bit of the SR is set, indicating that TGATEwas negated. The ON bit of the SR is cleared, indicating that the timer is disabled. If TGATEis reasserted, the timer is re-enabled and begins counting from the value attained when TGATEwas negated. The ON bit is set again.

If TGATEis not enabled (TGE = 0), TGATEhas no effect on the operation of the timer. In this case, the counter would begin counting on the falling edge of the counter clock immediately after the SWR and CPE bits in the CR are set. The SR TG bit cannot be set. At all times, the TGL bit in the SR reflects the level of TGATE.

The duty cycle of the waveform generated on TOUTx can be dynamically changed by writing new values into PREL1 and/or PREL2. If PREL1 or PREL2 is being accessed simultaneously by the counter logic and a CPU32 write, the old preload value may actually get loaded into the counter at timeout. If at timeout, the counting logic was accessing PREL2 and the CPU32 was writing to PREL1 (or visa versa), there would be no unexpected results.

8.3.4 Variable-Width Single-Shot Pulse Generator

This mode is used to produce a one-time pulse that has a delay controlled by the value stored in PREL1 and a duration controlled by the value stored in PREL2. With TOUTx programmed to change state, this sequence creates a single pulse of variable width. This mode can be selected by programming the CR MODE bits to 011.

8- 10MC68340 USER’S MANUALMOTOROLA

For More Information On This Product,

Go to: www.freescale.com

Page 354
Image 354
Motorola MC68340 manual Variable-Width Single-Shot Pulse Generator, Variable Duty-Cycle Square-Wave Generator Mode

MC68340 specifications

The Motorola MC68340 is a highly integrated microprocessor that was introduced in the early 1990s. It belongs to the 68000 family of microprocessors and is designed to cater to the demands of embedded systems, particularly in telecommunications and networking applications. This chip represents a significant evolution in microprocessor technology by combining a microprocessor core with additional peripherals on a single chip, making it an attractive solution for engineers looking to design compact and efficient systems.

One of the key features of the MC68340 is its 32-bit architecture, which allows for significant processing power and data handling capabilities. This architecture enables the processor to handle larger data sizes and perform more complex calculations compared to its 16-bit predecessors. The MC68340 operates at clock speeds typically ranging from 16 MHz to 25 MHz. Its dual instruction pipeline enhances throughput, allowing for simultaneous instruction fetches and executions, which significantly boosts performance.

A notable characteristic of the MC68340 is the inclusion of integrated peripherals, which help reduce the overall component count in a system. Key integrated components include a memory management unit (MMU), a direct memory access (DMA) controller, and various communication interfaces such as serial ports. The memory management capabilities enhance the processor's ability to manage memory resources efficiently, enabling it to support multitasking environments commonly found in modern computing.

In terms of connectivity, the MC68340 features connections for both synchronous and asynchronous serial communication, making it well-suited for networking tasks. The processor supports a range of bus standards, including address and data buses, which facilitate seamless interaction with peripheral devices.

Another important aspect of the MC68340 is its flexibility. The processor supports multiple operating modes, including multiple CPU configurations and compatibility with the Motorola 68000 family, allowing for easier integration into existing systems.

Moreover, the MC68340 boasts low power consumption compared to many of its contemporaries, making it an excellent choice for battery-operated applications, enhancing its appeal in sectors like telecommunications, industrial control, and automotive systems. Its combination of performance, integration, versatility, and efficiency has secured the MC68340 a reputable position in the annals of embedded systems technology, proving to be a valuable asset for developers and engineers alike.