Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
8XC196Kx,8XC196Jx,87C196CA microcontroller family user's manual.1995.pdf
Скачиваний:
57
Добавлен:
23.08.2013
Размер:
3.97 Mб
Скачать

ARCHITECTURAL OVERVIEW

Chapter 16, “Programming the Nonvolatile Memory,” provides recommended ci rcuits, the corresponding memory maps, and flow diagrams. It also provides procedures for auto programming and describes the commands used for serial port programming.

2.7DESIGN CONSIDERATIONS FOR 87C196CA DEVICES

Some functions that were implemented on 8XC196Kx devices are omitted from the 87C196CA. Table 2-3 lists the pins and signals that are omitted.

Table 2-3. Unsupported Functions in 87C196CA Devices

Removed Pins or Signals

Unsupported Functions

 

 

P0.0 and P0.1

Analog channels 0 and 1

 

 

P1.4/EPA4, P1.5/EPA5, P1.6/EPA6, P1.7/EPA7

EPA channels 4 through 7

 

 

P2.3/BREQ, P2.5/HOLD#

Bus hold request and hold acknowledge

 

 

P5.1/INST/SLPCS#

Instruction fetch indication and slave port

 

 

SLPINT (multiplexed with P5.4 in Kx devices)

Slave port (P5.4 is implemented as a low-speed I/O pin)

 

 

P5.7/BUSWIDTH

Dynamic buswidth selection

 

 

P6.2/T1CLK, P6.3/T1DIR

External clocking and direction control of timer 1

 

 

Follow these recommendations to help maintain hardware and software compatibility between the 87C196CA and future devices.

Bus width. Since the 87C196CA has no BUSWIDTH pin, the device cannot dynamically switch between 8- and 16-bit bus widths. Configure the CCBs to select either 8- or 16-bit bus width.

EPA4–EPA7. The 87C196CA has neither the EPA7:4 pins nor the associated functions.

Slave port. The 87C196CA has no P5.1/SLPCS# pin and no SLPINT signal, so you cannot use the slave port.

I/O ports. The following port pins do not exist in the 87C196CA: P0.1:0; P1.7:4; P2.3 and P2.5; P5.1 and P5.7; P6.2 and P6.3. Software can still read the associated Px_DIR, Px_MODE, and Px_REG registers. The registers for the removed pins are permanently configured as follows:

P x_DIR bits are set.

P x_MODE bits are clear, except P5_MODE.7 is set.

P x_REG bits are set.

Do not use the bits associated with the removed port pins for conditional branch instructions. Treat these bits as reserved.

Auto programming. During auto programming, the 87C196CA supports only a 16-bit, zero-wait-state bus configuration.

2-13

8XC196Kx, Jx, CA USER’S MANUAL

2.8DESIGN CONSIDERATIONS FOR 8XC196JQ, JR, JT, AND JV DEVICES

The 8XC196Jx devices are 52-lead versions of 8XC196Kx devices. Some functions were removed to reduce the pin count (Table 2-4).

Table 2-4. Unsupported Functions in 8XC196Jx Devices

Removed Pins

Unsupported Functions

 

 

P0.0 and P0.1

Analog channels 0 and 1

 

 

P1.4/EPA4, P1.5/EPA5, P1.6/EPA6, P1.7/EPA7

Pins for EPA channels 4 through 7

 

 

P2.3/BREQ, P2.5/HOLD#

Bus hold request and hold acknowledge

 

 

P5.1/INST/SLPCS#

Instruction fetch indication and slave port

 

 

P5.4/SLPINT

Slave port

 

 

P5.5/BHE#/WRH#

16-bit external bus

 

 

P5.6/READY

Dynamic wait-state control

 

 

P5.7/BUSWIDTH

Dynamic buswidth selection

 

 

P6.2/T1CLK, P6.3/T1DIR

External clocking and direction control of timer 1

 

 

NMI

Nonmaskable interrupt

 

 

2-14

ARCHITECTURAL OVERVIEW

Follow these recommendations to help maintain hardware and software compatibility between 52-lead, 68-lead, and future devices.

Bus width. Since the 8XC196Jx has neither a WRH# nor a BUSWIDTH pin, the device cannot dynamically switch between 8- and 16-bit bus widths. Program the CCBs to select 8- bit bus mode.

Wait states. Since the 8XC196Jx has no READY pin, the device cannot rely on a READY signal to control wait states. Program the CCBs to limit the number of wait states (0, 1, 2, or 3).

EPA4–EPA7. These functions exist in the 8XC196Jx, but the associated pins are omitted. You can use these functions as software timers, to start A/D conversions, or to reset the timers.

Slave port. Since the 8XC196Jx has no P5.1/SLPCS and P5.4/SLPINT pins, you cannot use the slave port.

ONCE mode. On the 8XC196JQ and JR, the ONCE mode entry function is multiplexed with P2.6 (P2.6/HLDA#/ONCE) rather than with P5.4 as it is on the 8XC196KQ and KR (P5.4/SLPINT/ONCE).

NMI. Since the 8XC196Jx has no NMI pin, the nonmaskable interrupt is not supported. Initialize the NMI vector (at location 203EH) to point to a RET instruction. This method provides glitch protection only.

I/O ports. The following port pins do not exist in the 8XC196Jx: P0.0–P0.1, P1.4–P1.7, P2.3 and P2.5, P5.1 and P5.4–P5.7, P6.2 and P6.3. Software can still read and write the associated Px_REG, Px_MODE, and Px_DIR registers. Configure the registers for the removed pins as follows:

Clear the corresponding P x_DIR bits. (Configures pins as complementary outputs.)

Clear the corresponding P x_MODE bits. (Selects I/O port function.)

— Write either “0” or “1” to the corresponding P

x_REG bits. (Effectively ties signals low

or high.)

 

Do not use the bits associated with the removed port pins for conditional branch instructions. Treat these bits as reserved.

Auto programming. During auto programming, the 8XC196Jx supports only a 16-bit, zero-wait-state bus configuration.

2-15

3

Programming

Considerations

CHAPTER 3

PROGRAMMING CONSIDERATIONS

This section provides an overview of the instruction set of the MCS® 96 microcontrollers and offers guidelines for program development. For detailed information about specific instructions, see Appendix A.

3.1OVERVIEW OF THE INSTRUCTION SET

The instruction set supports a variety of operand types likely to be useful in control applications (see Table 3-1).

NOTE

The operand-type variables are shown in all capitals to avoid confusion. For example, a BYTE is an unsigned 8-bit variable in an instruction, while a byte is any 8-bit unit of data (either signed or unsigned).

Table 3-1. Operand Type Definitions

Operand Type

No. of

Signed

Possible Values

Addressing

Bits

Restrictions

 

 

 

 

 

 

 

 

BIT

1

No

True or False

As components of bytes

 

 

 

 

 

BYTE

8

No

0 through 255 (28–1)

None

SHORT-

8

Yes

–128 (–27) through +127 (+27–1)

None

INTEGER

 

 

 

 

 

 

 

 

 

WORD

16

No

0 through 65,535 (216–1)

Even byte address

INTEGER

16

Yes

–32,768 (–215) through

Even byte address

 

 

 

+32,767 (+215–1)

 

DOUBLE-WORD

32

No

0 through 4,294,967,295 (232–1)

An address in the lower

(Note 1)

 

 

 

register file that is evenly

 

 

 

 

divisible by four (Note 2)

 

 

 

 

 

LONG-INTEGER

32

Yes

–2,147,483,648 (–231) through

An address in the lower

(Note 1)

 

 

+2,147,483,647 (+231–1)

register file that is evenly

 

 

 

 

divisible by four (Note 2)

 

 

 

 

 

NOTES:

1.The 32-bit variables are supported only as the operand in shift operations, as the dividend in 32-by- 16 divide operations, and as the product of 16-by-16 multiply operations.

2.For consistency with third-party software, you should adopt the C programming conventions for addressing 32-bit operands. For more information, refer to “Software Standards and Conventions” on page 3-9.

3-1

Соседние файлы в предмете Электротехника