?? note548.htm
字號:
<html>
<head>
<title>RTX51: USING CAN WITH THE C505C & C515C</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Description" content="QUESTION: RTX51 says it supports the Siemens C515C, but I don't find any mention of the Siemens C505C in the documentation. How do I make the CAN library work with that part? ANSWER: The CAN controller in the C505C and C515C are identical with 2 exceptions that are easy to configure. First, the C505...">
<meta name="Author" content="Keil Software, Inc.">
<meta name="Copyright" content="Copyright (c) Keil Software, Inc. All rights reserved.">
<meta name="Description" content="QUESTION: RTX51 says it supports the Siemens C515C, but I don't find any mention of the Siemens C505C in the documentation. How do I make the CAN library work with that part? ANSWER: The CAN controller in the C505C and C515C are identical with 2 exceptions that are easy to configure. First, the C505...">
<meta name="Generator" content="Microsoft FrontPage 4.0">
<meta name="KeilToolSet" content="8051">
<meta name="Keywords" content="C515, C505, C515C, C505C">
<link rel="stylesheet" type="text/css" href="http://www.keil.com/_css/support.css">
<base target="_top">
<style>
<!--
pre { font-family: Courier; font-size: 8pt; line-height: 120%; background-color:
#CCFFCC; color: #000000; margin-left: 20; margin-right: 20;
padding: 3 }
}
-->
</style>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bgcolor="#FFFFFF">
<p align="center">
<b>Keil Software Knowledgebase Article 548</b><br>
<small>www.keil.com/support/docs/548.htm</small>
</p>
<h1>RTX51: USING CAN WITH THE C505C & C515C</h1>
<h3>QUESTION</h3>
<p></p>
RTX51 says it supports the Siemens C515C, but I don't find any mention of the Siemens C505C in the documentation. How do I make the CAN library work with that part?
<p></p>
<h3>ANSWER</h3>
<p></p>
The CAN controller in the C505C and C515C are identical with 2 exceptions that are easy to configure.
<p></p>
First, the C505C lets you specify where the CAN controller resides in the XDATA address space. Second, the interrupt used by the C505C for the CAN controller is different. The values for each controller are as follows:
<p></p>
<pre>
C505C CAN XDATA Address: XX00h
C515C CAN XDATA Address: F700h
C505C CAN Interrupt: 9
C515C CAN Interrupt: 17
</pre>
<p></p>
These two things must be configured in the ICANCONF.A51 configuration file.
<p></p>
<pre>
CONTROLLER_BASE EQU 0F700H ; XDATA start-address of the
; CAN-Controller
; The following constant defines the interrupt-number (as defined by
; RTX51) for the CAN-Controller
;
; Should be: 17 for Siemens C515C
; 9 for Siemens C505C
USED_CAN_INT_NBR EQU 9
</pre>
<p></p>
Finally, the CAN controller must be located to the address you specify in ICANCONF.A51. It's probably a good idea to locate it at the same address as the C515C (0xF700).
<p></p>
First, define the XPAGE special function register. This SFR contains the upper address byte of the XDATA address of the CAN controller.
<p></p>
<pre>
sfr XPAGE = 0x91;
</pre>
<p></p>
Then, assign the address of the XDATA page to the SFR.
<p></p>
<pre>
/* Put the CAN controller where the RTX CAN routines expect it. */
XPAGE = 0xF7;
</pre>
<p></p>
Once these two things are done, CAN routines work identically to the C515C.
<p></p>
<p><br></p>
<hr>
<p align="center" class="TinyTxt">
Last Reviewed: 6/7/99<br>
</p>
<p align="center" class="TinyTxt">
<br>
<a href="http://www.keil.com/company/copyright.htm">Copyright</a>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -