Freescale Semiconductor, Inc.

Semiconductor Products Sector Application Note

An HC11-Controlled Multiband RDS Radio

By Peter Topping Motorola, Ltd.

East Kilbride, Scotland

Order this document by AN494/D Rev. 1

AN494

Introduction

This application note describes the software and hardware features of the microcontroller (MCU) of a synthesized multiband radio which includes RDS (radio data system) decoding (FM, band II). It uses an MC68HC(7)11 MCU whose program can be on-chip or contained in an external EPROM (erasable programmable read-only memory). ROM versions are available.

Both LCD (liquid crystal display) and VFD (vacuum fluorescent display) 16-character dot matrix display modules can be used to display RDS and tuning information. Traffic messages, initiated by the reception of EON (enhanced other networks) data (group 14B) or TA = TP = 1 (traffic announcement = traffic program = 1) on the current frequency, are handled. The station carrying the TA is tuned for the duration of the message, followed by a return to the original frequency. A tuning knob employing an incremental encoder is supported.

Figure 1 shows a block diagram of the application. The controller hardware and software are described in detail here. The other hardware is not covered to the same depth, because that varies between different implementations, the intention being to describe a controller which could

For More Information On This Product, Go to: www.freescale.com

© Motorola, Inc., 2001

Freescale Semiconductor, Inc...

Application Note

Freescale Semiconductor, Inc.

be added to an existing radio or to one which includes only one or two of the possible bands.

Separate FM and AM PLLs (phase-locked loop) are shown. This is not essential, but it reduces the amount of band switching necessary and simplifies hardware fault finding. The illustrated configuration corresponds to that used by the author for software development and debugging.

4 BBC4 FM 21:40

IRQ

M68HC11 XIRQ

RDS DEMOLATOR

C D

MC 145170

÷5

FM TUNER

INCREMENTAL ENCODER

MC 145157

BRAND SELECT

STANDBY

AM TUNER

SW MEM. SELECT

MUTE

FM IF SELECT

TA=TP=1

DISPLAY SELECT

LCD MUX

M/S

IRQ CONTROL

RDS

7

4

1

0

:

MC 14028

TA

SL

8

5

2

9/10

9

6

3

TA TEST

+

AL

S/S

MODE

CL ST

2

AN494 MOTOROLA

ONOFF

Figure 1. Main Block Diagram

The MCU used is the MC68HC(7)11. The MC68HC711K4 (K4) [and similar chips such as the MC68HC711P2 (P2) and MC68HC711PH8 (PH8)] can be used in expanded mode, but this application has been included in the ROM of an E32 and a PH8.

To use the ROMed parts in this application, the first three bytes of EEPROM (electrically erasable programmable ROM) should contain an extended jump to the appropriate start address. The E32 (ZC403311) requires $7E, $90, and $00 at addresses $B600, $B601, and $B602, while the PH8 (ZC428200 or ZC428202) requires $7E, $40, and $00 at

For More Information On This Product, Go to: www.freescale.com

STEREO & AUDIO

Freescale Semiconductor, Inc...

AN494 MOTOROLA

3

Freescale Semiconductor, Inc.

Application Note Introduction

addresses $0D00, $0D01, and $0D02. This can be done using either PCbug11 or the BUFFALO (bit users fast friendly aid to logical operation) monitor (see reference 5). The E32 version uses all the input/output (I/O) and can, therefore, be used only in single-chip mode. The circuit diagram of the HC11E controller is shown in Figure 3 and the circuit diagram of the K4/PH8 in Figure 4. The K4/PH8 version shows the additional hardware (within the dotted line) used to develop and debug the software on a K4 using PCbug11. This implementation uses two of the K4’s chip selects to enable external memories allowing debug to be done with the code in RAM and the PCbug11 talker in an EPROM. This arrangement requires a further four I/O (input/output) lines, leaving 30 for use in the application. The description of the application, and the listed software, corresponds to the E32 ROMed version (ZC403311). Later sections list the port allocation and functional differences which apply to the PH8 ROMed versions (ZC428200 and ZC428202).

Forty programs (10 on FM, 10 on MW and 20 on SW) can be stored using the HC11E’s on-chip EEPROM (the PH8 has 20 additional SW (shortwave) programs). Each contains frequency, an 8-character name [PS (program service) name on a station with RDS] and, on FM only, PI (program identification) code and a TA inhibit bit. For stations with no RDS (for example, all AM stations), the saved name can be manually entered. Programs saved with no name use their frequency instead. The SW banks are selected by an I/O line (two for the PH8). When the MCU is reset, or any of the band or memory select inputs are changed, the last used program in the selected band is tuned. This feature does not require that the MCU is permanently powered up, as this information is also stored in non-volatile EEPROM.

The keyboard uses an MC14028 decoder to minimize the number of I/O lines used. Either LCD or VFD 16-digit dot matrix displays can be used. The VFD display driver supported is the MSC7128, and the LCD driver the HD44780. This driver on its own provides a 16-way multiplexed LCD. In conjunction with an HD44100, it can facilitate an 8-way multiplexed higher contrast display. The input level on a port pin selects the appropriate type of multiplexing to match the display in use. To minimize the I/O activity, only one display is driven, the choice between LCD and VFD again being determined by an I/O line.

For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor, Inc...

Freescale Semiconductor, Inc.

Application Note

4

AN494 MOTOROLA

MC145170 and MC145157 PLLs are supported, using the same data and clock lines as the VFD driver, along with dedicated chip selects. The MC145157 requires an external prescaler for frequencies above 20 MHz, but the MC145170 has an on-chip 160-MHz capability.

A tuning knob can be included by using an incremental encoder. This can utilize either IRQ or XIRQ. As IRQ is used for the RDS clock, XIRQ is most appropriate for the tuning function. The possibility of using IRQ (see information described later) has been included to facilitate debug with PCbug11, which can employ XIRQ for its communication with the PC. Edges detected on the encoder execute the PS edit and alarm setup functions of the +/– (plus/minus) keys, depending on the direction of rotation. This provides a quick and convenient method of editing the PS name and changing the alarm time. A difference in function between the encoder and the +/– keys applies in normal mode. The program number is not affected by the tuning knob. In this mode, when the +/– keys control the program number, the tuning knob increments or decrements the frequency.

Two I/O lines are used to select the band. These lines are regularly monitored; if they change, the radio is retuned to the last used station in the selected band. Table 1 shows the bands which are available.

Band 2 is intended for single-conversion (low IF, intermediate frequency) MW or SW radios. The large step size of 9 or 10 kHz is suitable for MW rather than SW, but the small step size of 1 kHz is suitable for either SW or MW.

Band 3 is for dual-conversion (10.7-MHz first IF) SW designs. The FM IF offset is selected as + or –, according to the level on port A, bit 2 (high: LO high; low: LO low).

Bands 0 and 1 both are intended for VHF/FM, the difference between them being in the use of the M68HC11’s IRQ pin. It is possible to use IRQ interrupts for both RDS and the tuning knob, as the two functions are not required simultaneously. To facilitate this, the band-select inputs affect the function performed when an edge is detected in the IRQ pin. When band 0 is selected, an RDS bit is read, but in any other band the incremental encoder function is performed. This enables automatic selection of function if bit 0

For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor, Inc...

Freescale Semiconductor, Inc.

Application Note Introduction

on port A is taken high when movement is detected from the shaft encoder. This facility can be disabled (RDS function only) by holding bit 3 of port A low. This should be done if XIRQ is being used for the tuning knob. As XIRQ is level-sensitive, some additional components are required to interface it with the incremental encoder. Figure 2 shows a simple circuit which can be used for this purpose.

Table 1. Available Bands

Band

PA1

PA0

IF Offset

Step

Memory

Use

Prescaler MC145157 Only

0

0

0

+/–10,700

50, 10

10

VHF

10

1

0

1

+/–10,700

50, 10

10

VHF

10

2

1

0

455

9 (or 10), 1

10

MW/SW

3

1

1

10,700

5

20/40

SW

5

5V

1M

Figure 2. Incremental Encoder Interface Circuit

10 kΩ x 2

1 n x2

1N914

100 kΩ

INCREMENTAL ENCODER

1N914

E5

XIRQ 1

H C 1

100 n

AN494 MOTOROLA

5

For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor, Inc...

Freescale Semiconductor, Inc.

Application Note

6

AN494 MOTOROLA

For More Information On This Product, Go to: www.freescale.com

: 7 4 1 0

SL–+ 67

1 Q5 Q6 16

5V

RDS DEMODULATOR

RDS TA 9/10

TA TEST

MC68HC11E32 52-PIN PLCC (56-PIN SDIP)

5 V

8 9 AL Q4+ 5V 15 M

A2

33(36)

+10.7

(FM IF)

2 M

10 kΩ

x3 2652

373635

(40) (39) (38) 9

424140 (45) (44) (43)

C3 1

(29) (27) (55) VDDVRH

16

4 0

B5B6B7 C

B0B1B2 38(41)

B4 MC145170

64

17 RESET 3 MOD A 2 MODB

B1 41(44) B0 42(45)

3

Freescale Semiconductor, Inc...

INCREMENTAL ENCODER

18 XIRQ 44(47) E4

5 6 S/S Q3CC 12 24(25) D4 232 Q214 13 23(24)

–10.7

MODEST ON

CL OFF

8 A 10 22(23) D2 D

10 kΩ x4

TA = TP = 1

14Q102 B D3

A7

27(30)

+16

+8 (LCD MUX)

118

E7

50(53)

LCD (DISP. SEL.) VFD

19 IRQ 46(49) E5

B3

39(42)

MC145157

31(34) A3

A4 D5

30(33) 25(26)

MUTE STANDBY

49(52) E3 47(50) E2 45(48) E1 43(46) E0

–VSS

VRL EXTAL XTAL

E6

A1

A0

A6 A5

(21) 1 (56) 51 (54)

48

0.1 μ

10μRSR/W E D0D71 4 5 6 7 14

~ 5 V –HT Vf

7 10 M 8

33 (51) (36)

34 (37)

28 29 5 V (31) (32)

2 + VLCD + LCDMODULE

3

10 kΩ

CD VFD MODULE E

33p 33p

8.388 MHz

BAND & MEM

100 kΩ x3

Figure 3. MC68HC11E32 Circuit

M/S

Freescale Semiconductor, Inc.

Application Note Introduction

AN494 MOTOROLA

7

For More Information On This Product, Go to: www.freescale.com

RS 232 (25-WAY)

15 4 5 6 S/S

Q3

M1276 C1C

21 7 A10 C

123 2

D4 D3 D2

24 A9 25 A8 3 A7

64

A9 A8 A7 A0

0 MODE CL

OFF

81074

A0–A7

A0

ST ON 14

Q1

5 V

2 +

RSR/W ED0D7–1

VFD MODULE ~

TA TEST

MC68HC11K4 (PH8)

C A 1 3 M6

RDS TA

SL — + 6 7

84-PIN PLCC

2 A12 23 A11

26 2 23 21 24 25 3

A12 0 A11 2

1 7 8 9 AL

Q5 Q4

Q+6 16

5V

2

5 A10 6

2

M x4

10μ 4 5 6 7 14

5V –HT Vf

C3

1

31 30 29 1

78

12 13 14 H0H1H2

18

4 0 6 4

69 –VDD– VRH (70) RESET

G2 G3 G4 A

H6 16 H4

PLLs (5157 / 5170

(20) MODB 370

G0 33 D5 77

MUTE STANDBY

RDS 54 DEMODULATOR 37

IRQ

17(–) CSGP1H5 26(–)

20 27 1

28 +

21 INCREMENTAL 38

XIRQ

R/WG7 32(–) XA14 G1

ENCODER

15

E4 A3

5V 20

28 27 1

+ PGM VPP

10 kΩ x4

(PH8 ONLY)

5 V

(-) (-)

(-)

22 μF x 4

kΩ kΩ + + + +

Q2

41376 02B

DA

53 (-) 55 (-)

10 19

10

11 8

D7 D0

19

D7

Freescale Semiconductor, Inc...

10

0.1μ

+

kΩ

2 23 34 64 44

71 MODA

H1 13 H0 12

39 40

E3 E2

DATA C

D0

E5

CE R/W A14

41E1–V – V EXTALXTAL A7

14 22

42E0 SS

3 24 45 63 43

RL

E7E6G8G5

D0D1XIRQ 72 73 21

5V

67 68(66) 78 10 M

35 36 27 28

33 p

100 kΩ x4

33 p

8.388 MHz

11 VCC VDD C1- C1+C2- C2+VSS GND 10 2

LCD MODULE

100 kΩ

10 10

19 1718 203 14 21315

7

BAND&MEM

12I3 MC145407 T39 3 O3 R3

Figure 4. MC68HC11K4 and PH8 Circuit

3 10 VLCD kΩ

C D E

CSPROG H7 A13 B5 A12 B4 A11 B3 A10 B2 A9 B1 A8 B0

19 (-) 6 (-) 7 (-) 8 (-) 9 (-) 10 (-) 11 (-) 46 (-)

CE 26 NC

M

62 (-)

11OE 11 14 22

OE

5 V

Freescale Semiconductor, Inc.

Application Note

Frequency Synthesis

8

AN494 MOTOROLA

Synthesis of the local oscillator (LO) in a superheterodyne radio provides many advantages over mechanical tuning. The main benefits are:

• Tuning accuracy

• Stability

• Storing of often-used frequencies.

The accuracy and stability result from the fact that the LO is phase- locked to a crystal oscillator. In conjunction with RDS, frequency synthesis provides the additional facility of allowing the radio to retune itself to a traffic announcement or news bulletin. A synthesizer can be retrofitted to most radios by replacing the tuning capacitor with a varicap diode. The voltage biasing the varicap is supplied by the synthesizer and also can be used to provide RF (radio frequency) tuning. Alternatively, manual preselector or no RF tuning can be employed.

Motorola’s MC145157 and MC145170 synthesizers are two of a series offering a variety of options including serial or parallel interfacing and single or dual modulus prescaling. The MC145157 requires a prescaler for frequencies above 20 MHz but the MC145170 can handle input frequencies up to 160 MHz. The MC145157 has been included to retain compatibility with hardware developed for use with the MC68HC05B4 synthesizer described in ANE416 (reference 1).

Figure 5 shows the block diagram of the MC145170. It uses the Motorola bitgrabber system, whereby the number of bits sent determines the register which is written to. There is, therefore, no need for the control bit which is required by the MC145157.

For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor, Inc...

1 OSCOut 2

REFOut 3

CLOCK 7 DATA IN 5

DATA OUT 8 ENABLE 6

f 4 INPUT In AMP

Application Note Frequency Synthesis

9 fR

OSCIn

Freescale Semiconductor, Inc.

15

3

11

LD

13

PDOut

14 15

16

15-STAGE R COUNTER

SHIFT REGISTER AND CONTROL LOGIC

BITGRABBER C REG

8 BITS

PHRASE/FREQUENCY DETECTOR A & CONTROL

16-STAGE N COUNTER

AN494 MOTOROLA

The MC145157 is specified to operate up to 20 MHz, so prescaling is required on FM and SW (10.7-MHz IF). For this SW band, divide-by-5

For More Information On This Product, Go to: www.freescale.com

9

OSC

4-STAGE REFERENCE DIVIDER

The reference counter divides the 8-MHz crystal oscillator (10 MHz for the MC145157) down to the reference frequency (in this case, 1 kHz for the MC145157 and 10 kHz for the MC145170) at which the comparison is made with the (also divided down) local oscillator. The filtered output of the phase comparator supplies the tuning voltage to the local oscillator. The numbers chosen as the divide ratios determine the frequency at which this oscillator stabilizes. The equation that follows shows the relationship between the various frequencies where P is the LO prescaler (MC145157 only). The received frequency can be changed by altering the LO divide ratio. The MCU takes care of the decimal-to- binary conversion, IF offset, and the other arithmetic required.

LO frequency = RF + IF = P x [(Xtal frequency) / (ref. divide ratio)] x LO divide ratio

fR CONTROL

BITGRABBER R REG

15 BITS

LOCK DETECTOR AND CONTROL

POR

BITGRABBER N REG

16 BITS

PHRASE/FREQUENCY DETECTOR B & CONTROL

R V

16

10 fV

fV CONTROL

Figure 5. MC145170 Block Diagram

Freescale Semiconductor, Inc...

Freescale Semiconductor, Inc.

Application Note

prescaling is used; for FM, divide-by-10 is used. This increases the minimum step size to 10 kHz of FM, which is ideal for this band, and to 5 kHz on SW, which is suitable for almost all broadcast stations. The MC145170 does not require any prescaling even on the FM band and can use this to advantage by allowing the use of a higher reference frequency, making the low-pass filter design less critical.

An important part of any PLL is the loop filter. The filter in Figure 6 is an active filter using the double-ended phase detector outputs from the MC145170 feeding a CA3460 operational amplifier. This dual op-amp allows the simple double-ended low-pass filter to be followed by a second order Sallen and Key filter. An active filter has the added advantage of increasing the available voltage swing beyond the supply rail of the MC145170/MC145157.

31

16

8.0 MHz

10 M 1n

4

38 6

1

7805

12 V

100 n

100 n

150 kΩ

62 kΩ

2

100 n

47 n

OSCIn

OSCOut fIn

E

D

C VSS

R V

VDD

30 pf

2

14

10 n 6

5

7

CA3620

15

150 kΩ 100 n

10 n

4k3

3 2

8

1

4

41 5

62 kΩ

27 kΩ 22 kΩ

4n7

42 7

2k2

10 kΩ

47 pf LO

100 μ

10 kΩ

μC

B4 B1 B0

12 MC145170

TUNING

10 n

10

AN494 MOTOROLA

Figure 6. MC145170 Circuit

For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor, Inc...

AN494 MOTOROLA

11

Freescale Semiconductor, Inc.

Application Note Radio Data System

The combination of active filter and double-ended phase detector outputs makes it simple to select the correct relationship between voltage and frequency. Usually, the fixed side of the varicap diode is grounded, so increased voltage increases the frequency of the oscillator; in some oscillator designs, the fixed side may be taken to the supply rail, and increasing the voltage will decrease the frequency. With the filter design shown here, the choice can be made simply by swapping the phase detector outputs from the PLLs.

Radio Data System

The radio data system (RDS) adds a digital data capability to the FM VHF transmissions on band II (87.5 to 108 MHz). The specification is defined in CENELEC EN 50067 (formerly EBU Technical Document 3244, see reference 2). An MC68HC05E0 implementation of RDS is described in AN460, (reference 5). It monitors the RDS activity on the MPX signal of a VHF radio but is not able to tune the radio and, therefore, cannot, use AF (alternative frequencies) or EON data. This application can tune the radio and uses EON data to retune the radio when a traffic announcement is taking place on another frequency. An announcement is initiated by a packet 14B and the radio retunes if TAs are enabled. At the end of the TA, the original station is re-tuned. TAs are not active in standby mode (standby line high).

To transmit the data, a subcarrier is added at 57 kHz. This subcarrier is amplitude-modulated with the shaped bi-phase coded data signal. The subcarrier itself is suppressed to avoid data modulated cross-talk in phase-locked-loop stereo decoders and to maintain compatibility with the German ARI system which uses the same subcarrier frequency. Information is sent in groups of four 26-bit blocks. Each group of 104 bits is one of several types containing different information. It is up to the broadcaster to decide which features are transmitted as long as the specified format is adhered to and PI, PTY, and TP are included. Each group contains a different subset of the RDS features; a list of all currently defined features is shown in Table 2.

For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor, Inc...

Freescale Semiconductor, Inc.

Application Note

The retrieval of data is carried out by demodulation hardware, which generates clock and data signals that can be used by the MCU. Suitable devices which can perform this function include SAA6579, SAA7579T (plus an external filter), TDA7330, LA2231, and RDS hybrids.

Table 2. RDS Features

Feature

Information

PI

Program identification

PTY

Program type

PS

Program service name

RT

Radiotext

CT

Clock time and date

AF

Alternative frequencies

TA

Traffic announcement

TP

Traffic program

MS

Music/speech switch

DI

Decoder identification

PIN

Program item number

EON

Enhanced other networks

TDC

Transparent data channel

INH

In-house data

This application supports PI, PTY, PS, RT, CT, TP, TA, MS, DI, PIN, and EON. These features facilitate permanent display of the 8-digit station name (PS) and time (CT), and, on request, can display program type (PTY), radiotext data (RT), and the status of the other RDS information (see Table 5).

EON data can be displayed and used to switch to traffic announcements, but the retuning features associated with AF are not supported, as they are appropriate only for a radio intended for use in a vehicle. In a car radio, AF data would be used to tune the radio to the strongest signal carrying the selected service. PI is a 2-byte number which identifies the

12

AN494 MOTOROLA

For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor, Inc...

AN494 MOTOROLA

13

Freescale Semiconductor, Inc.

Application Note Radio Data System

country, coverage area, and service. It can be used by the control MCU but is not normally intended for display. A change in PI code causes the initialization of all RDS data as it indicates that the radio has been retuned. This application facilitates the display of the current PI code.

PTY is a 5-bit number which indicates the current program type. At present, 16 of these types are defined. Examples include “no programme type,” “Current affairs,” and “Pop music,” although the actual syntax which is displayed is determined by the software of the controlling MCU. In this example, PTY can be displayed on request; Table 3 shows the display used for each PTY code.

PS is the 8-character name of the station and is permanently displayed (except in standby mode). In the absence of RDS (for example, AM bands), the name can be entered manually. If none is entered, then the frequency is used as the station name when the program is stored in EEPROM.

Radiotext (RT) constitutes a string of up to 64 characters which give additional information regarding the service or program currently being transmitted. In this application, RT is displayed on request on the 16-digit dot matrix displays, using scrolling. The data often contains extra spaces to center the text on a 2 x 32 character display. As these are not appropriate for a 16-character scrolling display, the software reduces all sequences of two or more spaces to a single space.

CT (clock time and date) data is transmitted every minute on the minute and provides a very accurate clock, traceable to national standards. The (modified Julian) date and local time variation are also transmitted. Time is permanently displayed. In standby mode (see information later), the date is displayed instead of the PS name. The MJD number, which is the form in which the date is received, can also be displayed. The MCU converts this number into day-of-week, day-of-month, month and year.

AF would be used by a car radio to retune to the strongest signal carrying the selected service. AF data, along with TDC (transparent data channel) and INH (in-house data), is not used in this application.

TA and TP are flags. TP is set if the transmitter normally carries traffic information and TA is set if a traffic announcement is in progress. The

For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor, Inc...

Application Note

Freescale Semiconductor, Inc.

combination — TA = 1 and TP = 0 — is used to indicate that EON data is being used to supply information on other networks, including traffic announcements. A port line (port A, bit 5) is asserted (low) when

TA = TP = 1. This can be used to demute or switch from another source (for instance, cassette when a TA occurs).

Table 3. PTY Types

PTY

Display

0

no program type

1

News

2

Current affairs

3

Information

4

Sport

5

Education

6

Drama

7

Culture

8

Science

9

Varied

10

Pop music

11

Rock music

12

Easy listening

13

Light classics

14

Serious classics

15

Other music

16–31

no program type

14

AN494 MOTOROLA

M/S is a single bit indicating either music or speech and is intended to be used to make a tone or volume adjustment to a radio’s audio stage. The M/S bit is displayed on request. A port line (port A, bit 6) is asserted (low) when M/S = 1. This can be used to control external hardware.

For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor, Inc...

Keyboard

The keyboard has 23 keys. Table 4 shows the layout and Table 5 contains a summary of key functions against mode.

Freescale Semiconductor, Inc.

Application Note Radio Data System

Decoder information (DI) constitutes four bits indicating the type of transmission (mono, stereo, binaural, etc.). Currently, it is not in use in the United Kingdom, but it can be displayed as a number between

1 and 15.

Program item number (PIN) is used to identify the program currently being broadcast. The format is a 2-byte number which includes the scheduled time and date (day of month) of the start of the program. PIN can be displayed as four hexadecimal digits or fully decoded to day of month and time.

EON (enhanced other networks) replaces the older ON format. If type 14 groups are used to provide EON data, then type 3 groups (ON) will not be used. Type 14A groups are used to send information about other networks. The PS name and principal frequency of up to 16 other networks can be displayed. Type 14B groups are used to switch to traffic announcements; they include the PI code of the station carrying the announcement. This PI code is searched for in NVM, and the required station is tuned if it is stored in NVM. This method allows the user to select which TAs are allowed (they will not occur if the station is not in NVM or if its TA inhibit bit is set) and avoids attempts to jump to an announcement which is not relevant or not receivable with sufficient signal strength to be useful.

PE0

Table 4. Keyboard Layout PE1 PE2

PE3

RDS

Traffic

MW step

TA test

Time colon

Sleep

+

7

8

9

Alarm

4

5

6

Store

1

2

3

0

Manual

Clear/Step

On/Off

Q6 Q5 Q4 Q3 Q2 Q1

AN494 MOTOROLA

15

For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor, Inc...

Freescale Semiconductor, Inc.

Application Note

On/Off

Sleep

The following functions are available.

This key is intended as an on/off control for the radio. It sets a port line low for on and high for standby and can be used to control the power supply to the radio. Its status affects the behavior of other keys as described later in this application note.

When pressed, the 1-hour sleep timer starts, leaving the standby line low (radio on) until the sleep time has elapsed. At this time, the line is switched to the standby mode (high). In the normal display mode, the sleep timer running causes the decimal point to appear on the display modules’ first character. The sleep timer can be cancelled by pressing ON/OFF. The sleep time can be reduced in increments of five minutes by repressing or holding down the SLEEP key.

The alarm key selects the alarm display mode and toggles the alarm armed status. When the alarm is not armed, the legend ALARM-OFF is displayed. When it is armed, the alarm time is shown and adjustment of the alarm setup can be done by selecting the field (5/7 day, hours, or minutes) with the STORE/SET key. The selected field (hours or minutes) flashes and can be adjusted with the +/– keys or the tuning knob. The alarm setup display returns to normal three seconds after the last adjustment. If the radio is in standby mode and the alarm is set, the alarm time is displayed instead of the date. The radio will come fully on (standby line low) at the alarm time. After a 500-ms delay to allow power supplies to stabilize, the program which was tuned when the radio was last used is retuned. When set to the 5-day alarm, the alarm will not occur on Saturdays and Sundays.

Pressing + or –, while in normal mode, increments or decrements the program number. The program number wraps round at 0 and 9. The mute line is set high before retuning and returned low 100 ms after the new frequency has been sent to the PLL. Changing the tuned program using the +/– keys (or the 0–9 keys) disables PS name clearing if RDS information is absent or contains multiple errors.

ON/OFF

SLEEP

Alarm

ALARM

Plus (+)

and Minus (–)

+ and

16

AN494 MOTOROLA

For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor, Inc...

Store/Set

Application Note Radio Data System

In PS-edit mode (see entry that follows), the + and – keys are used to change the character at the cursor position. This function is duplicated on the tuning knob incremental encoder. In the alarm setup mode, the + and – keys are used to change the alarm time as described earlier. The field which is currently selected for adjustment (using the STORE key) flashes. This function is duplicated on the tuning knob also.

In manual mode, these keys increment and decrement the current frequency in steps of 10 kHz or 50 kHz (FM) as selected by the CLEAR/STEP key. The default is 10 kHz. On the SW band, 1-kHz (455 kHz IF only) or 5-kHz steps are available; on the MW/LW band, 1- or 9-kHz steps are available. In the U.S.A., 10 kHz is appropriate instead of 9 kHz; this can be selected with a special key (see entry that follows). This function is duplicated on the tuning knob both in this mode and in normal mode. Use of the +/– keys (or the incremental encoder) to adjust the frequency enables PS name clearing if RDS information is absent or contains multiple errors. In normal mode, on the AM bands, use of the tuning knob displays the frequency in the PS name field, facilitating simultaneous display of frequency and time.

In normal modes (not manual or alarm), the store key selects the PS-edit mode in which the first character of the displayed PS-name flashes and can be changed by the + and – keys or the tuning knob. Subsequent presses of STORE move to the next character. A space is shown as a hyphen (–). This mode returns to the normal display mode 10 seconds after the last key press. This mode can be used to give a name to a station with no RDS PS name (all AM stations or an FM station with no RDS or with RDS or unusable quality). See the entry that follows for the method of saving this name in EEPROM. Entry of a PS name in this way requires that PS name clearing is disabled. This is achieved by changing the program number (by using the +/– or 0–9 keys). Fine tuning enables PS name clearing (see +/– key description). Direct frequency entry does not affect the PS name clearing status.

In the alarm setup mode, STORE selects what will be changed when the + or – keys or the tuning knob are used (5/7 day, hours, or minutes). Hours or minutes flash when they are selected.

Freescale Semiconductor, Inc.

STORE/SET

AN494 MOTOROLA

17

For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor, Inc...

Application Note

Manual

In manual mode, STORE enters a special manual store mode in which the 9–0 keys save, rather than recall, a program. After pressing STORE, the program number flashes to indicate this change of function. Alternatively, a second press of STORE saves the current tuning information into the current program number. The current frequency, PI code (FM), PS name, and TA inhibit flag (FM) are saved in EEPROM. The TA inhibit status can be changed using the TRAFFIC key (see entry that follows). If the PS edit mode has been used, then manual store mode should be used to save the entered PS name.

Select manual entry of frequency; a second press returns to normal mode if the tuned frequency has not been changed. If it has been changed, the second press retunes to the new frequency and an additional press is required to return to the normal mode. In manual mode, frequency is displayed instead of the time; the + and – keys or the tuning knob enable incrementing and decrementing of the current frequency. Direct entry of frequency can be made using 0–9 keys. In this mode, the STORE key enters the manual store mode in which the program number flashes, allowing storing of the tuned program and PS name into the current, or a different, program number. A second press of STORE saves the current frequency, PS name, PI code, and TA inhibit bit (FM) in EEPROM.

In manual mode, the TRAFFIC (TA) key controls the TA inhibit bit, which can be stored with each program. If the current station has its TP flag high, the least significant digit of the frequency will alternate with a decimal point. Pressing TP toggles the NVM inhibit bit. When inhibited, the decimal point between the MHz and kHz becomes a “–”. A subsequent press of STORE saves this bit in NVM along with the frequency, PI code, and PS name.

These keys are used both for direct frequency entry and for recalling the 40 available programs. In all modes, except standby and manual, when a 0–9 key is pressed, the selected program is tuned. Changing the tuned program using the 0–9 keys (or the +/– keys) disables PS name clearing if RDS information is absent or contains multiple errors. In manual mode, these keys are used for the direct entry of frequency. After entering the required frequency, pressing MANUAL retunes to the new frequency.

Freescale Semiconductor, Inc.

MANUAL

0 to 9

0

to —9

18

AN494 MOTOROLA

For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor, Inc...

RDS

Traffic

Clear/Step

Application Note Radio Data System

The mute line is set high before retuning and returned low 100 ms after the new frequency has been sent to the PLL. In manual store mode, the program number flashes and the 0–9 keys save the tuned program into the selected program number in EEPROM.

The first press displays scrolling RT data. Subsequent presses display PTY code, PI code, TA and TP, PIN code (two formats), MJD, MS and DI, last TA PI code, the reason for returning from last TA and EON (up to 16 networks with their principal frequency). See Table 5 for the display formats. The RDS key is operational in all modes except standby.

Enable/disable traffic switching. When disabled, this is indicated by a decimal point in the 11th character of the dot matrix displays. Default at power-up is enabled. The TRAFFIC key works in all modes except standby. During manual mode and manual store mode, it toggles the TA inhibit status, which can subsequently be saved in NVM.

Toggles between 10-kHz and 50-kHz steps on the FM band or between 1 and 9 kHz (or 10 kHz) on the MW band. There is no indication on the dot matrix displays. In manual mode, the displayed frequency is cleared to facilitate the entry of a new frequency. If the clear is followed by use of the + or – keys or the tuning knob, the original frequency is retained, allowing a change of step size only. In PS edit mode, the clear key clears the current PS name.

Pressing TA test simulates the arrival of a group 14B. The PI code of the other network is embedded in the code (C5B1, Radio Clyde in the ROMed version).

This key enables or disables the flashing colon in the time display. This can be used to prevent unnecessary I/O activity thus reducing RFI. Disabling the colon prevents 1-Hz updating, as the display modules are only updated if the data to be displayed has changed.

Freescale Semiconductor, Inc.

RDS

TRAFFIC

CLEAR/STEP

TA Test

Time Colon

AN494 MOTOROLA

19

TA TEST

TIME COLON

For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor, Inc...

Application Note

MW Step

This optional key selects 9- or 10-kHz steps on MW. Nine kHz is appropriate in Europe and 10 kHz in the United States. The default is 9 kHz, and the key need not be implemented if 10 kHz will never be required.

Freescale Semiconductor, Inc.

MW STEP

Table 5. Key Function by Mode

On/Off

Sleep

Alarm

+/–

Store

Manual

TP

RDS

0–9

Clear

Standby (OFF)

mode normal (ON)

mode sleep (ON)

mode alarm

Normal (ON)

mode standby (ON)

+/– prog.

mode PS-edit

mode manual

toggle traffic enable flag

display RT PTY PI TA TP PIN hex PIN dec MJD M/S DI TA ret. TA PI EON

(16)

tune prog.

toggle step 10/ 50 kHz

&

clear freq.

PS edit

+/– ASCII

next char.

A off

L

on A

R M

setup

mode alarm on

+/– prog.

mode alarm off

5/7 day toggle

mode setup

+/– hour/min

hour/min toggle

M

A

N

U

A store L

mode alarm

+/– freq.

mode store

mode normal

toggle traffic enable NV bit

input freq.

save prog.

save prog.

20

AN494 MOTOROLA

For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor, Inc...

Circuit

Application Note Circuit

The circuit is in two distinct parts. The circuit for the MC145170 synthesizer is shown in Figure 6. The synthesizer board is the only part of the synthesizer controller which actually needs to be in (or close to) the radio. A local oscillator signal to supply the synthesizer should be taken from a low-impedance point so that the oscillator is not significantly loaded. Pulling of the oscillator frequency is not a problem as the PLL circuitry will compensate, but loading the tuned circuit itself is not recommended unless a high-impedance buffer is included. This prevents affecting the tuning range or the “Q” of the oscillator.

The MC145157 requires a divide-by-10 prescaler for FM and divide-by-5 for band 3. The MC145170 does not require prescaling. The standard LP1186 FM tuner does not have an LO take-off but a signal can be taken, without other modification, from the emitter of the oscillator BF195 (near the center of the PCB).

The Mullard LP1186 is unusual in having its local oscillator low. More recent tuners, for instance, the Larsholt 7254/55, almost always have their local oscillator above the tuned frequency. This selection can be made using port A, bit 2.

A 16-digit LCD (parallel) or VFD (serial) dot-matrix display module can be driven. The two display modules show the same data (within the limitations of their character ROMs). The VFD display driver supported is the MSC7128 and the LCD driver, the HD44780. On its own, this driver can be used to provide a 16-way multiplexed display, but an 8-way multiplexed higher contrast display is possible if the module also incorporates an HD44100. In an application which drives an LCD module (for instance, a ROMed PH8) and the module is not connected, a 10-k pulldown resistor should be added to bit 7 of port A. This prevents the software hanging up waiting for the busy line to go low.

Figure 3 and Figure 4 show the circuit diagrams of the controllers. Figure 3 gives the pin numbers for the 52-pin PLCC HC11E with the numbers for the 56-pin SDIP (if different) in brackets. With the E32, the display in use can be selected by the level on port E, bit 7 (high for LCD and low for VFD) and the LCD multiplexing by port A, bit 7 (high for

AN494 MOTOROLA

21

Freescale Semiconductor, Inc.

For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor, Inc...

Software

divide-by-16, low for divide-by-8). The SW bank is selected by the level on port E, bit 6.

Figure 4 shows pin numbers for the 84-pin PLCC K4, with the differences for the PH8 in brackets. Debug on the K4 using PCbug11 (reference 5) requires some additional hardware (within the dotted line) and port D bits 0 and 1 (SCI), port G bits 1 and 7 (XA14 and R/W), and port H bits 5 and 7 (CSGP1 and CSPROG), leaving 30 input/output (I/O) lines for use in the application. The display selections are not available on the PH8 ROMed versions, but there are four SW banks of 10 program memories; they are selected by port E, bits 6 and 7.

Since different demodulator devices can be used, the circuitry for the demodulator is not shown. The clock from the demodulator interrupts the microprocessor on each positive edge. At this time, a data bit is available and is read on bit 5 of port E.

An assembled listing of part of the HC11E32 ROMed version (ZC403311) of the application is included. The software is in three modules and was assembled and linked using the Introl re-locatable assembler and linker. The first module is listed. It contains all the main control routines, including the main loop and keyboard scanning, and the function to be performed by each key.

The second module contains the RDS and display functions, while the third module is the 4-function, 9-digit integer BCD arithmetic required for the MJD date calculations.

The second and third modules are described and listed in AN495 (reference 4). EB419/D (reference 5) describes and lists additional debug code contained in the ROMed parts.

The code which is executed only on startup (power-on or reset) begins at the label START on the third page of the first module’s listing, while the main loop starts at the label IDLE on the next page. The idle loop is quite long, as many functions and checks have to be carried out.

Freescale Semiconductor, Inc.

Application Note

22

AN494 MOTOROLA

For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor, Inc...

AN494 MOTOROLA

23

Freescale Semiconductor, Inc.

These include:

• Pacing the loop using the main timer

• Checking to see if the display needs updating or if a transient display has timed out

• Checking if alarm is armed and, if so, comparing its time with the current time

• Sleep timer operation

• Traffic announcement timing and return

• Keyboard scanning and selected function execution

• Incremental encoder execution

• Checking for changes in the band and memory selection inputs

• Timing band changes

• Updating TA = TP = 1 and M/S outputs

The keyboard subroutine (KBD) is executed at 64 Hz from the idle loop and checks to see if a key is pressed. If the same key is pressed on three consecutive tries, its function is performed. The remainder of the first module constitutes the subroutines performed by each key and the arithmetic and serial activity required to tune the synthesizers. The batch files used for linking the modules are shown as comments at the end of the listing, along with the pseudo-vectors required by PCbug11 during debug.

The displays are only updated when there is a change in the displayed data. At 8 Hz, a check is made to see if any characters have changed; if there has been a change, the display update routine is executed. This is done to minimize interference caused by communication with the displays. The colon between the hours and minutes of the time display changes at 1 Hz. This can be disabled (colon permanently displayed) by using the time colon key. The display routine (MOD) is executed in the idle loop if the flag bit 3 of STAT2 is set. It is set every 125 ms by timer B interrupts. If flag bit 4 of STAT2 is set, the display is initialized, indicating no valid RDS data. The dot-matrix modules are then updated, if necessary, with new data. Each time, before anything is written to the LCD module, the subroutine WAIT is used; this checks that the controller

Application Note Software

For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor, Inc...

Freescale Semiconductor, Inc.

Application Note

in the module is not busy. The different display formats are selected by checking the various flags and the relevant routine executed. The normal display permanently shows PS name and time. As the locations in RAM used for hours and minutes contain binary numbers, they are converted to BCD before being written to the relevant bytes in DISP. Once all 16 bytes in DISP have been loaded, loops are used to send the data to the display modules. The standby display (alarm not enabled) shows date and time. After a power-up, the display “Mon 0 inv 0:00” indicates that the date and time are invalid. The date and time will be correct once a valid RDS CT group has been received.

The VFD routine sends the same data as is shown on the LCD module to the serial VFD module. The display driver used has a different character set from the standard ASCII set used by the LCD module. The table VTAB is used to convert ASCII data into the required character in the VFD module. The small table INITF is used to send the required initialization bytes to the VFD module. This module does not require a busy check but does require a delay between successive bytes. This is satisfied by the wait loop within the serial output loop VFDL. The LCD and VFD routines are in the second software module (see reference 4).

Table 6. Display Formats

Display Mode

Format

Standby Off

Alarm off

Alarm off, no CT Alarm on

Thu 12 May 21:35

Mon 0 inv     0:00

0659 alarm   21:35

With RDS PS name Normal Without RDS

On Auto name Tuning knob (AM)

  4 BBC 4 FM  21:40

5 ———–  21:40

6 —  9410      21:40

6 —  9415      21:40

Alarm

Alarm off Alarm on/setup

  Alarm — OFF

5-day alarm 0659

Sleep

Sleep 60 minutes

24

AN494 MOTOROLA

For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor, Inc...

Freescale Semiconductor, Inc.

Application Note Traffic Announcements

Table 6. Display Formats (Continued)

Display Mode

Format

RDS RT PTY

PI

TA & TP

PIN (hex)

PIN (decoded) MJD

MS & DI

last TA 1.

2. EON (16)

Kaleidoscope. . . .

          Culture

    PI code — C204

  TP — 0      TA — 1

    PIN no. — 655E

      12th at 21:30

    MJ day — 49484

     M/S  M  DI 01

  last TA PI C514

  TA rtrn:  EON PI

BBC 3 FM

BBC Gael

BBC Nwcl

BBC Scot

BBC Scot

BBC Scot

BBC Scot

             92.10

            103.70

             96.00

             94.30

             92.50

             94.70

             93.50

Classic     101.70

BBC Eng

BBC 1 FM

BBC 2 FM

107.90

99.50

89.90

————–

————–

Manual

6 Classic      101.70

Traffic Announcements

AN494 MOTOROLA

25

The radio can respond to EON-initiated traffic announcements if they are enabled by the TRAFFIC (TA) key. This status is indicated by a decimal point at the 11th character on the dot-matrix displays. A switch to a TA on another frequency will only occur if the station has previously been stored in NVM; the EON data which can be displayed using the RDS key is not used for TA switching. The PI code of the last TA (or attempted TA) can be displayed by pressing the RDS key eight times. A further press displays one of the TA return/inhibit messages shown here. TAs which are the result of TA = TP = 1 on the current frequency do not update the last TA PI or TA return/inhibit messages.

For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor, Inc...

Freescale Semiconductor, Inc.

Application Note

When a 14B group is received, the following occurs:

26

AN494 MOTOROLA

Check traffic flag; if enabled, proceed; otherwise, set TA rtrn/inhb message to:

TA inhb: flag — Traffic key inhibit flag (d.p. at the 11th character position)

Search for TA PI code in NVM; if found, proceed; otherwise, set TA rtrn/inhb message to:

TA inhb: EON PI — The PI code given in 14B is not in the NVM.

Check station TA inhibit flag in NVM; if clear, proceed; otherwise, set TA rtrn/inhb message to:

TA inhb: NVM — User inhibit of station using bit stored in NVM

Retune to frequency stored in NVM against EON PI code. The PS name display changes to show the PS name of the service carrying the traffic announcement and the time display is replaced by the new frequency. If the service has its TP flag high, then the 10s of kHz digit will flash as in the manual mode display. After one second, check TP flag at the new frequency. If high, then proceed; otherwise, return to original frequency and set TA rtrn/inhb message to:

TA rtrn: TP low — TP station does not have TP bit high.

Check PI code at new frequency. If correct (same as 14B EON TA PI code), then proceed; otherwise, retune to original frequency and set TA rtrn/inhb message to:

TA rtrn: PI code — PI code of TP station was not as expected.

After an additional two seconds, start to monitor the TA flag; if high, remain on current frequency, if low, return to original frequency and set TA rtrn/inhb message to:

TA rtrn: TA low — TA flag of TP station low. This is the normal return method.

If, during a TA, the radio is manually retuned, the TA rtrn/inhb message is set to:

TA rtrn:manual — User-initiated manual return

For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor, Inc...

Freescale Semiconductor, Inc.

Table 7. MCU I/O

Application Note Traffic Announcements

K4 and PH8

Function

E32

Port A bits 0–7

LCD module data bus

Port C bits 0–7

Port B bits 0–7

High-order addresses (K4)

N/A —

Port C bits 0–7

Data bus (K4)

N/A —

0–1 Port D bits 2–4

5

Debug (PCbug11 or BUFFALO) Keyboard rows (via 14028 encoder) Standby (high:standby, low:on)

Port D bits 0–1 2–4

5

0–3

4 Port E bits 5 6 7

Keyboard columns

Shaft direction (XIRQ)

RDS data in or shaft direction (IRQ) Short-wave memory select 1 Short-wave memory select 2 (PH8 only)

Port E bits 0–3 4

5

6 N/A —

Port F bits 0–7

Low-order addresses

N/A —

0

1 Port G bits 2–4 5–6

7

Mute

XA14 (K4 only)

LCD control lines (RS, R/W, and clock) Band select

R/W (K4)

Port A bit 4

N/A

Port B bits 5–7 Port A bits 0–1

N/A

0–1 2

3

Port H bits 4 5 6 7

Serial clock/data for VFD and PLLs VFD chip enable (PH8: +/– 10.7 MHz) Port E, bit 5 input control

MC145170 PLL chip enable

CSGP1 (K4 only)

MC145157 PLL chip enable CSPROG (K4 only)

Port B bits 0–1 Port B bit 2 Port A bit 3 Port B bit 4

N/A

N/A

Port B bit 3

— —

N/A

FM IF select (+/– 10.7 MHz

Port A bit 2

N/A

TA = TP = 1

Port A bit 5

N/A

M/S = 1

Port A bit 6

N/A

LCD multiplex select (8/16)

Port A bit 7

N/A

Display module (LCD/VFD) select

Port E bit 7

AN494 MOTOROLA

27

For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor, Inc...

PH8 ROMed Application

Freescale Semiconductor, Inc.

Application Note

Setup and Testing

An effective method of fault finding a PLL circuit is to initially do the tuning with a potentiometer, leaving the output of the filter disconnected from the VCO. As the radio is tuned through the frequency setup in the synthesizer, the filter output should switch from one extreme to the other. Until this test passes, it is not useful to close the loop, as it is difficult to distinguish the cause of a problem from its effects.

Check operation of the MC34064 LVI circuit. As the supply voltage is lowered, it should pull the reset pin low. This should occur between 4.70 and 4.50 volts. Adjust trimmer on the EXTAL pin of the M68HC711 for accurate timekeeping in the absence of RDS CT information. (Radio should be detuned or tuned to a station known not to provide RDS.) The trimmer on pin 2 of the PLL chip (MC145157 or MC145170) should be adjusted to provide an accurate reference frequency. This adjustment can be made simply to tuning to a strong broadcast of known frequency and adjusting for optimum reception or symmetric adjacent-channel response.

The E32

1.

2.

3. 4.

ROMed PH8s (ZC428200 and ZC428202) differ from the described version of this application as follows:

40 short-wave programs can be stored instead of 20. These are accessed by the use of a second memory-select line (port E, bit 7).

There is no display selection; both LCD and VFD signals are generated. If an LCD module is not connected, a pulldown on port A, bit 7 should be included (see Figure 4).

LCD multiplexing is fixed at divide-by-8.

Traffic announcement (retune to TA frequency) is not fully implemented in the ZC428200.

28

AN494 MOTOROLA

For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor, Inc...

References

Application Note References

5. Time colon FLASH defeat key is not implemented; the display modules are always updated at 8 Hz.

6. TA = TP = 1 and M/S outputs are not implemented.

7. 10-kHz MW steps are not available (no 9/10 key).

8. +/–10.7-MHz IF selection (FM) is carried out on port H, bit 2 which is read after reset but before it is set up as an output. A pullup or pulldown resistor will determine the IF selection (pullup for LO high and pulldown for LO low) without affecting the pin’s subsequent function as an output (VFD chip enable).

9. The 500-ms delay at switch-on between the standby line moving and the PLLs being retuned is not implemented.

10. The sleep d.p. flashes during operation of the sleep timer.

1. A Radio Synthesizer Using the MC68HC05B4, Motorola document order number ANE416/D

2. CENELEC EN 50067, Specifications of the Radio Data System (RDS), formerly EBU technical document 3244

3. An RDS Decoder Using the MC68HC05E0, Motorola document order number AN460/D

4. RDS Decoding for an HC11 Controlled Radio, Motorola document order number AN495/D

5. ROMed HC11E32 and HC11PH8 Including BUFFALO Monitor and PCbug 11 Talker, Motorola document order number EB419/D

AN494 MOTOROLA

29

Freescale Semiconductor, Inc.

For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor, Inc...

Application Note

BMJD RMB Q RMB TMQ RMB R RMB TMP RMB R RMB MJD RMB YR RMB MNTH RMB DOM RMB DOW RMB

3 9 9 9 9 9 9 9 2 2 1

DIST RMB SLEPT RMB RDSTO RMB PSNP RMB DAT RMB TMPGRP RMB GROUP RMB PTY RMB PTYCMP RMB PI RMB PION RMB PIN RMB LEV RMB BIT RMB ITMP1 RMB SYN RMB

30

1

1

1

1

4

8

8

1

1

2

2

2

1

1

1

2

SECTION.S .RAM1,COMM

******************************************** ** * RAM allocation, RDS & radio. * ** ********************************************

$04

$03

$08

$0A

$07

$09

$24

$26

$39

$3D

$1000 $3B 9

PORT A ADDRESS

“B”

“C”

“D”

“E”

PORT C DATA DIRECTION REG. “D”””

                REGISTER BLOCK OFFSET

                EEPROM CONTROL REGISTER

                No. DIGITS

                BINARY MJD

                WORKING NUMBER 1 – RDS

                SCRATCH

                WORKING NUMBER 2 – RDS

                MULT. OVER. OR DIV. REMAINDER

                WORKING NUMBER 3 – RDS

                MODIFIED JULIAN DAY NUMBER

                YEAR

                MONTH

                DATE

                DAY OF WEEK

                TRANSIENT DISPLAY, TIMEOUT,COUNTER

                SLEEP TIMER MINUTES COUNTER

                RDS TIMEOUT COUNTER

                PS DISPLAY POINTER

                SERIAL DATA BUFFER

                TEMPORARY GROUP DATA

                COMPLETE GROUP DATA

                PROGRAM-TYPE CODE (CURRENT)

                PROGRAM TYPE CODE (PTY SCAN)

                PROGRAM IDENTIFICATION CODE

                PROGRAM IDENTIFICATION CODE (EON)

                PROGRAM ITEM NUMBER

                VALID BLOCK LEVEL

                BIT LEVEL

                TEMP BYTE FOR USE IN IRQ

                SYNDROME

For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor, Inc.

Code Listing

************************************************************* ** * MC68HC11E32 RDS multiband radio. * ** * Used with RDSE.S11, FNCE.S11 & RDRAME.S11. * ** * P. Topping 3rd April ’94 * *************************************************************

           IMPORT

           EXPORT

           LIB

PORTA EQU PORTB EQU PORTC EQU PORTD EQU PORTE EQU PORTCD EQU PORTDD EQU TMSK2 EQU PACTL EQU OPTION EQU INIT EQU

RBO EQU PPROG EQU ND EQU

SDATA,TINTB,INITD,MOD,CLOCK,MJDAT,WAIT,CLREON,CBCD, PROC, TFCC

DCON2,NEW,CLTR,SHAFT

RDRAME.S11

$00

AN494 MOTOROLA

Freescale Semiconductor, Inc...

CONF RMB 1 TH32 RMB 1 TH8 RMB 1 SEC RMB 1 MIN RMB 1 OUR RMB 1 AMIN RMB 1 AOUR RMB 1

DISP1 RMB 1

DISP2 RMB 1

6

RQ RMB 6 RP RMB 6 RR RMB 2

W1 RMB 2

W2 RMB 2

W3 RMB 2

W4 RMB 2

W5 RMB 2

W6 RMB 2

W7 RMB 2

KEY RMB 1 KOUNT RMB 1 DIG2 RMB 1 CARRY RMB 1 COUNT RMB 1

NUM1 RMB 2

NUM2 RMB 2

LED RMB 1 SMEM RMB 2 REARET RMB 1 RTDIS RMB 1 DI RMB 1 SCHAN RMB 1

******************************************** ** * Flags, & pages 1-2. * ** ********************************************

SYNDROME CONFIDENCE

TICS (SECONDS/32)

EIGHTHS OF SECONDS

SECONDS

STAT RMB 1 *

*

*

*

*

*

*

STAT2 RMB 1 *

*

*

*

*

*

*

STAT3 RMB 1 *

*

*

*

*

*

*

STAT4 RMB 1 *

*

*

*

*

*

*

STAT5 RMB 1 *

* *

AN494 MOTOROLA

WORKING BCD NUMBER

” “”2”

” “”3”

W

O

R

K

I

N

G

CODE OF PRESSED KEY

KEYBOARD COUNTER

2nd DIGIT TIMEOUT COUNTER

BCD CARRY

LOOP COUNTER

1ST No. POINTER (ADD & SUBTRACT) 2ND No. POINTER (ADD & SUBTRACT) STATION NUMBER

CURRENT FREQUENCY

LAST TA REASON FOR RETURN

RDS DISPLAY TYPE

DECODER IDENTIFICATION

SCAN CHANNEL

                0: MODE 1: STATION, 0: FREQ

                1: STEP 1: 50KHz, 0: 10KHz

                2: CLRQ 1: CLEAR IF NO. KEYED

                3: TIMER MS BIT TOGGLE (64 Hz)

                4: RDS DATA CLEARING ENABLE

                5: KEY FUNCTION PERFORMED

                6: KEY REPEATING

                7: NOT JUST POWERED UP

                0: VALID SYNDROME

                1: VALID GROUP

                2: RT DISPLAY

                3: UPDATE DISPLAY

                4: CLEAR DISPLAY

                5: SPACE FLAG

                6: NOT ON PROGRAM (AM)

                7: TA RETUNE DONE

                0: NOT ON PROGRAM (FM)

                1: TEXTA/TEXTB BIT (RT)

                2: TA FLAG

                3: TP FLAG

                4: SHAFT DIRECTION

                5: SHAFT ROTATION

                6: UPDATE DATE

                7: SHAFT INTERRUPTS

                0: DISPLAY (OR TA SWITCH) TRANSIENT

                1: SLEEP TIMER RUNNING

                2: TRAFFIC ENABLED

                3: ALARM DISPLAY

                4: ALARM ARMED

                5: ALARM SET-UP

                6: ALARM HOURS (SET-UP)

                7: VALID GROUP 14B RECEIVED

                0: BAND CHANGE TIMEOUT

                1: RDS DISPLAYS

                2: SLEEP DISPLAY

                3: M/S 0: M, 1: S

For More Information On This Product, Go to: www.freescale.com

31

Freescale Semiconductor, Inc.

MINUTES

HOURS

ALARM MINUTES

ALARM HOURS

RT DISPLAY POINTER

RT DISPLAY POINTER

#1 #2

1 RADIO

Application Note Code Listing

Freescale Semiconductor, Inc...

Application Note

* * * *

STAT6 RMB 1 BCTO RMB 1 SCNT RMB 1

SECTION .RAM2,COMM EON RMB 256

SECTION .RAM3,COMM DISP RMB 16 DISPP RMB 16

PSN RMB 8 RT RMB 69

SECTION .ROM1 STRST JMP START TMRB JMP TINTB IRQ JMP SDATA

******************************************** ** * Reset routine – set-up ports etc. * ** ********************************************

4: RETUNE FLAG (FREQUENCY MODE)

5: TA INHIBIT FLAG (NVM)

6: STORE MODE

7: WEEKDAY ONLY ALARM

BAND/BANK (,MW STEP,COLON, ,A1,A0,,E6)

BAND CHANGE TIMEOUT

SHAFT DETENT COUNTER

EON DATA (16 NETWORKS)

LCD MODULE BUFFER

CURRENT LCD MODULE CONTENTS

RADIOTEXT

RESET VECTOR

RTI

IRQ

REGISTERS AT $1000

ENABLE EEPROM WRITE (NOT CONFIG)

IRQ EDGE SENSITIVE

32Hz RTI (8.388MHz XTAL)

PORTA, BITS 3 & 7 INPUTS

ENABLE REAL TIME INTERRUPTS

DWOM = 0, PORTD PUSH-PULL

INITIALISE STACK POINTER

0,1:   BAND INPUTS (FM, FM, MW, SW), 2: FM IF

3:     IRQ CONTROL, 4: MUTE, 5: TA=TP=1

6:     M/S=1, 7: 8/16 LCD MUX

0,1:   SERIAL CLOCK/DATA, 5,6,7: LCD CONTROL

2,3,4: LATCH SIGNALS (VFD, 5157 & 5170)

START LDAA

STAA INIT

LDAA #$10 STAA $1035

LDAA #$30 STAA $1039 LDAA #$03 STAA $1026 LDAA #$40 STAA $1024 LDAA #$00 STAA $1028

LDS #$02FF

LDY #$1000 LDAA #$10 STAA PORTA,Y

H2L LDAA

STAA PORTB,Y

CLOOP

32

JSR

LDAA

JSR

JSR

LDAA

JSR

LDX CLR

DBOUNC

#$30

CLOCK

DBOUNC

#$30

CLOCK

#BMJD 0,X

WAIT 15ms

                INITIALISE LCD

                WAIT 15ms

                INITIALISE LCD

                INITIALISE PAGE 0 RAM

For More Information On This Product, Go to: www.freescale.com

#$01

#$00

Freescale Semiconductor, Inc.

CLR PORTC,Y

LDAA #$FF 0-7: STAA PORTCD,Y

CLR PORTD,Y 0,1: LDAA #$3C 2-4: STAA PORTDD,Y 5:

LCD PARALLEL BUS

SCI (DEBUG)

KEYBOARD OUTPUTS

STANDBY

KEYBOARD INPUTS, 4: SHAFT INPUT (XIRQ)

RDS/SHAFT INPUT, 6: SW BANK, 7: LCD/VFD

* PORTE *”

******************************************** ** * INITIALISE LCD AND RAM. * ** ********************************************

0-3: 5:

AN494 MOTOROLA

Freescale Semiconductor, Inc...

JRT1 EQU JIRQ EQU JXIRQ EQU

$00EB

$00EE

$00F1

E32 BUFFALO RAM JUMP TABLE “”””” “””””

INX

CPX #SCNT+1 BNE CLOOP BSET STAT4,$04 BSET STAT,$01

LDAA #$30

JSR CLOCK

JSR WAIT

LDAA #$30

BRCLR PORTA,Y,$80,M8 LDAA #$38

MORE ?

ENABLE TRAFFIC

STATION MODE

INITIALISE LCD

/8 DISPLAY

/16 DISPLAY

LATCH IT

SWITCH DISPLAY

LATCH IT

CLEAR DISPLAY

LATCH IT

INITIALISE RDS

AND EON DATA

SWITCHING – DEFAULT ?

OFF

DATA & DISPLAY

M8 JSR

JSR WAIT

LDAA #$08 JSR CLOCK JSR WAIT LDAA #$01 JSR CLOCK JSR INITD JSR CLREON

* Initialise interrupt JMPs

NO2D BRCLR

LDAA DIST

BNE NOPS JSR CLTR

NOPS BRCLR

JSR MOD

DISPLAY TRANSIENT ?

NDU BRCLR

NOTSNZ BRSET NTJ2 JMP

NNT2 BRCLR

LDAA DOW

CMPA #4 BHI NT2J

NWA LDAA

CMPA OUR

AN494 MOTOROLA

CLOCK

LDAA #$7E STAA JRTI STAA JIRQ STAA JXIRQ LDD #TINTB STD JRTI+1 LDD #SDATA STD JIRQ+1 LDD #SHAFTX STD JXIRQ+1

LDAA #$00 TAP

******************************** ** * Idle loop. * ** ********************************

RTI

IRQ

XIRQ

ENABLE IRQ & XIRQ

IDLE LDY

BRSET STAT,$08,TBH

BRSET $0E,Y,$80,* BSET STAT,$08 BRA NO2D

TBH BRCLR

BCLR STAT,$80

#$1000

Freescale Semiconductor, Inc.

$0E,Y,$80,*

STAT4,$01,NOPS

STAT2,$08,NDU BCLR STAT2,$08

YES, TIMED OUT

DISPLAY UPDATE

YES, DO IT

AND CLEAR FLAG

STANDBY ?

STANDBY, ALARM

?

REQUIRED

ARMED ?

?

?

PORTD,Y,$20,FULON

STAT4, $10,NNT2

NT2

STAT5,$80,NWA

YES, WEEKDAY ALARM ONLY

YES

SATURDAY OR

SUNDAY ?

NO, COMPARE ALARM HOURS

WITH TIME

AOUR

Application Note Code Listing

For More Information On This Product, Go to: www.freescale.com

33

Freescale Semiconductor, Inc...

Application Note

BNE NT2J LDAA AMIN CMPA MIN BNE NT2J LDAA SEC BNE NT2

ONAG BCLR PORTD,Y,$20 JSR DEL500

BCLR PORTA,Y,$10 JSR P5170

FULON BRCLR STAT4,$02,FLN LDAA SLEPT

BNE FLN

BCLR STAT4,$02 BSET PORTD,Y,$20 BSET PORTA,Y,$10

******************************** ** * Idle loop (cont.). * ** ********************************

SAME ?

YES, COMPARE ALARM MINUTES

WITH TIME

SAME ?

ONLY ALLOW WAKE-UP IN FIRST SECOND

TO PREVENT SWITCH-OFF LOCKOUT

YES, SWITCH ON,

WAIT 500ms,

DEMUTE

AND TUNE (5170 & 5157)

SLEEP TIMER RUNNING ?

YES

TIME TO FINISH ?

YES, CLEAR FLAG,

SWITCH OFF

FLN BRCLR

BRSET STAT2,$80,NT2 YES, BIT

HIGH ?

* BRCLR

* LDAA

* STAA

* BRA

SOK JSR

PORTE,Y,$10,SOK SIGNAL OK ? #2

REARET

NT1

PINOK1 LDAA

STAA REARET

Freescale Semiconductor, Inc.

STAT4,$80,NT1 14B FLAG

AGREES ? BSET STAT2,$80 NO, SET BIT

CLR REARET

LDAA #25 LOCK OUT RETURN STAA DIST FOR 3 SECONDS

BSET STAT4,$01 SET DISPLAY BSET PORTA,Y,$10 MUTE

JSR DBNC WAIT 150 ms JSR RETUNE2 AND RETUNE BRCLR STAT4,$80,NWWS PI CODE NOT JSR DEL500 WAIT 500ms

TRANSIENT FLAG

IN EON LIST ?

DEL500 WAIT 500ms BRSET STAT3,S08,TPOK TP OK?

LDAA #5 STAA REARET BRA NT1

TPOK LDAA

CMPA PION

PI CODE

(EON)

SWITCHED

PI YES, CHECK

BNE PINOK1

LDAA PI+1

CMPA PION+1 AGAINST PI BEQ NT2 IF OK STAY

#3

NT1 BRCLR

BCLR STAT4,$80 MAKE SURE 14B CANCELLED BSET PORTA,Y,$10 MUTE

JSR DBNC WAIT 150 ms

AND MUTE

STAT2,$80,NT2 14B FLAG LOW, BIT AGREES ?

NWWS BCLR

LDAA LED SELECTED PROG.

JSR RETUNE2 AND RETURN TO ORIGINAL PROGRAM

STAT2,$80 CLEAR FLAG

NT2 JSR

JSR KEYP EXECUTE KEY

BRCLR STAT3,$20,NSRO SHAFT ROTATION PENDING ? BCLR STAT3,$20 YES, CLEAR FLAG

BRSET STAT3,$10,ANTI DIRECTION ?

JSR PINC2 CLOCKWISE, INCREMENT

BRA NSRO

ANTI JSR NSRO BRCLR

PDEC2 ANTI-CLOCKWIRE, DECREMENT STAT3,$40,NRDSP UPDATE DATE ?

JSR MJDAT

YES, CONVERT FROM MJD

KBD READ KEYBOARD

********************************************* **

*

Idle loop (cont.). *

For More Information On This Product, Go to: www.freescale.com

34

AN494 MOTOROLA

Freescale Semiconductor, Inc...

NRDSP LDY #$1000 BRCLR STAT,$80,BTO

BRCLR PORTA,Y,$01,L5 BRSET STAT6,$04,CG6 BSET STAT6,$04 BRSET STAT6,$08,BTO BSET STAT3,$80

BRA CHE

L5 BRCLR STAT6,$04,CG6 BCLR STAT6,$04

BRSET STAT6,$08,BTO BCLR STAT3,$80 BRA CHE

CG6 BRCLR PORTA,Y,$02,L6 BRSET STAT6,$08,CHE

BSET STAT6,$08 BRA BTO

L6 BRCLR STAT6,$08,CHE BCLR STAT6,$08

BRSET STAT6,$04,BTO BCLR STAT3,$80 BRA BTO

CHE BRSET STAT6,$0C,BD3 BRA OK6

BD3

CE6 BRCLR PORTE,Y,$40,E6L

BRSET STAT6,$01,OK6 BSET STAT6,$01 BRA BTO

E6L BRCLR STAT6,$01,OK6 BCLR STAT6,$01

BTO BSET STAT,$80 LDAA #10

STAA BCTO BSET STAT5,$01

******************************** ** * Idle loop (cont.). * ** ********************************

JUST POWERED UP ?

NO, A0 LOW ?

NO, HIGH, BIT AGREES ?

NO, MAKE IT HIGH

BAND ONE ?

YES, SHAFT INTERRUPTS

AND NOTHING ELSE TO DO

YES, A0 LOW, BUT AGREES ?

NO, MAKE IT LOW

BAND ZERO ?

YES, RDS INTERRUPTS

AND NOTHING ELSE TO DO

A1 LOW ?

NO, HIGH, BIT AGREES ?

NO, MAKE IT HIGH

YES, A1 LOW, BIT AGREES ?

NO, MAKE IT LOW

BAND ZERO ?

YES, RDS INTERRUPTS

BAND 3 ?

NO, E6 LOW ?

NO, HIGH, BIT AGREES ?

NO, MAKE IT HIGH

YES, E6 LOW, BIT AGREES ?

NO, MAKE IT LOW

SET POWER-UP FLAG,

INITIALISE

AND START BAND-CHANGE TIMEOUT

TIMEOUT RUNNING?

YES, DECREMENT COUNT

FINISHED ?

YES, CLEAR FLAG

AND RECALL LAST USED PROG. No.

BAND 0 ?

NO, SHAFT INTERUPTS

TA=TP=1 ?

YES, A5 LOW

M/S=1 ?

YES, A6 LOW

MUTE

GET STORED PROG. No.

OK6 BRCLR

DEC BCTO

BNE ARI

BCLR STAT5,$01 BSR RCLP

BRCLR STAT6,$0C,ARI BSET STAT3,$80

ARI BRSET

BSET PORTA,Y,$20

TATP BCLR

PORTA,7,$20

IOOK BRSET

BSET PORTA,Y,$40

MSH BCLR IDLJ JMP RCLP BSET

PORTA,Y,$40

IDLE

PORTA,Y,$10

AN494 MOTOROLA

35

STAT5,$08,MSH BRA IDLJ

LDAB #120 JSR READ1 STAA LED

Freescale Semiconductor, Inc.

* Retune if band or SW bank inputs changed. * ** *****************************************

STAT5,$01,ARI

STAT3,$0C,TATP BRA IOOK

Application Note Code Listing

For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor, Inc...

Application Note

JMP RETUNE2

******************************** ** * Shaft rotation interrupts. * ** ********************************

SHAFT BRSET

BCLR STAT3,$10

SEM BSET TEM BSET

RTI

STAT3,$10

STAT3,$20

PORTE,Y,$20,SEM BRA TEM

SHAFTX BRSET

BCLR STAT3,$10

XEM BSET YEM BSET

RTI

STAT3,$10

STAT3,$20

PORTE,Y,$10,XEM BRA YEM

******************************** ** * Keyboard routine. * ** ********************************

KBD CLR W1 LDY #$1000

LDX #7 KEY1 LDAB W1

ADDB

STAB W1 LDAB PORTD,Y

ANDB

ADDB W1 STAB PORTD,Y

LDAA

BITA

BNE L1 DEX

BNE

CLR

BRA EXIT

L1 LDAB W1 LSLB

LSLB

LDAA

PORTE,Y ANDA #$0F

ABA

CMPA

BEQ EXIT

STAA

CLR KOUNT

EXIT INC

LDAA KOUNT

BRCLR

LDAB

BEQ

CMPA

BRA GON2

NOTCH CMPA

BRA GON2

NRML CMPA BLO

BEQ

CMPA GON2 BHI

           LDAA

           BEQ

           CLC

           RTS

#3

KCLC

GOON

#47

GOON2

KEY

RKEY

GOON2 LDAA KEY

CMPA

BEQ GOON3

#$04

#$20

PORTE,Y #$0F

KEY1 KEY

KEY

KEY

KOUNT

Freescale Semiconductor, Inc.

                PROGRAM 145170/57

                IRQ,SHAFT I/O HIGH (E5) ?

                NO, CLEAR DIRECTION BIT

                YES, SET DIRECTION BIT

                SET FLAG TO INDICATE ROTATION

                XIRQ, SHAFT I/O HIGH (E4) ?

                NO, CLEAR DIRECTION BIT

                YES, SET DIRECTION BIT

                SET FLAG TO INDICATE ROTATION

                SELECT COLUMN

                PRESERVE OTHER PORTD DATA

                READ KEYBOARD

                ANY INPUT LINE HIGH ?

                NO, TRY NEXT COLUMN

                LAST COLUMN ?

                YES, NO KEY PRESSED

                READ KEYBOARD

                SAME AS LAST TIME ?

                NO, SAVE THIS KEY

                YES, THE SAME

                REPEATING ?

                YES

                CHARACTER CHANGE ?

                YES, REPEAT AT 8 Hz

                NO, REPEAT AT 4 Hz

                NO, 3 THE SAME ?

                IF NOT DO NOTHING

                IF 3 THEN PERFORM KEY FUNCTION

                MORE THAN 3, MORE THAN 47 (750mS) ?

                TIME TO DO SOMETHING ?

                NO

                KEY PRESSED ?

                YES BUT DO NOTHING

                DEC. PROG.

For More Information On This Product, Go to: www.freescale.com

STAT,$40,NRML

PSNP

NOTCH

#8

#16

#$54

36

AN494 MOTOROLA

Freescale Semiconductor, Inc...

SEC

RTS RKEY BCLR DNT2 BCLR

STAT,$20

AN494 MOTOROLA

37

CMPA #$58 BEQ GOON3 CMPA #$52 BNE DNT2

INC.PROG.

                SLEEP

                IF NOT A REPEAT KEY, DO NOTHING

                SET REPEAT FLAG

                SOMETHING TO DO ?

                YES, SET C

                NO, CLEAR DONE FLAG

                CLEAR REPEAT FLAG

                CLEAR COUNTER

                ANYTHING TO DO ?

                YES, GET KEY

                DEC. PROG. (M)

                INC. PROG. (S)

                SLEEP

                NOT A REPEAT KEY, FLAG SET ?

                FETCH KEYCODE

                THIS ONE ?

                YES

                NO, LAST CHANCE ?

                YES, ABORT

                NO TRY THE NEXT KEY

                0

                1

                2

                3

                4

                5

                6

                7

                8

                9

                ALARM

                STORE/SET

For More Information On This Product, Go to: www.freescale.com

GOON3 BSET

CLR KOUNT

GOON LDAA

BEQ RKEY

STAT,$40 CLR KOUNT

KCLC CLC DNT RTS

******************************** ** * Execute key. * ** ********************************

KEYP BCC DNT KEYP2 LDAA KEY

CMPA #$54

BEQ RPT

CMPA #$58

BEQ RPT

CMPA #$52

BEQ RPT

BRSET STAT,$20,DNT

RPT CLRB

RJ LDX #CTAB

ABX

LDAA 0,X CMPA KEY BEQ PJ CMPA LAST BEQ DNT ADDB #4 BRA RJ

PJ BSET STAT,$20 JSR 1,X

JMP P5170

******************************** ** * Keyboard jump table. * ** ********************************

CTAB FCB $11 JMP DIGIT

FCB $21 JMP DIGIT FCB $22 JMP DIGIT FCB $24 JMP DIGIT FCB $31 JMP DIGIT FCB $32 JMP DIGIT FCB $34 JMP DIGIT FCB $41 JMP DIGIT FCB $42 JMP DIGIT FCB $44 JMP DIGIT FCB $48 JMP ALARM FCB $38 JMP SAVE

STAT,$40

KEY

Freescale Semiconductor, Inc.

Application Note Code Listing

Freescale Semiconductor, Inc...

ALARM BRCLR

BRCLR STAT4,$10,ALOF

BCLR STAT4,$10 BRA UDCNT

ALARM DISPLAY

YES, ALARM ON

YES, SWITCH OFF

NO, SWITCH ON

NO, ENABLE ALARM DISPLAY

ALARM DISPLAY FLAG

CANCEL SET-UP

3 SECONDS TIMEOUT

SET DISPLAY TRANSIENT FLAG

CLEAR DISPLAY TRANSIENTS

CANCELL SLEEP TIMER & TA SWITCH FLAG

CANCEL STORE MODE

ON ?

NO, SWITCH ON

WAIT 500ms

AND DEMUTE

YES, SWITCH OFF

AND MUTE

ALOF BSET

BRA UDCNT

ADON JSR

BSET STAT4,$08

UDCNT BCLR

LDAA #25

STAA DIST

BSET STAT4,$01 ABOA RTS

******************************** ** * On/off key. * ** ********************************

ONOFF JSR

BCLR STAT4,$82

CLTR BCLR STAT5,$40

ALRON BSET

BSET PORTA,Y,$10

RTS

******************************** ** * PS name clear. * ** ********************************

PSC LDX #PSN LDAA #$FF

CPSL STAA 0,X INX

CPX #PSN+8 BNE CPSL RTS

$68

Freescale Semiconductor, Inc.

Application Note

FCB $18 JMP ONOFF FCB $14 JMP CLEAR FCB $12 JMP MODE FCB $52 JMP SLEEP FCB $54 JMP PDEC FCB $58 JMP PINC FCB $61 JMP RTDSP FCB $62 JMP TPEN FCB $64 JMP T910 FCB $51 JMP TFCC

ON/OFF

CLEAR/STEP

MODE (PROG./FREQ.)

SLEEP TIMER START

DEC. PROG./FREQ./CHAR.

INC. PROG./FREQ./CHAR.

RDS DISPLAYS

TRAFFIC ENABLE (TOGGLE)

MW STEP 9/10kHz (TOGGLE)

COLON CONTROL

TA TEST

LAST FCB

JMP TEST

******************************** ** * Alarmkey. * ** *******************************

STAT4,$08,ADON

ON ? ?

STAT4,$10

CLTR

STAT4,$20

BRCLR PORTD,Y,$20,ALRON

SODM BCLR

JSR DEL500

BCLR PORTA,Y,$10 RTS

PORTD,Y,$20

PORTD,Y,$20

38

AN494 MOTOROLA

For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor, Inc...

INSLP LDAA SLEP STAA

#60

******************************** ** * TP. * ** ********************************

TPEN BRSET

BRSET STAT,$01,NS1

BRSET STAT5,$20,TAEH BSET STAT5,$20

RTS

STANDBY ?

NO, NORMAL MODE ?

NO, FREQ. MODE, NVM DISABLE FLAG SET ?

NO, SET IT

YES, CLEAR IT

NORMAL MODE, TRAFFIC ON ?

YES, DISABLE

NO, ENABLE

ALREADY SLEEP DISPLAY ?

NO, SLEEP TIMER ALREADY RUNNING ?

NO, INITIALISE SLEEP TIMER

START SLEEP TIMER

YES, CLEAR DISPLAY TRANSIENTS

SLEEP DISPLAY

NO DECREMENT IF FIRST TIME

DECREMENT SLEEP TIMER

START DISPLAY TRANSIENT

ALREADY ON ?

TAEH BCLR HIGH RTS

NS1 BRCLR

BCLR STAT4,$04

RTS TPOF BSET

RTS

STAT4,$04

SLEPT BSET STAT4,$02

STR JSR

BSET STAT5,$04

CLTR BRA SLPTOK

DECS LDAA

SUBA #5

STAA SLEPT BMI INSLP

SLPTOK LDAA

STAA DIST

BSET STAT4,$01

BRSET PORTD,Y,$20,SODM BCLR PORTA,Y,$10

RTS

******************************** ** * Number entry routine. * ** ********************************

DIGIT BRSET PORTD,Y,$20,AB03 JSR CLTR

LSRB

LSRB

BRSET STAT,$01,SKP BRSET STAT5,$40,SKP BSET STAT5,$10 BLCR STAT5,$20 STAB W3

BRCLR STAT,$04,SHIFT BCLR STAT,$04

JSR CLQ

SHIFT BSR DR1 LDX W1

AGS LDAA 1,X STAA 1,X

                STATION MODE ?

                NO, STORE MODE ?

                NO, SET RETUNE FLAG (FREQUENCY MODE)

                AND CLEAR TA INHIBIT BIT (NVM)

                CLEAR Q ?

                YES, CLEAR FLAG

                AND CLEAR Q

                W1: MSD, W2: LSD

                MOVE ALL DIGITS

                UP ONE PLACE

                DONE ?

                YES, RECOVER NEW DIGIT

                AND PUT IT IN LSD

For More Information On This Product, Go to: www.freescale.com

AN494 MOTOROLA

39

INX

CPX W2 BNE AGS LDAA W3 STAA 0,X RTS

SLEPT

#25

Freescale Semiconductor, Inc.

PORTD,Y,$20,HIGH

STAT5,$20

STAT4,$04,TPOF

******************************** ** * Sleep timer. * ** ********************************

SLEEP BRSET

BRSET STAT4,$02,STR

STAT5,$04,DECS

YES, JUST

STANDBY ?

NO, CLEAR

DEMUTE

DISPLAY TRANSIENTS

Application Note Code Listing

Freescale Semiconductor, Inc...

DR1 LDX

STX W1

LDAB #5 ABX

STX W2

ABO3 RTS

DEL500 LDX #255 JSR SKDB LDX #255 JMP SKDB

******************************** ** * Increment key (& knob). * ** *******************************

PINC2 BRSET

BRSET STAT4,$08,TOG57

BRSET PORTD,Y,$20,DMI LDAB PSNP

BNE PSN0

JMP UP

PINC BRSET TOG57J BRSET

STAT4,$20,ALSU1

STAT4,#08,TOG57

ALSU1 BRSET LDAA

STAT4,$40,IHR

BSET

BCLR DMI RTS

STAT4,$01

PORTA,Y,$10

#RQ

BRSET PORTD,Y,$20,DMI BRSET STAT,$01,NACS JMP UP

******************************** ** * Alarm inc. (hours/minutes). * ** ********************************

AMIN CMPA #59

BHS TOOH INC AMIN BRA T5S

TOOH CLR AMIN BRA T5S

IHR LDAA AOUR CMPA #23

BLO HTOH CLR AOUR BRA T5S

HTOH INC AOUR

T5S LDAA

STAA DIST

NACS LDAB PSNP

BEQ

CONTI

#80

Freescale Semiconductor, Inc.

Application Note

SKP BSET PORTA,Y,$10 TBA

STAA LED JMP RETUNE

******************************** ** * Save pointers & 500ms delay. * ** ********************************

MUTE

STORE POINTERS

                ALARM SET-UP ?

                NO, ALARM DISPLAY ?

                NO,STANDBY ?

                NO,PS EDIT MODE ?

                NO, STEP UP

                ALARM SET-UP ?

                NO, ALARM DISPLAY ?

                NO, STANDBY ?

                NO, FREQ. MODE ?

                YES, STEP UP

                YES, SET-UP HOURS ?

                NO, MINUTES

                10 SECOND TIMEOUT

                SET DISPLAY TRANSIENT FLAG

                DEMUTE

                NO, PS EDIT MODE ?

For More Information On This Product, Go to: www.freescale.com

STAT4,$20,ALSU1

40

AN494 MOTOROLA

Freescale Semiconductor, Inc...

CMPA #$20 BLS MAK20 CMPA #$2E BLS MAK2E CMPA #$30 BLO MAK30 CMPA #$39 BLS CNTB CMPA #$41 BLO MAK41 CMPA #$5A BLS CNTB CMPA #$61 BLO MAK61 CMPA #$7A BLS CNTB

MAK20 LDAA #$20 BRA CNTB MAK2E LDAA #$2E BRA CNTB MAK30 LDAA #$30 BRA CNTB MAK41 LDAA #$41 BRA CNTB MAK61 LDAA #$61

CNTB STAA 0,X LDAA #80

JMP OUTCH

TOG57 BRCLR STAT4,$10,DMI BRCLR STAT5,$80,A7

BCLR STAT5,$80

BRA T5S

A7 BSET STAT5,$80

BRA T5S

******************************** ** * Program number increment. * ** ********************************

CONTI BSET PORTA,Y,$10 BSET STAT2,$08

LDAA LED

BRSET STAT2,$80,IOK INCA

CMPA #9

BLS IOK

CLRA

IOK STAA LED JMP RETUNE

******************************** ** * Decrement key (& knob). * ** ********************************

PDEC2 BRSET STAT4,$20,ALSU2 BRSET STAT4,$08,TOG57 BRSET PORTD,Y,$20,DMD

SPACE

LESS OR EQUAL ?

NO, .

LESS OR EQUAL ?

NO, 0

LESS ?

NO, 9

LESS OR EQUAL ?

NO, A

LESS ?

NO, Z

LESS OR EQUAL ?

NO, a

LESS ?

NO, z

LESS OR EQUAL ?

MAKE SPACE

MAKE .

MAKE 0

MAKE A

MAKE a

AN494 MOTOROLA

41

LDAB PSNP BNE PSN1 JMP DOWN

                ALARM ARMED ?

                YES, 7-DAY ALARM ?

                NO, MAKE IT 7 DAY

                YES, MAKE IT 5 DAY

                MUTE

                PROG. No. INCREMENT, UPDATE DISPLAY

                IF SWITCHED TO TA DON’T INCREMENT

                NEXT PROG.

                TOO HIGH ?

                YES, BACK TO ZERO

                ALARM SET-UP ?

                NO, ALARM DISPLAY ?

                NO, STANDBY ?

                NO, PS EDIT MODE ?

                NO, STEP DOWN

For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor, Inc.

********************************************** ** * P-S Edit inc. (ASCII) and 5/7 day toggle * ** **********************************************

PSN0 LDX #PSN-1 ABX

LDAA 0,X

INCA INCREMENT ASCII

YES

VALUE

Application Note Code Listing

Freescale Semiconductor, Inc...

ALSU2 BRSET

TST AMIN

BEQ MZ DEC AMIN BRA T5SD

MZ LDAA #59 STAA AMIN BRA T5SD IHRD TST AOUR

BNE HZ LDAA #24 STAA AOUR

HZ DEC AOUR

T5SD LDAA

STAA DIST

BSET STAT4,$01

BCLR PORTA,Y,$10 DMD RTS

NACS2 LDAB PSNP BEQ CONTD

******************************** ** * P-S Edit dec. (ASCII). * ** ********************************

PSN1 LDX #PSN-1 ABX

LDAA

DECA

CMPA

BLS

CMPA

BLS

CMPA

BLO

CMPA

BLS

CMPA

BLO

CMPA

BLS

CMPA

BLO

CMPA

BLS

0,X

#$20

MKE7A

#$2E

MKE20

#$30

MKE2E

#$39

CNTS

#$41

MKE39

#$5A

CNTS

#$61

MKE5A

#$7A

CNTS

#$20

YES

DECREMENT ASCII

SPACE

LESS OR EQUAL ?

NO, .

LESS OR EQUAL ?

NO, 0

LESS ?

NO, 9

LESS OR EQUAL ?

NO, A

LESS ?

NO, Z

LESS OR EQUAL ?

NO, a

LESS ?

NO, z

LESS OR EQUAL ?

MAKE SPACE

MAKE .

MAKE Z

MAKE z

MAKE A

VALUE

MKE20 LDAA

BRA CNTS

MKE2E LDAA

BRA CNTS

MKE5A LDAA

BRA CNTS

MKE7A LDAA

BRA CNTS

MKE39 LDAA

CNTS STAA 0,X

#$39 LDAA #80

OUTCH STAA DIST

BSET BCLR RTS

STAT4,$01

STAT4,$08

SET DISPLAY TRANSIENT FLAG

NOT ALARM DISPLAY MODE

#$2E

#$5A

#$7A

Freescale Semiconductor, Inc.

Application Note

PDEC BRSET

BRSET STAT4,$08,TOG57

BRSET PORTD,Y,$20,DMD BRSET STAT,$01,NACS2 JMP DOWN

******************************** ** * Alarm dec. (hours/minutes).* ** ********************************

ALARM SET-UP ?

NO, ALARM DISPLAY ?

NO, STANDBY ?

NO, FREQ. MODE ?

YES, STEP DOWN

YES, SET-UP HOURS ?

NO, MINUTES

10 SECOND TIMEOUT

SET DISPLAY TRANSIENT FLAG

DEMUTE

PS EDIT CHARACTER CHANGE ?

STAT4,$20,ALSU2

STAT4,$40,IHRD

#80

42

AN494 MOTOROLA

For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor, Inc...

******************************** ** * Program number decrement. * ** ********************************

CONTD BSET PORTA,Y,$10 LDAA LED

BRSET STAT2,$80,RETUNE PNM1 DECA

BPL SK2P

LDAA #9 SK2P STAA LED

RETUNE PSHA

LDAB #120

JSR WRITE1

PULA

BRCLR STAT4,$80,RETUNE2 BCLR STAT4,$80

LDAA #9

STAA REARET

RTS

RETUNE2 JSR DOIT JSR P5170

LDX #64

JSR SKDB

BCLR PORTA,Y,$10 BCLR STAT2,$02 BCLR STAT3,$01 BCLR STAT,$10 RTS

FOK LDAB #10 MUL

ADDB #$5C STAB SMEM ADCA #$26 STAA SMEM+1 JMP NEW

******************************** ** * Tune to TA (using EEPROM data)* ** ********************************

TASW CLRB

TPIC ADDB #10

JSR READ1 INCB

CMPA PION BNE TNP DECB

JSR READ1 CMPA PION+1 BNE TNP SUBB #12 JSR READ1 PSHA

ANDA #$80 BEQ TASOK LDAA #8 BRA ABTA

TASOK PULA

STAA SMEM+1

JSR NEWSUB2 JMP NEW

TNP CMPB #252 BLO TPIC

PSHA

LDAA #7 ABTA STAA REARET

PULA

MUTE

PROG. No. DECREMENT

IF SWITCHED TO TA DON’T DECREMENT

DECREMENT PROGRAM NUMBER

TOO FAR ?

SAVE NEW PROGRAM NUMBER

CHANGE PROGRAM NUMBER IN NVM

AN494 MOTOROLA

                FIND PI

                MSB OK ?

                LSB OK ?

                YES, FOUND IT

                NVM INHIBIT FLAG SET ?

                NVM INHIBIT MESSAGE

                TRY NEXT RECORD

For More Information On This Product, Go to: www.freescale.com

43

Freescale Semiconductor, Inc.

TA SWITCHED

YES, MANUAL

NEW PROGRAM

WAIT 100ms

?

RETURN FROM TA

DEMUTE

KILL ANY PENDING RDS GROUP

AND INHIBIT FM PS-NAME CLEARING

RE-ENABLE RDS DATA CLEARING

Application Note Code Listing

Freescale Semiconductor, Inc...

Application Note

STORE BCLR BRCLR

BSET SKTA LDAA

           JSR

           LDAA

           JSR

           LDAA

           CMPA

           BEQ

           CMPA

           BNE

PSNOK LDAA JSR

           LDAA

           JSR

           LDAA

           JSR

           LDAA

           JSR

           LDAA

           JSR

           LDAA

           JSR

           LDAA

           JSR

           LDAA

           JSR

           LDAA

           JSR

           LDAA

           BRA

PSOK JRS LDAA

           JSR

           LDAA

           JSR

           LDAA

           JSR

           LDAA

           JSR

           LDAA

           JSR

           LDAA

           JSR

           LDAA

           JSR

           LDAA

           JSR

           LDAA

FINST JSR BCLR

SMEM+1,$80

STAT5,$20,SKTA

SMEM+1,$80

SMEM+1

WRITE1

SMEM

WRITE1

PSN

#$A0

PSNOK

#$FF

PSOK

#$FF

WRITE1

DISP+10

WRITE1

DISP+11

WRITE1

DISP+12

WRITE1

DISP+13

WRITE1

DISP+14

WRITE1

DISP+15

WRITE1

#$20

WRITE1

#$00

WRITE1

#$00

FINST

WRITE1

PSN+1

WRITE1

PSN+2

WRITE1

PSN+3

WRITE1

PSN+4

WRITE1

PSN+5

WRITE1

PSN+6

WRITE1

PSN+7

WRITE1

PI

WRITE1

PI+1

WRITE1

STAT5,$40

TA NVM INHIBIT FLAG SET ?

BINARY FREQUENCY MSB

BINARY FREQUENCY LSB

PS NAME OK ?

PERHAPS, TRY FF

BCLR STAT4,$80 RTS

******************************** ** * Program store/recall. * ** *******************************

PI MATCH NOT FOUND, FORGET IT

DOIT BRSET

LDAB #12

MUL

BRSET STAT5,$40,STORE JMP RECALL

******************************** ** * NVW write, sub-address in X. * ** ********************************

RTS

Freescale Semiconductor, Inc.

STAT2,$80,TASW

DUMMY PI CODE

PI CODE

CLEAR STORE MODE

44

AN494 MOTOROLA

For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor, Inc...

******************************** ** * NVW read, sub-address in X. * ** ********************************

RECALL BSR

JMP NEW

NEWSUB JSR

STAA SMEM+1

BCLR STAT5,$20

BRCLR SMEM+1,$80,NEWSUB2 BSET STAT5,$20

NEWSUB2 JSR

CMPA #$FF

BNE NOTFF2 LDAA #$26 STAA SMEM+1 LDAA #$5C

NOTFF2 STAA

JSR READ1

STAA PSN JSR READ1 STAA PSN+1 JSR READ1 STAA PSN+2 JSR READ1 STAA PSN+3 JSR READ1 STAA PSN+4 JSR READ1 STAA PSN+5 JSR READ1 STAA PSN+6 JSR READ1 STAA PSN+7 RTS

******************************** ** * NVW read & write one byte. * ** ********************************

READ1 JSR

LDAA 0,X

INCB RTS

WRITE1 LDY

BSET PPROG,Y,$16

BSR WBYTE

JSR DBOUNC BSET PPROG,Y,$02 DECB

WBYTE JSR

STAA 0,X

BSET PPROG,Y,$01 JSR DBOUNC

CLR PPROG,Y INCB

RTS

GETAD PSHA PSHB

AN494 MOTOROLA

45

JSR BAND LDX #$B618 TBA

CMPA #1 BLS FMB LDAB #122 ABX

CMPA #2 BEQ FMB

NEWSUB

READ1

READ1

SMEM

GETAD

#$1000

GETAD

Freescale Semiconductor, Inc.

$04 $2E

                SET EELAT, ERASE & BYTE ERASE BITS

                ERASE BYTE

                WAIT 15 ms

                SET EELAT TO WRITE BYTE

                LATCH DATA

                SET EEPGM BIT TO START PROGRAMMING

                WAIT 15 ms

                STOP

                GET BAND

                EEPROM START ADDRESS

FM ? NO, AM MW ?

For More Information On This Product, Go to: www.freescale.com

Application Note Code Listing

Freescale Semiconductor, Inc...

PORTD,Y,$20,SRT BRCLR STAT2,$04,NORT

NOTRT BSET

LDAA RTDIS

INCA

CMPA #26

BEQ NORT STAA RTDIS LDAA #100 STAA DIST BSET STAT4,$01 RTS

NORT JSR

BSET STAT2,$04

LDAA #9 STAA DISP1 LDAA #1 STAA DISP2 RTS

Freescale Semiconductor, Inc.

Application Note

ABX

BRCLR PORTE,Y,$40,SWB2 ABX

SWB2

* BRCLR PORTE,Y,$80,FMB

* ABX

* ABX

FMB PULB

PULA ABX RTS

******************************** ** * RDS displays. * ** ********************************

NO, SW

SECOND BANK ?

YES

SECOND PAIR OF BANKS ?

YES

STANDBY ?

ALREADY RDS DISPLAY ?

ALREADY RT DISPLAY ?

SET RDS DISPLAY FLAG

YES, MOVE ON

RE-START TRANSIENT TIMEOUT

SET RT DISPLAY FLAG

RTDSP BRSET

BRSET STAT5,$02,NOTRT

STAT5,$02

CLTR

************************************* ** * Increment and decrement routines. * ** *************************************

UP BSR LDXR

IF INC BNE INC

TT1 DECB BNE

SMEM

TT1

SMEM+1

NO, INCREMENT LSB

DID IT WRAP ROUND

YES, INCREMENT MSB

ALL DONE ?

NO, IS LSB ZERO ?

IF NOT LEAVE MSD

DECREMENT MSB

DECREMENT LSB

ALL DONE ?

DEMUTE

AM ?

YES, CLEAR PS NAME

NO, FM, ENABLE PS NAME CLEARING

GET BAND

SINGLE STEP (1,5,10 kHz FOR MW,SW,FM)

LARGE STEPS SELECTED ?

YES, BAND 3 (SW) ?

DF TST BNE DEC TT2 DEC

DECB

SMEM

TT2

SMEM+1

SMEM

LDXR2 BSET NFMB JSR TBA

STAT3,$01

BAND

#1

STAT,$02,SRT

#3

IF BRA NEWJ

DOWN BSR LDXR

BNE

NEWJ JSR NEW

BCLR RTS

LDXR BRCLR BSET

PORTA,Y,$10

STAT6,$08,LDXR2

DF JSR P5170

STAT2,$40 BRA NFMB

LDAB

BRCLR

CMPA

46

AN494 MOTOROLA

For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor, Inc...

BEQ SRT

LDAB #5

CMPA #2

BNE SRT

LDAB #9

BRCLR STAT6,$40,SRT INCB

SRT RTS

******************************** ** * TAtest. * ** ********************************

NO, x5 STEP (50 kHz FOR FM)

MW ?

YES, 9kHz

OR SHOULD IT BE 10kHz

YES

STANDBY ?

CLYDE 1

TA SWITCHING ENABLED ?

NO, SET RETURN REASON

YES, DO IT

ALARM DISPAY ?

YES, ALARM ARMED ?

YES, ALREADY SET-UP MODE ?

NO, ENTER SET-UP MODE, HOURS

YES, SET-UP HOURS ?

NO, CANCEL SET-UP

YES, MAKE IT MINUTES

STANDBY ?

NO, FREQUENCY MODE ?

YES, STORE MODE ?

NO, ENTER STORE MODE

SAVE

NOT FREQUENCY MODE

SET

UP

PS-NAME CHANGE MODE

SET DISPLAY TRANSIENT FLAG

TEST BRSET

LDD #$C5B1

STD PION

BRSET STAT4,$04,NABT LDAA #1

STAA REARET

AOB RTS NABT BSET

RTS

STAT4,$80

******************************** ** * Store key. * ** ********************************

SAVE BRCLR STAT4,$08,NAME BRCLR STAT4,$10,NTB2 BRSET STAT4,$20,AISM

BSET STAT4,$60 A5SD LDAA #80

BRA SDT

AISM BRSET STAT4,$40,MSM BCLR STAT4,$20

BRA A5SD

MSM BCLR STAT4,$40

BRA A5SD

NAME BRSET PORTD,Y,$20,NTB2 BRSET STAT,$01,NFM

BRSET STAT5,$40,ASM BSET STAT5,$40 RTS

ASM LDAA LED JMP DOIT

NFM LDAA PSNP BNE SKPCLR

JSR CLTR SKPCLR INC PSNP LDAA PSNP

CMPA #8 BLS NTB3 CLR PSNP

NTB3 LDAA #80 SDT STAA DIST

BSET STAT4,$01 NTB2 RTS

AN494 MOTOROLA

******************************************* ** * PROG, the displayed number is added to * * the IF offset, converted to binary and * * stored in SMEM & SMEM+1. * ** * NEW takes binary working frequency * * in SMEM & SMEM+1 converts it to BCD and * * subtracts the IF offset. * ** *******************************************

For More Information On This Product, Go to: www.freescale.com

47

Freescale Semiconductor, Inc.

PORTD,Y,$20,AOB

Application Note Code Listing

Freescale Semiconductor, Inc...

IPO BSR BRSET

CMPB BHI LDAB

BAND

PORTA,Y,$04,NOTN

#1

NOTN

#4

NOTN LDAA #6 MUL

LDX #1FS ABX

LDY #RP

                FIND BAND

                NEGATIVE FM IF ?

                YES

                BUT IS IT FM ?

                YES, FIFTH IS FROM TABLE

TIMES 6

                TRANSFER

                INTO RP

                DONE ?

                RE-INITIALISE Y

                SET-UP POINTERS

                 10.70 MHz FM OSC HIGH

                 10.70 MHz FM OSC HIGH

                   455 kHz SW/MW

                 10.70 MHz SW (EXT/5 FOR 5157)

                –10.70 MHz FM OSC LOW

                GET BAND

                BAND 3 (SW, /5) ?

For More Information On This Product, Go to: www.freescale.com

LP6 LDAA STAA

0,X 0,Y

INX

INY

CPY #RP+6

BLO

LDY

LDX

STX NUM2 LDX #RQ STX NUM1 RTS

IFS FCB FCB FCB FCB FCB

BAND LDAB

ANDB #$03

LDX #RQ STX NUM2

LP6

#$1000

#RP

Freescale Semiconductor, Inc.

Application Note

PROG BRSET STAT,$01,NEW JSR IFO

JSR ADB

JSR BAND BNE ONE JSR ADD LDX #5

LPP LDAA RQ-1,X STAA RQ,X

STATION MODE ?

P < IF OFFSET

Q < FREQ + IF

BAND 3 (SW) ?

YES, DIVIDE BY 5, Q < 2 X (FREQ + IF)

MOVE ALL DIGITS

IN Q DOWN ONE DEX PLACE TO DEVIDE

BNE LPP ONE JSR BCON NEW JSR DCON

JSR BAND BNE STIF STX NUM1 LDX #RP JSR ADD LDX #RP STX NUM1 LDX #RQ JSR ADD LDX #RQ JSR ADD

STIF JSR IFO BSET STAT,$04

JMP SUB

BY 10 (Q < Q/5)

CONVERT Q TO BINARY

CONVERT TO BCD IN Q

******************************************* ** * The IF offset is selected according to * * the required band and placed in “RP.” * ** *******************************************

0,0,1,0,7,0

0,0,1,0,7,0

0,0,0,4,5,5

0,1,0,7,0,0

9,9,8,9,3,0

PORTA,Y

BAND 3 YES

P< 2Q

Q< 3Q Q< 5Q

(SW) ?

OFFSET

Q< (RATIO X STEP) -IF

P< IF

48

AN494 MOTOROLA

CMPB RTS

#3

Freescale Semiconductor, Inc...

******************************** ** * Mode change & clear routines.* ** ********************************

MODE BRSET

JSR CLTR

STANDBY ?

SEND DISPLAYED FREQUENCY

FREQUENCY MODE ?

NO, SET TO FREQUENCY MODE

FREQ. MODE, CLEAR STORE MODE

NEW FREQUENCY ENTERED ?

YES, MUTE

WAIT 15ms

WAIT 100ms

DE-MUTE

AND KILL ANY PENDING RDS GROUP

CLEAR RETUNE FLAG

NO, RETURN TO STATION MODE

CANCEL STORE MODE

STANDBY ?

NO, STATION MODE ?

FREQUENCY CHANGED

NO, CLEAR Q

CLEAR DISPLAY TRANSIENTS

9 (MW), 50 (FM) kHz STEPS

1 (MW), 10 (FM) kHz STEPS

CLEAR RQ

CLEAR 6 BYTES

STARTING AT X

DONE ?

CLEAR DISPLAY TRANSIENT FLAG

CANCEL RT DISPLAY

NOT ALARM (DISPLAY OR SET-UP)

NOT RT OR SLEEP DISPLAY

NOT PS-EDIT

PORTD,Y,$20,CLP JSR PROG

SKIP BRCLR

BCLR STAT,$01

RTS

SK BCLR

BRCLR STAT5,$10,NNTR

BSET PORTA,Y,$10 JSR DBNC

JSR P5170

LDX #64

JSR SKDB

BCLR PORTA,Y,$10 BCLR STAT2,$02

SKSM BCLR RTS

NNTR BSET

BCLR STAT5,$40

RTS

CLEAR BRSET

BRSET STAT,$01,SM

CLAL BSR SM LDAA

CLQ

SPCC JSR

BRSET STAT,$02,KHZ

BSET STAT,$02 RTS

KHZ BCLR

CLP RTS

CLQ LDX

CLRAS LDAA

STAT,$02

#RQ

CR CLR INX

0,X

CLTR BCLR CLTR2 BCLR

STAT4,$01

L2 LDAA LSLA

SMEM LS BYTE 2xLSB

AN494 MOTOROLA

49

#06 STAA COUNT

DEC COUNT BNE CR RTS

STAT2,$04 CLR RTDIS

BCLR STAT4,$28 BCLR STAT5,$06 CLR PSNP

RTS

CLTR

Freescale Semiconductor, Inc.

STAT,$01,SK

STAT5,$40

STAT5,$10

STAT,$01

PORTD,Y,$20,CLP BSET STAT5,$10

PSNP BEQ SPCC

JSR PSC

******************************************** ** * BCD to binary conversion. No, in “RQ” is * * converted to binary in SMEM & SMEM+1. * ** ********************************************

BCON CLR

CLR SMEM+1 FREQUENCY LOCATIONS LDX #0

STAA W1 ROL SMEM+1 LDAA SMEM+1 STAA W2

                SAVE 2xLSB

                2xMS BYTE

SAVE 2xMSB

For More Information On This Product, Go to: www.freescale.com

SMEM CLEAR WORKING

Application Note Code Listing

Freescale Semiconductor, Inc...

#$FF LDAB COUNT

JSR WRITE1 INC COUNT BNE CLOP CLRA

LDAB #120 JMP WRITE1

CLEAR MAX. PROG. No.

CLR INC BRA

CARRY

CARRY

AD

ADD CLR CARRY

STX

AD LDAB #$06

LDX

STX W3

LDAA 5,X DEX

STX W3 LDX W4

NUM2 STX W4 LOOP LDX W3

LDX

ADDA

DEX

STX W4

W5

NUM1

5,X

Freescale Semiconductor, Inc.

Application Note

CLRNVW CLR CLOP LDAA

COUNT

LDAA W1 LSLA

ROL SMEM+1 LSLA

ROL SMEM+1 ADDA W1 STAA SMEM LDAA SMEM+1 ADCA W2 STAA SMEM+1 ADCA W2 STAA SMEM+1 INX

LDAA RQ,X ADDA SMEM STAA SMEM LDAA #0 ADCA SMEM+1 STAA SMEM+1 CPX #5 BNE L2 RTS

******************************** ** * Clear NVM – not used. * ** ********************************

2xLSB

4xLSB

4xMSB

8xLSB

8xMSB

10xLSB

10xMSB

FETCH

NEXT

DIGIT

AND

(CLRA CLEARS THE C BIT)

ADD IT TO WORKING

FREQUENCY

DONE ?

******************************************** ** * Addition and subtraction of BCD numbers. * ** ********************************************

SUB STX

COM2 LDX

COMP LDAB

LOOP3 LDAA #$09

                ANSWER POINTER

                9S COMPLIMENT

                SECOND NUMBER

                SUBTRACT FROM 9

                AND PUT IT BACK

                SET CARRY TO ONE

                BEFORE ADDING

                ADD FIRST NUMBER

                ANSWER POINTER

                1st No. POINTER

                2nd No. POINTER

ADD

                SET ON ADDITION OVERFLOW

                OR POS. RESULT SUBTRACTION

                DECIMAL ADJUST

For More Information On This Product, Go to: www.freescale.com

SUBA

STAA

DEX

DECB

BNE LOOP3

W5 NUM2 #$06

5,X 5,X

50

AN494 MOTOROLA

ADDA CLR BSR

CARRY

CARRY

ADJ

Freescale Semiconductor, Inc...

DBOUNC LDX SKDB STX DLP LDX DLOOP BRN

#10 APPROX 15mS WITH A 8.388 MHz XTAL W6 X x 1.5mS

#$FF PAUSE

” 256X12

LDX W5 STAA 5,X DEX

STX W5 DECB

BNE LOOP RTS

SAVE ANSWER

DONE ?

YES, SUBTRACT 10

AND RECORD CARRY

10 OR MORE ? NO

AJ SUBA

INC CARRY

ADJ CMPA

BHS AJ

RTS

BRN ” DEX

BNE DLOOP DEC W6+1 BNE DLP

ABO RTS

CYCLES

AN494 MOTOROLA

51

LDAA #0

BSR SQU8I

BSET PORTB,Y,$10

#10

#10

Freescale Semiconductor, Inc.

****************************************** ** * Current binary divide ratio in SMEM & * * SMEM+1 is converted to decimal in RQ. * ** ******************************************

DCON LDAA SMEM+1 STAA W2

LDAA SMEM

STAA W1 DCON2 LDX #RR

STX NUM1 JSR CLRAS INC RR+5 JSR CLQ LDAA #14 STAA W6

LOOP2 LSR W2 ROR W1

BCC NXT LDX #RQ STX NUM2 BSR ADD

NXT LDX #RR STX NUM2

BSR ADD DEC W6 BNE LOOP2 RTS

******************************** ** * Delay (X x 1.5mS). * ** ********************************

TRANSFER CURRENT

FREQUENCY DIVIDE

RATIO INTO

WORKING AREA

CLEAR

RR

RR <- 1

CLEAR RQ

14 BITS TO CONVERT

MOVE OUT

FIRST (LS) BIT

ZERO

ONE, ADD

CURRENT VALUE

OF RR

ADD RR

TO

ITSELF

ALL

DONE ?

DBNC LDX

BRA SKDB

#100 150mS

******************************************* ** * Serial output routine to the MC145170. * ** *******************************************

P5170 BCLR

BCLR PORTB,Y,$10

CLOCK LOW

LE LOW

CLEAR

CONTROL REGISTER

LATCH IT

PORTB,Y,$01

Application Note Code Listing

For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor, Inc...

P5157

SQU7I LSLA LDAB S1I LSLA

BCC

BSET S21 BSET BCLR

#7

S2I

PORTB,Y,$02

PORTB,Y,$01

PORTB,Y,$01

SQU7 LSLA LDAB

S1 LSLA

BCC

BSET

S2 BCLR BSET

#7

S2

PORTB,Y,$02

PORTB,Y,$01

PORTB,Y,$01

BCLR PORTB,Y,$02 DECB

BNE RTS

SQU8 LDAB

BRA S1

BCLR PORTB,Y,$02 DECB

BNE RTS

S1

#8

S1I

#8

Freescale Semiconductor, Inc.

Application Note

BCLR PORTB,Y,$10 LDAA SMEM+1 ANDA #$7F

BSR SQU8I

LDAA SMEM

BSR SQU8I

BSET PORTB,Y,$10

BCLR PORTB,Y,$10 LDAA #$03

BSR SQU7I

LDAA #$20

BSR SQU8I

BSET PORTB,Y,$10

LE LOW

SEND MSBYTE

AND LSBYTE OF

NEW FREQUENCY

LATCH IT

LE LOW

SEND

REFERENCE

DIVIDE RATIO

800 = 8MHz/10kHz

LATCH IT

****************************************** ** * Serial output routine to the MC145157. * *** ******************************************

LDAA SMEM LSLA

STAA W4 LDAA SMEM+1 ROLA

BSR SQU7

LDAA W4

BSR SQU8

BSET PORTB,Y,$08 BCLR PORTB,Y,$08 LDAA #$4E

BSR SQU7

LDAA #$21

BSR SQU8

BSET PORTB,Y,$08 BCLR PORTB,Y,$08 RTS

TRANSFER

MEM+1 TO

LOCATIONS AND MOVE

UP ONE BIT TO INCLUDE

THE 5157 CONTROL BIT.

SEND MSBYTE (7 BITS)

AND LSBYTE OF

NEW FREQUENCY

LATCH

IT

SEND 15 BIT (14+1)

REFERENCE

DIVIDE RATIO

LATCH IT

ALL LOW (5157/70 SWITCHED OFF)

************************************** ** * Subroutines for the MC145157/170. * ** **************************************

SQU8I LDAB

BRA S1I

SEND 8 BITS

                MOVE OUT MS BIT

                AND SEND OTHER 7

                MOVE I BIT INTO “C”

                ZERO ?

                NO

                CLOCK

                IT

ANY MORE ?

SEND 8 BITS

                MOVE OUT MS BIT

                AND SEND OTHER 7

                MOVE 1 BIT INTO “C”

                ZERO ?

                NO

                CLOCK

                IT

ANY MORE ?

For More Information On This Product, Go to: www.freescale.com

SMEM AND

TEMPORARY

52

AN494 MOTOROLA

Freescale Semiconductor, Inc...

RTS CBH BCLR

RTS

STAT6,$40

******************************** ** * Toggle 9/10 kHz step (MW). * ** ********************************

T910 BRSET

BSET STAT6,$40

* SECTION .VECT

* JMP START

* JMP START

* JMP START

* JMP START

* JMP START

* JMP START

* JMP START

* JMP START

* JMP START

* JMP START

* JMP START

* JMP START

* JMP START

* JMP TINTB

* JMP SDATA

* JMP SHAFTX

* JMP START

* JMP START

* JMP START

* JMP START

* JMP START

******************************** ***

* * MC68HC11E32 Vectors. * ***

******************************** SECTION .VECT2

SCI SPI PULSE

* ORG

$FFD6

AN494 MOTOROLA

53

FDB START FDB START FDB START FDB START FDB START FDB START FDB START FDB START FDB START FDB START FDB START FDB START

SCI SPI PULSE

Freescale Semiconductor, Inc.

STAT6,$40,CBH

****************************************************************************

                                                                            *

* LINK batch files (RLE.BAT & RDE.LD) and PCBUG11 Vectors. * **

*        ILD11 RADE.O FNCE.O RDSE.O -MKUF E32.MAP -G RDE -O RDE.OUT        *

*        IHEX RDE.OUT -O RDE.0                                             *

* TYPE E32.MAP * **

*

* E32 * $9000 * $9c00 * $A000 * – * ($FFD6) * ** ****************************************************************************

*        section .RAM1 BSS origin 0x0000

*        section .RAM2 BSS origin 0x0100

*        section .RAM3 BSS origin 0x0200

*        section .ROM1 origin 0xD000

*        section .ROM2 origin 0xE000

*        section .ROM3 origin 0xF000

*        section .VECT origin 0xBFC1

*        section .VECT2 origin 0xFFD6

    ACCUMULATOR EDGE

              OVER

TIMER OVER

    IC4/OC5

    OC4

    OC3

    OC2

    OC1

    IC3

    IC2

    IC1

RTI

IRQ

NOT USED,

SWI

ILLEGAL OP CODE

COP

CLOCK

RESET

XIRQ USED BY

MONITOR

ACCUMULATOR EDGE

PCbug11

” ” TIMER OVER

    IC4/OC5

    OC4

    OC3

    OC2

    OC1

    IC3

    IC2

OVER

Application Note Code Listing

For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor, Inc...

.RAM1

.RAM2

.RAM3

.ROM1

.VECT2

A5SD

A7

ABO

ABO3

ABOA

ABTA

AD

ADD

ADJ

ADON

AGS

AISM

AJ

ALARM

ALOF

ALRON

ALSU1

ALSU2

AMIN

ANTI

AOB

AOUR

ARI

ASM

BAND

BCON

BCTO

BD3

BIT

BMJD

BTO

CARRY

CBCD   I

CBH

CE6

CG6

CHE

CLAL

CLEAR

CLOCK  I

CLOOP

CLOP

CLP

CLQ

CLRAS

CLREON I

CLRNVM

54

      Symbol table

1 00000000 | CONTD

2 00000000 | CONTI

3 00000000 | COUNT

4 00000000 | CPSL

5 00000000 | CR

4 00000847 | CTAB

4 00000524 | DAT

4 00000aa7 | DBNC

4 00000470 | DBOUNC

4 000003a3 | DCON

4 0000065c | DCON2

4 00000a24 | DECS

4 00000a1f | DEL500

4 00000a53 | DF

4 00000393 | DI

4 0000044e | DIG2

4 0000084b | DIGIT

4 00000a4e | DISP

4 00000381 | DISP1

4 0000038e | DISP2

4 000003be | DISPP

4 000004a5 | DIST

4 00000569 | DLOOP

1 00000072 | DLP

4 00000191 | DMD

4 00000833 | DMI

1 00000073 | DNT

4 00000220 | DNT2

4 0000086a | DOIT

4 00000926 | DOM

4 000009b6 | DOW

1 000000ac | DOWN

4 000001ec | DR1

1 00000068 | E6L

1 00000000 | EON

4 00000201 | EXIT

1 00000099 | FINST

0 00000000 | FLN

4 00000b45 | FMB

4 000001ec | FOK

4 000001c8 | FULON

4 000001e6 | GETAD

4 0000097b | GON2

4 0000096f | GOON

0 00000000 | GOON2

4 0000005a | GOON3

4 000009f5 | GROUP

4 00000992 | H2L

4 00000993 | HIGH

4 00000996 | HTOH

0 00000000 | HZ

4 000009f2 | IDLE

E

4 000005df | INSLP

4 00000529 | IOK

1 0000009a | IOOK

4 000003cc | IRQ

4 0000099a | ITMP1

4 00000325 | KBD

1 0000004b | KCLC

4 00000a8e | KEY

4 00000a93 | KEY1

4 00000a58 | KEYP

4 00000a60 | KEYP2

4 0000040d | KHZ

4 00000471 | KOUNT

4 000007e0 | L1

1 000000a4 | L2

1 00000098 | L5

4 00000426 | L6

3 00000000 | LAST

1 00000074 | LDRX

1 00000075 | LDXR2

3 00000010 | LED

1 00000047 | LEV

4 00000a9b | LOOP

4 00000a98 | LOOP2

4 00000594 | LOOP3

4 000004d2 | LP6

4 000002f4 | LPP

4 000002ed | M8

4 00000663 | MAK20

1 00000044 | MAK2E

1 00000046 | MAK30

4 000007de | MAK41

4 00000466 | MAK61

4 000001fa | MIN

2 00000000 | MJD

4 000002ab | MJDAT

4 000006fb | MKE20

4 00000122 | MKE2E

4 0000079b | MKE39

4 0000061d | MKE5A

4 0000010f | MKE7A

4 00000780 | MNTH

4 000002c8 | MOD

4 000002e4 | MODE

4 000002d0 | MSH

4 000002de | MSM

1 00000057 | MZ

4 00000032 | NABT

4 000003e9 | NACS

4 000004c4 | NACS2

4 00000586 | NAME

4 000000ac | NDU

4 000003fe | NNTR

4 0000053c | NO2D

4 0000022e | NOPS

4 00000006 | NORT

1 00000069 | NOTCH

4 0000026f | NOTFF2

4 000002f3 | NOTN

1 00000096 | NOTRT

4 00000279 | NOTSNZ

4 000002f5 | NRDSP

4 000002f7 | NRML

4 0000098f | NS1

1 00000097 | NSRO

4 00000298 | NT1

4 000009bf | NT2

4 000001b8 | NT2J

4 000001d6 | NTB2

4 0000037d | NTB3

4 000007f9 | NUM1

4 00000802 | NUM2

1 0000009f | NWA

1 00000067 | NWWS

4 00000a2e | NXT

4 00000a72 | OK6

4 00000a0d | ONAG

4 000008eb | ONE

4 0000089f | ONOFF

4 00000079 | OUR

4 000004fe | OUTCH

4 00000502 | P

4 00000506 | P5157

4 0000050a | P5170

4 0000050e | PDEC

1 00000070 | PDEC2

1 00000030 | PI

0 00000000 | PIN

4 000005c0 | PINC

4 000005c4 | PINC2

4 000005d0 | PINOK1

4 000005c8 | PION

4 000005cc | PJ

1 00000042 | PNM1

0 00000000 | PROC

4 00000933 | PROG

4 00000238 | PSC

4 00000854 | PSN

4 00000577 | PSN0

4 00000834 | PSN1

4 000004d3 | PSNOK

4 00000595 | PSNP

4 00000859 | PSOK

4 000000db | PTY

4 00000968 | RECALL

4 000000c6 | RETUNE

4 000000d1 | RETUNE2

4 000007c0 | RJ

4 000002bc | RKEY

4 00000723 | RP

4 000008e0 | RPT

4 000007ac | RQ

4 000000e0 | RR

4 0000019b | RT

4 000002c0 | RTDIS

4 000003ea | RTDSP

4 00000194 | S1

4 00000165 | S1I

4 0000017b | S2

4 000000e4 | S2I

4 00000889 | SAVE

4 00000882 | SCHAN

1 0000009b | SCNT

1 0000009d | SDATA

4 000000f1 | SDT

4 00000173 | SEC

4 00000a81 | SEM

4 0000020b | SHAFT

4 00000101 | SHAFTX

4 000008a6 | SHIFT

4 000003a4 | SK

1 00000071 | SK2P

4 000005d6 | SKDB

1 00000015 | SKIP

4 00000ada | SKP

4 00000aa8 | SKPCLR

4 00000555 | SKSM

4 00000541 | SKTA

1 00000061 | SLEEP

1 00000065 | SLEP

4 00000491 | SLEPT

4 0000047d | SLPTOK

4 00000161 | SM

1 00000063 | SMEM

4 0000031d | SODM

4 000005e9 | SOK

0 00000000 | SPCC

4 0000088a | SQU7

4 000003c7 | SQU7I

3 00000020 | SQU8

4 000004d7 | SQU8I

4 00000599 | SRT

4 00000690 | START

1 0000004a | STAT

4 000006c7 | STAT2

1 0000005f | STAT3

  4 00000702

  4 000005f0

  4 00000603

  4 0000030a

  4 000002ea

  1 0000007c

  4 00000309

  1 00000076

  1 00000082

  3 00000028

  1 000000a3

  4 0000079f

  4 00000b26

  4 00000b08

  4 00000b2d

  4 00000b0f

  4 00000838

  1 000000a5

  1 000000ad

  0 00000000

  4 00000884

  1 0000006f

  4 00000257

  4 0000024d

  4 0000025e

  4 0000044a

  4 00000946

  4 000005ee

  4 00000a96

  4 0000093e

  4 0000045c

  4 00000876

  4 00000964

  4 0000067b

  4 000003f6

  4 00000400

  1 00000048

  4 00000415

  4 0000097d

  1 000000a0

  4 000003b2

  4 00000148

  4 00000984

  4 00000b23

  4 00000b05

  4 00000b1f

  4 00000b01

  4 00000820

  4 00000009

  1 000000a6

  1 000000a7

  1 000000a8

AN494 MOTOROLA

256) .RAM2 109) .RAM3 2889) .ROM1 42) .VECT2

Freescale Semiconductor, Inc.

Application Note

FDB START FDB TINTB FDB SDATA FDB SHAFTX FDB START FDB START FDB START FDB START FDB START

END

Section synopsis 174) .RAM1

    IC1

RTI

IRQ

XIRQ

SWI

ILLEGAL OP CODE

COP

CLOCK MONITOR

RESET

I

I

I

E

For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor, Inc...

CLTR   E

CLTR2

CNTB

CNTS

COM2

COMP

CONF

SUB

SWB2

SYN

T5S

T5SD

T910

TAEH

TASOK

TASW

TATP

4 000009a3

4 000009a6

4 00000510

4 000005d2

4 00000a09

4 00000a0b

1 0000006c

4 00000a07

4 0000079b

1 0000006a

4 000004c7

4 00000589

4 00000b3d

4 000003e6

4 0000064c

4 0000062b

4 0000022a

| IDLJ

| IF

| IFO

| IFS

| IHR

| IHRD

| INITD

| TATP

| TBH

| TEM

| TEST

| TFCC

| TH32

| TH8

| TINTB

| TMP

     4 0000023c | NEW    E

     4 000007d1 | NEWJ

     4 000008d3 | NEWSUB

     4 00000908 | NEWSUB2

     4 000004b9 | NFM

     4 0000057d | NFMB

I   0 00000000 | NNT2

     4 0000022a | TMPGRP

     4 000000be | TMQ

     4 0000025a | TMRB

     4 00000821 | TNP

I   0 00000000 | TOG57

     1 0000006d | TOG57J

     1 0000006e | TOOH

I    0 00000000 | TPEN

     1 0000001e | TPIC

4 000008a9 | PTYCMP

4 000007ee | Q

4 00000707 | R

4 00000716 | RCLP

4 0000086f | RDSTO

4 00000805 | READ1

4 000000e7 | REARET

1 0000004f | TPOF

1 0000000c | TPOK

4 00000003 | TT1

4 00000655 | TT2

4 00000517 | UDCNT

4 00000495 | UP

4 000004b4 | W1

4 000003d5 | W2

4 0000062c | W3

Application Note Code Listing

      1 000000a9

      1 000000aa

      1 000000ab

      4 000008ca

      4 00000671

      4 00000405

      4 00000000

      1 0000008e

      1 00000090

      1 00000092

      1 00000094

      0 00000000

      4 0000076f

      4 0000075d

      4 00000268

      4 0000026b

AN494 MOTOROLA

55

Freescale Semiconductor, Inc.

1 00000060 | STAT4

1 00000003 | STAT5

1 00000027 | STAT6

4 0000023f | STIF

1 00000049 | STORE

4 00000756 | STR

1 000000a2 | STRST

4 000003f2 | W4

4 00000155 | W5

4 000007d9 | W6

4 000007e8 | W7

4 00000399 | WAIT    I

4 000007cf | WBYTE

1 00000088 | WRITE1

1 0000008a | XEM

1 0000008c | YEM

For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor, Inc...

Application Note

Freescale Semiconductor, Inc.

Motorola reserves the right to make changes without further notice to any products herein. Motorola makes no warranty, representation or guarantee regarding the suitability of its products for any particular purpose, nor does Motorola assume any liability arising out of the application or use of any product or circuit, and specifically disclaims any and all liability, including without limitation consequential or incidental damages. “Typical” parameters which may be provided in Motorola data sheets and/or specifications can and do vary in different applications and actual performance may vary over time. All operating parameters, including “Typicals” must be validated for each customer application by customer’s technical experts. Motorola does not convey any license under its patent rights nor the rights of others. Motorola products are not designed, intended, or authorized for use as components in systems intended for surgical implant into the body, or other applications intended to support or sustain life, or for any other application in which the failure of the Motorola product could create a situation where personal injury or death may occur. Should Buyer purchase or use Motorola products for any such unintended or unauthorized application, Buyer shall indemnify and hold Motorola and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, and expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death associated with such unintended or unauthorized use, even if such claim alleges that Motorola was negligent regarding the design or manufacture of the part. Motorola and are registered trademarks of Motorola, Inc. Motorola, Inc. is an Equal Opportunity/Affirmative Action Employer.

How to reach us:

USA/EUROPE/Locations Not Listed: Motorola Literature Distribution; P.O. Box 5405, Denver, Colorado 80217. 1-303-675-2140 or 1-800-441-2447

JAPAN: Motorola Japan Ltd.; SPS, Technical Information Center, 3-20-1, Minami-Azabu, Minato-ku, Tokyo 106-8573 Japan. 81-3-3440-3569 ASIA/PACIFIC: Motorola Semiconductors H.K. Ltd.; Silicon Harbour Centre, 2 Dai King Street, Tai Po Industrial Estate, Tai Po, N.T., Hong Kong.

852-26668334

Technical Information Center: 1-800-521-6274

HOME PAGE: http://www.motorola.com/semiconductors/

For More Information On This Product, Go to: www.freescale.com

© Motorola, Inc., 2001 AN494/D

Freescale Semiconductor, Inc... NON-DISCLOSURE AGREEMENT REQUIRED

random generator
Peter
nou