⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pcanconf.a51

📁 Philips sja1000 can controller. it contains example on how to control this device
💻 A51
字号:
$TITLE ('RTX-51/BCAN HW-DEFINITIONS')
$NOXREF
$NOSYMBOLS
$NORB
$DEBUG
$PAGELENGTH(80) PAGEWIDTH(110)
;************************************************************************
;************************************************************************
;*                                                                      *
;*  HW-DEFINITIONS FOR RTX-51 / BASIC-CAN DRIVER                        *
;*                                                                      *
;************************************************************************
;************************************************************************
;*                                                                      *
;*  PURPOSE:        User confuguration of HW-Adresses, Buffer           *
;*                  allocation, timeouts and interrupts for the         *
;*                  RTX-51/BCAN-Driver                                  *
;*                  This source file is part of the RTX-51/CAN          *
;*                  object code disk.                                   *
;*                                                                      *
;*  FILENAME:       PCANCONF.A51                                        *
;*                                                                      *
;*  MODULENAME:     --                                                  *
;*                                                                      *
;*  TARGETSYSTEM:   Any system based upon 8051 up with Philips 82C200   *
;*                  CAN-Controller.                                     *
;*                                                                      *
;*  LANGUAGE:       Keil ASM-51                                         *
;*                                                                      *
;************************************************************************
;*  REVISION HISTORY :                                                  *
;*                                                                      *
;*  - 22. OKT 1990; Th. Fischler; Rev 0.1 :                             *
;*       First Version                                                  *
;*  - 27. MAY 1991; Th. Fischler; Rev 0.2 :                             *
;*       MAX_NBR_OF_SEND_TRIALS added                                   *
;*  - 13. AUG 1991; Th. Fischler; Rev 0.3 :                             *
;*       New unit for MAX_NBR_OF_SEND_TRIALS                            *
;*  - 11. OCT 1991; Th. Fischler; Rev 1.0                               *
;*       Adapted for RTX-51 V4.0                                        *
;*                                                                      *
;************************************************************************
;*    Copyright 1991 .. 2001 METTLER  &  FUCHS  AG,  CH-8953 Dietikon   *
;************************************************************************


PUBLIC  CAN_REG
PUBLIC  CAN_OBJ_BUF, CAN_OBJ_BUF_START, CAN_OBJ_BUF_END
PUBLIC  CAN_INT_NBR
PUBLIC  NBR_OF_SEND_TRIALS


;************************************************************************
;*                                                                      *
;*   THE FOLLOWING VALUES CAN BE ALTERED BY THE USER                    *
;*                                                                      *
;************************************************************************


; 15 bytes from the object-buffer are reserved for internal use
; each defined object needs 17 bytes from the object buffer
; so with an object-buffer length of 34 bytes you can define 1 object
; and with an object-buffer length of 51 byte you can define 2 objects
;
; object_buffer_lengt = (max-number-of-objects * 17) + 17
;

OBJ_BUFFER_LENGTH       EQU 500         ; Number of bytes for the
                                        ; object-buffer

CONTROLLER_BASE         EQU 0F000H      ; XDATA start-address of the
                                        ; CAN-Controller

; The following constant defines the interrupt-number (as defined by
; RTX-51 V4.0) for the CAN-Controller

USED_CAN_INT_NBR        EQU 0

; The next constant defines the number of send-trials for the first
; communication object after startup in number of system-clocks.
; (0 to 255 / Default 10)

MAX_NBR_OF_SEND_TRIALS  EQU 10


;************************************************************************
;*                                                                      *
;*   DO NOT ALTER THE FOLLOWING DECLARATIONS !!!                        *
;*                                                                      *
;************************************************************************

; Object-Buffer declaration

CAN_OBJ_BUF_SEG         SEGMENT         XDATA
                        RSEG            CAN_OBJ_BUF_SEG
CAN_OBJ_BUF_START:
CAN_OBJ_BUF:            DS OBJ_BUFFER_LENGTH      ; Object-Buffer Length
CAN_OBJ_BUF_END:


; CAN-Controller declarations

                        XSEG AT CONTROLLER_BASE
CAN_REG:                DS 128                     ; Number of bytes for the
                                                   ; Philips SJA1000 Controller

; Constant declaration
?CO?CAN_CONST_SEG          SEGMENT         CODE
                           RSEG            ?CO?CAN_CONST_SEG
NBR_OF_SEND_TRIALS:        DB MAX_NBR_OF_SEND_TRIALS
CAN_INT_NBR:               DB USED_CAN_INT_NBR

;
;   END OF MODULE
    END

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -