91精品综合久久久久久五月天_国产精品一区电影_中文字幕欧美日韩一区二区_亚洲一区二区三区精品动漫

SHARC DSP with the SJA1000 CAN-bus interface

Abstract: This paper discusses the DSP and the CAN controller SJA1000 bus interface differences, proposed SJA1000 and the SHARC DSP family of simple interface design methods and general methods. Tests show that this method has good stability, high transmission efficiency.

Introduction

Currently, there are a number of CAN controllers will microprocessor embedded into a system, but there are still a lot of people are not familiar with CAN controller microprocessor. Combined use of microprocessors and CAN controller design to be necessary, and, CAN controller with CAN bus communication protocol to complete all the necessary functions required, therefore, CAN controller interface with other microprocessor design a CAN bus system design priority. This article focuses on the core with SHARC DSP, based on SJA1000 CAN-bus interface.

SHARC DSP with the SJA1000 CAN-bus interface

Figure 1 SJA1000 and CAN bus connection

SHARC DSP with the SJA1000 CAN-bus interface

Figure 2 ADSP21062 and simplified design SJA1000

SHARC DSP with the SJA1000 CAN-bus interface

Figure 3 CPLD-based design ADSP21062 and SJA1000

SHARC DSP with the SJA1000 CAN-bus interface

Figure 4 CPLD logic diagram

About SJA1000

SJA1000 is a stand-alone CAN controller, for moving targets and general industrial environments Controller Area Network (CAN). It is the company's early Philips CAN controller PCA82C200 (Basic CAN) alternatives, but also adds a new mode (PeliCAN), this model has many new features to support the CAN2.0B agreement.

SJA1000 interface with the microprocessor by the eight major time-multiplexed data and address lines to complete: AD0 ~ AD7, ALE / AS,, / E,,, MODE, and, where MODE select signal for the interface mode can be set to Intel or in Motorola mode. The difference is: Intel mode, the processor on the SJA1000 to write, use, as read, write data signals, ALE falling edge latches address (address signal at this time to guarantee the basic set up to keep time), only in reading, writing data low; Motorola mode, read, write signal with distinction (high read, low write), with / E data strobe (falling edge latched), AS and CS is similar to the ALE and Intel. Popular MCS51/96 MCU provides a convenient way of direct interface to Intel, for general considerations, it describes the interface design is based on Intel models.

DSP interface signals and timing

Difference with earlier processors, DSP chips are pin-chip address lines and data lines by separating the design, without using time-multiplexed address data line, and no ALE signal, so give CAN controller and the DSP made it difficult to interface, and different DSP external pins and timing are slightly different. CAN controller and the DSP to design the interface, we must first compare the timing DSP and CAN controller.

This optional DSP-ADSP21062, clocked at 40MHz, single-cycle (zero wait) to access memory, the required memory response (read or write) cycle is less than 17ns, but many of the response speed of memory or peripherals not so fast, so should be extended by adding wait to visit. Wait ADSP2106x supports two ways, namely, to wait (soft wait) and wait outside (hard to wait).

SJA1000 and the CAN bus connection

Select 82C250 as a transceiver, select 6N137 optical isolators to achieve high-speed CAN bus system and isolation. The connection method shown in Figure 1. This design not only do electrical isolation, but also ensures the data transmission speed.

CAN controller and DSP interface design

SJA1000 data and address signals to time division multiplexing, while the DSP for data and address signal separation structure, and the DSP does not provide ALE signal, the key is to design DSP address SJA1000 should write at the same time as the data generated ALE signal. Required to read and write signals of the shortest effective time, due to low to read data valid for a maximum of 50ns, so read signals to ensure effective for at least 50ns, ADSP21062 in wait with two soft, its low time to 62.5ns (25ns / 2 2 × 25ns), just to meet the requirements.

ADSP21062 and SJA1000 interface to simplify the design

In the case of small peripheral devices connected, the interface circuits can be achieved using several logic gates. As the access to external data, the low 16-bit data bus is not used, so use the data line starting from the DATA16. When Flag1 = 1 時, SJA1000 the WR is always 1, the ALE for the DSP of the WR reverse, when the DSP writes data to addresses as SJA1000, the low level DSP-WR signal is converted into a high level of the ALE, and the falling edge of ALE latches the data. When Flag1 = 0 時, ALE is always 0, no address latch operation. SJA1000, WR directly affected by DSP-WR signal. Flag2 direct control by the CS. The connection shown in Figure 2.
ADSP21062 and SJA1000 simplified interface design of the corresponding procedures are as follows:

1) # define CANADDR 0x400000
2) bit set mode2 FLG1O | FLG2O;
/ / Set Flag1, Flag2 the output
3) r1 = 0x00047800; dm (SYSCON) = r0;
/ / Set the size of outer space
4) r0 = 0x21a8c429; dm (WAIT) = r0;
/ / Wait to visit with two soft-MS0
5) bit set astat ASTAT_FLG1;
/ / Flag1 = 1,
6) r0 = addr; dm (CANADDR) = r0; / / write to internal address to access the SJA1000
7) bit clr astat ASTAT_FLG1;
/ / Flag1 = 0
8) bit clr astat ASTAT_FLG2;
/ / Flag2 = 0, CS = 0
9) i0 = CANADDR; r0 = dm (i0, 0);
/ / Read the corresponding address data SJA1000
10) r1 = 3; dm (i0, 0) = r1;
/ / Write data to the appropriate address SJA1000
11) bit set astat ASTAT_FLG2;
/ / Flag2 = 1, CS = 1,5

To illustrate the convenience of the instruction code. The cost of operating instructions 5,7,8,11 25ns, run the command 6,9,10 the cost 100ns, so complete a read or write be 300ns.

CPLD-based interface design ADSP21062 and SJA1000

When connecting multiple peripheral devices, the decoding circuit is rather complicated, you can use the CPLD logic decoding complete control. CAN signals generated using address data of the ALE, CS and other signals. The advantages of multiple bus devices, the CPLD can be a complete decoding of all bus devices, this method has better applicability. The connection method shown in Figure 3.

DSP programming is as follows:

1) # define CANNCS 0x400100
/ / Clear CANCS address, this address is invalid operation to CAN's CS
2) # define CANCS 0x400200 / / set CANCS address, which address the CS effective action to CAN
3) # define CANALE 0x400500
/ / Set CANALE address, which address the ALE operation can be changed to CAN
4) # define CANNALE 0x400600
/ / Clear CANALE address, which address the ALE CAN constant operation to lower
5) # define CANRW 0x400900
/ / This address operation is complete CAN data reading and writing
6) r1 = 0x00047800; dm (SYSCON) = r0; / / set the outer space
7) r0 = 0x21a8c429; dm (WAIT) = r0;
/ / Wait to visit with two soft-MS0
8) r7 = 0x07; dm (CANALE) = r7;
/ / ALEhigh = 1, CANALE to CANWE of taking anti-
9) r4 = addr; dm (CANRW) = r4;
/ / Write to access the internal register space address SJA1000
10) r7 = dm (CANNALE);
/ / ALEhigh = 0, CANALE total is 0
11) r7 = 0x07; dm (CANCS) = r7;
/ / CANCS = 0
12) r3 = dm (CANRW);
/ / Read the corresponding address data SJA1000
13) r1 = 3; dm (CANRW) = r1;
/ / Write data to the appropriate address SJA1000
14) r7 = dm (CANNCS);
/ / CANCS = 1

The cost of operating instructions 8,9,11,13 100ns, run the command 10,12,14 the cost 75ns, so complete a read or write be 525ns. Faster than before, a simplified design to be a little slower, but this design is more conducive to expansion, for various peripheral interfaces, while saving two Flag pins. When working at maximum speed SJA1000 1Mbit / s, due to be in a data frame into other frames of about 42bit signal, so the completion of 8bit transfer time is about 50 s. The speed of the first two designs were 167 times and 95 times its. Therefore, both the design can meet SJA1000 transmission speed requirements.

CPLD Programming

Figure 4, with 74 138 for decoding, generation ALE, CS and other signals. When the implementation of the Directive 6, set the size of outer space, in the visit will address 0x400000 ~ 0x4fffff time to MS0, 74138 of G2AN will be effective. When the address A11 ~ A8 = 0001, Y1N = 0, CANCS the clear control by the DSP of RD, RD signal low will CANCS = 0, command 11 to complete this feature. When the address A11 ~ A8 = 0010, data D19 ~ D16 = 1000, then Y2N = 0, DSP of the WR signal will CANCS = 1, instruction 14 to complete this function; when the address A11 ~ A8 = 0101, data D19 ~ D16 = 0111, the Y5N = 0, DSP's WR signal along will ALEhigh = 1, then CANWE always maintain 1, CANALE to take anti-WR, instruction 8 to complete this function; when the address A11 ~ A8 = 0110, then Y6N = 0, RD signal low will ALEhigh = 0, then CANALE always remain 0, CANWE for the WR, command 10 to complete this feature.

ADSP21062 only three external interrupts, the number of peripherals linked to resource constraints when they appear. Figure 4, active low or falling edge interrupt signal can be an effective relationship and connected to an interrupt on, DSP in response to failure, read the corresponding number of peripherals, to judge from which peripherals, such can be extended further disruption.

Conclusion

SJA1000 interface address / data multiplexed mode, DSP processors usually address / data bus structure of the separation, this paper provides two different interfaces of the ideas and methods. Tests show that this method is feasible, transmission efficiency.

Declined comment

91精品综合久久久久久五月天_国产精品一区电影_中文字幕欧美日韩一区二区_亚洲一区二区三区精品动漫
国产综合18久久久久久| 日韩在线播放视频| 日本中文不卡| 亚洲中文字幕久久精品无码喷水| 精品久久一区二区三区蜜桃| 国产精品免费网站| 久久综合五月天| 欧美精品在线看| 久久99久久亚洲国产| 永久久久久久| 亚洲午夜高清视频| 岛国视频一区| 日本免费久久高清视频| 日韩久久久久久久久久久久| 欧美中在线观看| 欧美 日韩 国产在线观看| 欧美一区二区影视| 极品校花啪啪激情久久| 欧美第一黄网| 免费亚洲一区二区| 国产欧美一区二区三区久久人妖| 国产女大学生av| 91美女片黄在线观看游戏| 久久噜噜噜精品国产亚洲综合| 久久久久综合一区二区三区| 久久精品99久久久香蕉| 久久伊人免费视频| 一卡二卡三卡视频| 日本不卡在线观看| 蜜桃日韩视频| 97国产精品久久| 日韩在线视频网站| 欧美激情一级二级| 色婷婷精品国产一区二区三区 | 欧美二区在线视频| 国产美女无遮挡网站| 久久久精品有限公司| 国产精品久久9| 日日碰狠狠丁香久燥| 黄色三级中文字幕| 99精品免费在线观看| 精品国产一区二区三区久久狼黑人| 国产精品成久久久久三级| 亚洲18私人小影院| 欧美极品欧美精品欧美图片| 国产网站免费在线观看| 国产激情在线观看视频| 国产精品乱码一区二区三区| 亚洲高清在线观看一区| 精品婷婷色一区二区三区蜜桃| 久久久亚洲福利精品午夜| 国产精品久久久久久久久久新婚| 视频一区亚洲| 不卡一卡2卡3卡4卡精品在| 日韩最新免费不卡| 亚洲一区二区三区欧美| 国内精品一区二区三区| 国产不卡av在线| 亚洲一区二区在| 国产一区免费| 国产成人精品综合| 色哺乳xxxxhd奶水米仓惠香| 国产青草视频在线观看| 久久久国产成人精品| 少妇熟女一区二区| 逼特逼视频在线| 久久综合久中文字幕青草| 日韩精品一区二区三区四区五区| 91精品视频专区| 欧美激情图片区| 精品一区国产| 久久精品国产99国产精品澳门| 亚洲欧美99| 成人精品网站在线观看| 国产精品日韩欧美一区二区| 色爱区成人综合网| 国产乱码精品一区二区三区卡| 日韩中文理论片| 日本一区网站| 国产精品99导航| 亚洲永久激情精品| 高清欧美精品xxxxx| 欧美激情精品久久久久久变态 | 久久久久久久免费视频| 午夜免费电影一区在线观看| 国产免费黄色av| 国产精品久久久久久久久粉嫩av| 青青草国产精品一区二区| 国产不卡一区二区视频| 久久久精品有限公司| 亚洲国产精品一区在线观看不卡| 国产精品一区二区三区免费观看| 国产精品免费一区| 极品校花啪啪激情久久| 久久久久99精品久久久久| 日本精品一区二区三区高清 久久| 91精品久久久久久久久久另类| 亚洲自拍小视频| 91久久夜色精品国产网站| 欧美激情国产日韩精品一区18| 美女精品国产| 久久精品男人天堂| 欧美极品欧美精品欧美图片| 国产精品流白浆视频| 国精产品一区一区三区有限在线| 国产精品欧美亚洲777777| 欧美第一黄网| 国产精品第七十二页| 国产欧美日韩视频一区二区三区| 欧美大片欧美激情性色a∨久久| 国产素人在线观看| 一区二区三区精品国产| 91免费视频网站在线观看| 欧美一区二区三区免费观看| 国产va免费精品高清在线观看| 日韩久久久久久久| 国产成人生活片| 欧美xxxx黑人又粗又长密月| 久久这里只有精品99| 国产免费一区二区三区四在线播放| 欧美巨大黑人极品精男| 97精品国产97久久久久久粉红| 日本公妇乱淫免费视频一区三区| 精品国产一区二区三区久久久狼| 狠狠久久综合婷婷不卡| 欧美日韩国产成人在线观看| 91精品国产91久久久久青草| 日韩wuma| 国产精品久久综合av爱欲tv| 国产精品一区二区三区久久久| 亚洲va码欧洲m码| 久久久人人爽| 人人妻人人澡人人爽欧美一区 | 中文字幕日韩精品无码内射| 91精品91久久久中77777老牛| 日本午夜精品电影| 国产精品久久久久久av福利软件| 国产奶头好大揉着好爽视频| 性色av一区二区三区| 国产精品视频入口| 国产女大学生av| 日本一级淫片演员| 欧美久久久精品| 日韩视频精品在线| 福利在线一区二区| 青青a在线精品免费观看| 精品麻豆av| 久久久久久国产精品一区| 国产三级精品网站| 日本成人黄色| 自拍另类欧美| 国产精品日韩欧美一区二区| 91高清免费视频| 国产私拍一区| 欧美在线性视频| 亚洲中文字幕无码不卡电影| 国产精品无av码在线观看| 91精品国产91久久久久麻豆 主演 91精品国产91久久久久青草 | 一区二区三区电影| 久久福利一区二区| 国产伦精品一区二区| 日韩精品欧美在线| 亚洲色欲综合一区二区三区 | 国产精品久久久久久久久久久不卡 | 久久亚洲精品一区| 国产乱码精品一区二区三区日韩精品 | 色狠狠久久av五月综合| 国产精品毛片va一区二区三区| 99视频国产精品免费观看| 欧美精品一区二区视频| 亚洲一区二区三区在线视频| 久久伊人免费视频| 久久精品免费电影| 久久久久久这里只有精品| 91精品国产综合久久香蕉922| 国产一区二区不卡视频在线观看 | 蜜桃精品久久久久久久免费影院 | 欧美亚洲午夜视频在线观看| 亚洲精品成人久久久998| 欧美日本精品在线| 欧美老少配视频| 国产精品久久久久久久久电影网| 久久久久久亚洲精品不卡| 久久免费看毛片| 8090成年在线看片午夜| 国产乱人伦精品一区二区三区| 精品一区二区三区国产| 精品人妻少妇一区二区| 欧美日韩国产精品激情在线播放| 日本一区二区三区在线播放| 亚洲欧洲免费无码| 亚洲熟女乱色一区二区三区| 这里只有精品66| 亚洲一区二区三区精品视频 | 一区二区三区不卡在线| 欧美成年人视频网站| 国产精品免费观看高清| 国产精品久久网| 另类美女黄大片| 欧美猛交免费看|