CAN SERIAL COMMUNICATIONS CONTROLLER

7.4.2Programming the Bit Timing 0 (CAN_BTIME0) Register

Bit timing register 0 (Figure 7-7) defines the length of one time quantum and the maximum

amount by which the sample point can be moved (tTSEG1 or tTSEG2 can be shortened and the other lengthened) to compensate for resynchronization.

CAN_BTIME0

Address:

1E3FH

(87C196CB)

Reset State:

Unchanged

Program the CAN bit timing 0 (CAN_BTIME0) register to define the length of one time quantum and the maximum number of time quanta by which a bit time can be modified for resynchronization.

87C196CB

7

SJW1

SJW0

BRP5

BRP4

 

 

 

 

0

BRP3

BRP2

BRP1

BRP0

 

 

 

 

Bit

Bit

 

Function

Number

Mnemonic

 

 

 

 

 

 

7:6

SJW1:0

Synchronization Jump Width

 

 

This field defines the maximum number of time quanta by which a resyn-

 

 

chronization can modify tTSEG1 and tTSEG2. Valid programmed values are 0–

 

 

3. The hardware adds 1 to the programmed value, so a “1” value causes

 

 

the CAN peripheral to add or subtract 2 time quanta, for example. This

 

 

adjustment has no effect on the total bit time; if tTSEG1 is increased by 2 tq,

 

 

tTSEG2 is decreased by 2 tq, and vice versa.

5:0

BRP5:0

Baud-rate Prescaler

 

 

 

This field defines the length of one time quantum (tq), using the following

 

 

formula, where tXTAL1 is the input clock period on XTAL1. Valid programmed

 

 

values are 0–63.

 

 

 

tq = 2tXTAL1 × (BRP + 1)

 

 

For example, at 20 MHz operation, the system clock period is 50 ns.

 

 

Writing 3 to BRP achieves a time quanta of 400 ns; writing 1 to BRP

 

 

achieves a time quanta of 200 ns.

 

 

tq = (2 × 50) × (3 + 1)

= 400 ns

 

 

tq = (2 × 50) × (1 + 1)

= 200 ns

 

 

 

 

The CCE bit (CAN_CON.6) must be set to enable write access to this register.

Figure 7-7. CAN Bit Timing 0 (CAN_BTIME0) Register

7-15

Page 76
Image 76
Intel 87C196CB Programming the Bit Timing 0 CANBTIME0 Register, CANBTIME0 †, SJW1 SJW0 BRP5 BRP4 BRP3 BRP2 BRP1 BRP0

8XC196NT, 87C196CB specifications

The Intel 87C196CB and 8XC196NT are microcontrollers from the C196 family, which was designed to meet the demands of embedded control technology. These microcontrollers are popular in various applications due to their robust architecture, extensive I/O capabilities, and specialized functionality, making them ideal for automotive, industrial, and communication systems.

The 87C196CB is distinguished by its 16-bit architecture, offering a balance of processing power and efficiency. It features a 16-bit data bus, which allows for fast data processing, and a 16-bit address bus, supporting up to 64KB of program memory. The microcontroller integrates on-chip memory, including 2KB of ROM and 128 bytes of RAM, which facilitates faster execution of programs and data handling.

One of the standout features of the 87C196CB is its versatility in I/O operations. It comes equipped with 32 general-purpose I/O lines that can be configured for various functions, including input, output, and interrupt handling. This flexibility enables developers to optimize the microcontroller for their specific application needs.

The 8XC196NT builds on the capabilities of its predecessor, offering advanced functionalities such as an enhanced instruction set and integrated peripherals. It includes additional features like timers, serial communication interfaces, and analog-to-digital converters, which expand its usability in complex embedded systems. The 8XC196NT supports multiple addressing modes, allowing for more efficient programming and memory management.

Both microcontrollers utilize innovative technologies that improve performance and power efficiency. The on-chip operating system support aids in real-time processing and multitasking, making them suitable for time-sensitive applications. Power management features are also incorporated, allowing these microcontrollers to operate in low-power modes, which is crucial for battery-operated devices.

The 87C196CB and 8XC196NT microcontrollers are characterized by their reliability and long service life, meeting the stringent demands of industrial applications. Their ability to perform tasks rapidly, combined with their diverse peripheral support, makes them popular choices among engineers and developers designing embedded systems. Overall, the Intel 87C196CB and 8XC196NT microcontrollers remain relevant in the rapidly evolving landscape of embedded technology, facilitating innovative solutions across various industries.