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精品综合久久久久久五月天_国产精品一区电影_中文字幕欧美日韩一区二区_亚洲一区二区三区精品动漫
一区二区三区在线视频111| 欧美激情第一页在线观看| 国产精品视频免费在线| 久久久久久国产精品一区| 久久久久福利视频| 久久综合久久久久| 久久久中文字幕| 久久人人看视频| 日韩在线视频中文字幕| 久久久久久久久一区二区| 久久久久高清| 国产精品日日摸夜夜添夜夜av| 久久久久久久电影一区| 国产精品三级在线| 欧美激情一区二区三区在线视频观看| 久久久久国产精品一区| 亚洲www永久成人夜色| 日韩视频第二页| 国模精品一区二区三区| 国产精品稀缺呦系列在线| 97精品伊人久久久大香线蕉| 国产超级av在线| 日韩视频精品在线| 国产精品日韩精品| 一区二区三区精品国产| 偷拍视频一区二区| 欧美亚洲午夜视频在线观看| 国产免费一区二区三区四在线播放| 白嫩少妇丰满一区二区| 国产成人黄色av| 久久夜色精品国产欧美乱| 亚洲一卡二卡| 欧美高清性xxxxhd| 国产精品一香蕉国产线看观看| 91精品免费久久久久久久久| 精品国内产的精品视频在线观看| 久久99亚洲精品| 日本不卡二区| 国产免费黄色小视频| 国产福利成人在线| 国产精品高潮呻吟久久av无限| 一级一片免费播放| 热99这里只有精品| 97人人爽人人喊人人模波多| 精品国产一区二区三区四区在线观看| 欧美激情极品视频| 欧洲日本亚洲国产区| 高清一区二区三区日本久| 日韩在线欧美在线国产在线| 一区二区精品视频| 蜜桃麻豆91| 久久久久久中文字幕| 欧美日韩xxxxx| 欧美污视频久久久| 91精品国产综合久久香蕉| 国产精品成人品| 欧美在线视频一二三| 国产精品678| 欧美日韩999| 国产在线不卡精品| xxx一区二区| 日本在线观看不卡| av在线不卡一区| 色综合久久久久久中文网| 欧洲亚洲一区二区| 久久免费国产视频| 亚洲二区三区四区| 国产欧美韩日| 国产精品久久久久久久久久免费| 日本成人精品在线| 久久久综合香蕉尹人综合网| 亚洲乱码国产一区三区| 国产精品又粗又长| 欧美精品在线播放| 国内揄拍国内精品| 国产成人精品一区二区在线| 日本欧美国产在线| 97久久伊人激情网| 欧美激情18p| 国产在线观看一区二区三区| 国产精品久久9| 精品少妇人妻av一区二区| 日韩中文有码在线视频| 日本一区二区三区四区视频| 91国产美女在线观看| 亚洲欧洲日本国产| 粉嫩高清一区二区三区精品视频| 欧美日韩ab片| 国产欧美日韩视频| 欧美激情中文字幕在线| 国产欧美婷婷中文| 在线不卡日本| 91久久国产婷婷一区二区| 亚洲一区二区三区精品动漫| 不卡中文字幕在线| 欧美一区二区三区在线播放| 国产精品50p| 欧美午夜视频在线| 色偷偷91综合久久噜噜| 欧美一区免费视频| 国产精品人成电影在线观看| 国产在线日韩在线| 精品综合久久久久久97| 成人国产精品色哟哟| 亚洲图色在线| 国产二区不卡| 欧美黄色免费影院| 国产精品久久久久久久久| 国产欧美精品一区二区三区| 一级特黄录像免费播放全99| 久久久一本精品99久久精品 | 日韩在线中文字幕| 欧美资源在线观看| 国产精品激情自拍| 91免费国产精品| 日韩国产精品毛片| 国产精品视频在线播放| 国产欧洲精品视频| 欧美一区二区三区四区在线| www.日本久久久久com.| 国模精品系列视频| 午夜精品99久久免费| www.日韩欧美| 国产精品一区二区三区久久久 | 久久一区二区三区av| 人人爽久久涩噜噜噜网站| 久久精品国产96久久久香蕉| 国产私拍一区| 视频一区二区三| 国产精品久久色| 久久久在线观看| 国产在线精品自拍| 日韩中文不卡| 国产精品免费久久久久影院| 成人短视频在线观看免费| 日本精品久久电影| 国产99久久精品一区二区 夜夜躁日日躁| 国产精品永久免费在线| 日韩欧美一区二区三区四区| 久久国产精品电影| 国产对白在线播放| 国产精品一区视频| 欧美日韩一区二区三区在线观看免| 欧美精品999| 国产成人精品视频在线| 99在线观看| 毛片一区二区三区四区| 午夜久久久久久久久久久| 久久精品99久久久久久久久 | 国产天堂在线播放| 日本亚洲欧洲色α| 国产精品露脸自拍| 久久无码高潮喷水| 国产伦精品一区二区三区高清| 日日摸日日碰夜夜爽无码| 欧美精品在线极品| 国产成人精品一区二区在线| 91精品久久久久| 国产免费人做人爱午夜视频| 欧美综合在线观看视频| 亚洲va欧美va在线观看| 欧美精品一区二区三区国产精品| 视频在线观看99| 91精品国产免费久久久久久| 国产欧美精品一区二区三区-老狼| 欧美精品尤物在线| 视频一区视频二区视频| 亚洲一区二区三区sesese| 国产精品久久九九| 久久色精品视频| 久久精品免费一区二区| 9191国产视频| 91久久久久久久久久久| 国产视频福利一区| 欧美成人蜜桃| 欧美最大成人综合网| 色乱码一区二区三区熟女| 亚洲人成网站在线观看播放| 美女福利视频一区| 久久综合免费视频| 国产精品国产三级国产专区51| 日韩一区二区三区国产| 久久久久久综合网天天| 久草热久草热线频97精品| 国产传媒一区| 久久久成人精品一区二区三区| 不卡中文字幕在线| 99久久国产宗和精品1上映| 国产一区二区三区av在线| 麻豆91蜜桃| 免费国产在线精品一区二区三区| 欧美 日韩 国产一区| 国内一区在线| 国产原创欧美精品| 国产日韩精品在线播放| 国产欧美欧洲| 成人精品视频99在线观看免费| 国产精品一区av| 成人毛片网站| 国产精品99导航|