欢迎访问ic37.com |
会员登录 免费注册
发布采购

C8051F502-IM 参数 Datasheet PDF下载

C8051F502-IM图片预览
型号: C8051F502-IM
PDF下载: 下载PDF文件 查看货源
内容描述: 混合信号ISP功能的Flash MCU系列 [Mixed Signal ISP Flash MCU Family]
分类和应用: 微控制器和处理器外围集成电路PC时钟
文件页数/大小: 312 页 / 2813 K
品牌: SILICON [ SILICON ]
 浏览型号C8051F502-IM的Datasheet PDF文件第216页浏览型号C8051F502-IM的Datasheet PDF文件第217页浏览型号C8051F502-IM的Datasheet PDF文件第218页浏览型号C8051F502-IM的Datasheet PDF文件第219页浏览型号C8051F502-IM的Datasheet PDF文件第221页浏览型号C8051F502-IM的Datasheet PDF文件第222页浏览型号C8051F502-IM的Datasheet PDF文件第223页浏览型号C8051F502-IM的Datasheet PDF文件第224页  
C8051F50x-F51x  
22.1.2. CAN Register Access  
The CAN controller clock divider selected in the CAN0CFG SFR affects how the CAN registers can be  
accessed. If the divider is set to 1, then a CAN SFR can immediately be read after it is written. If the divider  
is set to a value other than 1, then a read of a CAN SFR that has just been written must be delayed by a  
certain number of cycles. This delay can be performed using a NOP or some other instruction that does  
not attempt to read the register. This access limitation applies to read and read-modify-write instructions  
that occur immediately after a write. The full list of affected instructions is ANL, ORL, MOV, XCH, and XRL.  
For example, with the CAN0CFG divider set to 1, the CAN0CN SFR can be accessed as follows:  
MOV CAN0CN, #041  
MOV R7, CAN0CN  
; Enable access to Bit Timing Register  
; Copy CAN0CN to R7  
With the CAN0CFG divider set to /2, the same example code requires an additional NOP:  
MOV CAN0CN, #041  
NOP  
MOV R7, CAN0CN  
; Enable access to Bit Timing Register  
; Wait for write to complete  
; Copy CAN0CN to R7  
The number of delay cycles required is dependent on the divider setting. With a divider of 2, the read must  
wait for 1 system clock cycle. With a divider of 4, the read must wait 3 system clock cycles, and with the  
divider set to 8, the read must wait 7 system clock cycles. The delay only needs to be applied when read-  
ing the same register that was written. The application can write and read other CAN SFRs without any  
delay.  
22.1.3. Example Timing Calculation for 1 Mbit/Sec Communication  
This example shows how to configure the CAN controller timing parameters for a 1 Mbit/Sec bit rate. Table  
18.1 shows timing-related system parameters needed for the calculation.  
Table 22.1. Background System Information  
Parameter  
Value  
Description  
Internal Oscillator Max  
CIP-51 system clock (SYSCLK)  
CAN controller clock (fsys)  
CAN clock period (tsys)  
CAN time quantum (tq)  
CAN bus length  
24 MHz  
24 MHz  
41.667 ns  
41.667 ns  
10 m  
CAN0CFG divider set to 1  
Derived from 1/fsys  
Derived from tsys x BRP1,2  
5 ns/m signal delay between CAN nodes  
2 x (transceiver loop delay + bus line delay)  
Propogation delay time3  
400 ns  
Notes:  
1. The CAN time quantum is the smallest unit of time recognized by the CAN controller. Bit timing parameters  
are specified in integer multiples of the time quantum.  
2. The Baud Rate Prescaler (BRP) is defined as the value of the BRP Extension Register plus 1. The BRP  
extension register has a reset value of 0x0000. The BRP has a reset value of 1.  
3. Based on an ISO-11898 compliant transceiver. CAN does not specify a physical layer.  
Each bit transmitted on a CAN network has 4 segments (Sync_Seg, Prop_Seg, Phase_Seg1, and  
Phase_Seg2), as shown in Figure 18.3. The sum of these segments determines the CAN bit time (1/bit  
rate). In this example, the desired bit rate is 1 Mbit/sec; therefore, the desired bit time is 1000 ns.  
220  
Rev. 1.1  
 复制成功!