Motorola MC68340 manual Square-Wave Generator Mode

Models: MC68340

1 441
Download 441 pages 2.45 Kb
Page 352
Image 352

Freescale Semiconductor, Inc.

Freescale Semiconductor, Inc.

Periodic interrupt generation can be accomplished by enabling the TO, TG, and/or TC bits in the SR to generate interrupts by programming the IE bits of the CR. When enabled, the programmed IRQsignal is asserted whenever the specified bits are set.

TOUTx signal transitions can be controlled by writing new values into the COM. Caution must be exercised when accessing the COM. If it were to be accessed simultaneously by the compare logic and by a write, the old compare value may actually get compared to the counter value.

8.3.2 Square-Wave Generator

This mode can be used for generating both square-wave output and periodic interrupts. The square wave is generated by counting down from the value in the PREL1 to timeout (counter value of $0000). TOUTx changes state on each timeout as programmed. This mode can be selected by programming the CR MODEx bits to 001.

The timer is enabled by setting the SWR and CPE bits in the CR and, if TGATEis programmed to control the enabling and disabling of the counter (TGE bit set in the CR), then asserting TGATE. When the timer is enabled, the ON bit in the SR is set. On the next falling edge of the counter clock, the counter is loaded with the value stored in the PREL1 (N). With each successive falling edge of the counter clock, the counter decrements. The time between enabling the timer and the first timeout can range from N to N + 1 periods. When TGATEis used to enable the timer, the enabling of the timer is asynchronous; however, if timing is carefully considered, the time to the first timeout can be known. For additional details on timing, see Section 11 Electrical Characteristics.

TOUTx behaves as a square wave when the OCx bits of the CR are programmed for toggle mode. A timeout occurs every N + 1 periods (allowing for the zero cycle), resulting in a change of state on TOUTx (see Figure 8-5). The SR OUT bit reflects the level of TOUTx. If this mode is used to generate periodic interrupts, TOUTx may be enabled if a square wave is also desired.

COUNTER

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CLOCK

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

COUNTER

0

0

3

2

1

0

3

2

1

0

3

2

1

0

3

TOUT

 

 

N: N + 1

 

 

 

 

N + 1

 

 

 

N + 1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ENABLE

 

 

TIMEOUT

 

 

 

TIMEOUT

 

 

 

TIMEOUT

 

MODEx Bits in Control Register = 001

Preload 1 Register = N = 3

OCx Bits in Control Register = 01

Figure 8-5. Square-Wave Generator Mode

If TGATEis negated when it is enabled to control the timer (TGE = 1), the prescaler and counter are disabled. Additionally, the SR TG bit is set, indicating that TGATEwas negated. The SR ON bit is cleared, indicating that the timer is disabled. If TGATEis

8- 8MC68340 USER’S MANUALMOTOROLA

For More Information On This Product,

Go to: www.freescale.com

Page 352
Image 352
Motorola MC68340 manual 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.