87C196CB SUPPLEMENT

7.4.3Programming the Bit Timing 1 (CAN_BTIME1) Register

Bit timing register 1 (Figure 7-8) controls the time at which the bus is sampled and the number of samples taken. In single-sample mode, the bus is sampled once and the value of that sample is considered valid. In three-sample mode, the bus is sampled three times and the value of the ma- jority of those samples is considered valid. Single-sample mode may achieve a faster transmis- sion rate, but it is more susceptible to errors caused by noise on the CAN bus. Three-sample mode is less susceptible to noise-related errors, but it may be slower. If you specify three-sample mode, the hardware adds two time quanta to the TSEG1 value to allow time for two additional samples during tTSEG1.

CAN_BTIME1

Address:

1E4FH

(87C196CB)

Reset State:

Unchanged

Program the CAN bit timing 1 (CAN_BTIME1) register to define the sample time and the sample mode. The CAN controller samples the bus during the last one (in single-sample mode) or three (in

three-sample mode) time quanta of tTSEG1, and initiates a transmission at the end of tTSEG2. Therefore, specifying the lengths of tTSEG1 and tTSEG2 defines both the sample point and the trans- mission point.

87C196CB

7

SPL

TSEG2

0

TSEG1

Bit

Bit

Function

Number

Mnemonic

 

 

 

 

7

SPL

Sampling Mode

 

 

This bit determines how many samples are taken to determine a valid bit

 

 

value.

 

 

0 = 1 sample

 

 

1 = 3 samples, using majority logic

 

 

 

6:4

TSEG2††

Time Segment 2

 

 

This field determines the length of time that follows the sample point within

 

 

a bit time. Valid programmed values are 1–7; the hardware adds 1 to this

 

 

value.

 

 

 

3:0

TSEG1††

Time Segment 1

 

 

This field defines the length of time that precedes the sample point within a

 

 

bit time. Valid programmed values are 2–15; the hardware adds 1 to this

 

 

value. In three-sample mode, the hardware adds 2 time quanta to allow

 

 

time for the two additional samples.

 

 

 

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

††For correct operation according to the CAN protocol, the total bit time must be at least 8 time quanta, so the sum of the programmed values of TSEG1 and TSEG2 must be at least 5. (The

total bit time is the sum of tSYNC_SEG + tTSEG1 + tTSEG2. The length of tSYNC_SEG is 1 time quanta, and the hardware adds 1 to both TSEG1 and TSEG2. Therefore, if TSEG1 + TSEG2 = 5, the total bit length will be equal to 8 (1+5+1+1)). Table 7-11 lists additional conditions that must be met to maintain synchronization.

Figure 7-8. CAN Bit Timing 1 (CAN_BTIME1) Register

7-16

Page 77
Image 77
Intel 8XC196NT, 87C196CB user manual Programming the Bit Timing 1 CANBTIME1 Register, CANBTIME1 †, Spl

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.