日韩免费一级毛片在线观看-中文日韩亚洲综合-欧美系列日韩另类-欧美激情极品日韩-午夜日韩爱爱毛片视频免费看-欧美日韩一区免费观看-欧美日韩欧美黄色三级

Linux-based PC104 bus and CAN bus communication design

1 Introduction

PC104 embedded industrial computer because of its small size structures, stack-type connection, easy bus-driven features have been widely used. Fieldbus field, CAN bus has been widely supported by the computer chip business, they have introduced CAN interface directly with microprocessor (MCU) chip.

Chip MCU with CAN's total has reached 100 million 3000 million pieces, so in the interface chip technology, CAN has been far ahead of FF, PRO-FIBUS, LONWORKS all other fieldbus. But the PC104 bus can not communicate directly with the CAN bus, CAN bus control system so difficult to use.

To solve the above problems, to AVR microcontroller co-processor designed for the PC104 bus and CAN bus converter card, and taking into account the PC104 embedded industrial computer running Linux operating system is usually characterized by the preparation of the conversion card under Linux dual-port RAM PC104 bus access drivers. The adapter used in industrial control systems, can actually show that the stable and reliable in operation.

2 hardware

PC104 CAN bus converter card to the hardware system block diagram shown in Figure 1. In the PC104 bus and CAN bus communication, the main issue to consider is the PC104 bus and CAN bus data synchronization. PC104 bus and CAN bus bus speed are very different, commonly used for such problems is to use dual-port RAM or FIFO as a buffer, where a dual-port RAM as a data buffer, while the dual-port RAM, set aside a few bytes as the ATmega64 processor and PC104 embedded computer soft handshake signals the completion of the above methods PC104 bus and CAN bus data synchronization. Altera EPM7128 to the CPLD, here using the CPLD is mainly used for CAN-bus converter card PC104 to the address decoding. CAN bus communication use SJA1000 CAN bus controller, in order to meet the harsh electromagnetic environment of industrial site, in the SJA1000 and PC82C250 in the light compartment after treatment.

Linux-based PC104 bus and CAN bus communication design

2.1 PC104 bus interface circuit with IDT7134
IDT7134 PC104 bus and interface circuit diagram shown in Figure 2.

PC104 embedded computer to read the dual-port RAM IDT7134 data. First IDT7134 mapped to the PC104 embedded computer memory space, use SMEMR *, SMEMW * as IDT7134 the OER, R / W control signal. Another advantage of the PC104 bus CPLD EPM7128 high three addresses SA19, SA18, SA17 decoding the chip select signal as IDT7134.

Linux-based PC104 bus and CAN bus communication design

2.2 ATmega64 and IDT7134 interface circuit

ATmega64 processor used is the address line, data line time-multiplexing, thus the need for address latch. EPM7128 VHDL hardware description language used in the design of the address latch. ATmega64 and IDT7134 interface circuit shown in Figure 3.

Linux-based PC104 bus and CAN bus communication design

2.3 CPLD EPM7128 internal logic

CPLD EPM7128 in the whole design was completed for decoding, and address latch function. In the Quartus Ⅱ 6.0 environment, through the VHDL hardware description language, completion of the function. The source code is as follows:

Linux-based PC104 bus and CAN bus communication design

In the above VHDL code CSSJA1000 for the SJA1000 chip select signal, CS7134L left port for the IDT7134 chip select, CS7134R for the IDT7134 chip select the right port.

Software part 3

To achieve the PC104 bus and CAN bus data communication hardware design in the above mentioned dual-port RAM is used as a data buffer method, which involves the dual-port RAM in the data area opened up as PC104 Embedded PC, and ATmega64 soft handshake flag. Handshake to ATmega64 PC104 embedded PC, the software program and implement, the process is as follows: First, open up the dual-port RAM, two buffer, were used to send and receive data buffer CAN bus. When there is data to the PC104 bus, CAN bus, the first dual-port RAM, data is written to send the CAN data buffer, and then to the dual-port RAM reserved for the flag field to write a specific value, the circular ATmega64 with data through CAN bus send, ATmega64 using the query method to measure the flag field, when a specific flag field detected value, to read dual-port RAM of the CAN data transmission buffer, while read data to the CAN bus. After the above process, ATmega64 program will reset the field flags. Thus completed the PC104 bus data transmission on the CAN bus. CAN bus data on the PC104 bus to send the opposite of this process.
3.1 ATmaga64 processor program

ATmaga64 processor on the CAN bus read and write the bottom of the work, while data written in the dual-port RAM IDT7134 and IDT7134 stored in the first flag byte set to notify the PC104 embedded PC, with data being updated to require PC104 Embedded PC, be read on the IDT7134. Based on the above process ATmaga64 processor initialization procedure includes SJA1000, SJA1000 interrupt handler, and access IDT7134 procedures.

3.2 PC104 bus access dual-port RAM in the Linux driver

Linux driver from the structure is divided into three parts:

(1) equipment configuration and initialization, including the existence of inspection equipment, status, equipment, registration and related device driver initialization. This part of the general initialization procedure is called only once, he was included in the init_module () routine.

(2) I / O request service programs primarily through system calls, the completion of the user's request features such as Read, Write, etc., and equipment operating by the majority of I / O request completion of services, including Read, Write, Ioct1 and other routine .

(3) interrupt service routine, the system receives all the hardware interrupt, then calls the appropriate interrupt service routine.

In the Linux system, device drivers the way the document appears, the device driver interface is a file system interface, which consists of a data structure struct file_operations () to define the data structure is the virtual file system standard interfaces. So first define a dual-port RAM PC104 bus driver to access the file system data structures.

Linux-based PC104 bus and CAN bus communication design

PC104 memory segment for the Linux kernel at boot time to access these addresses on the establishment of a page table, access to their virtual address and the actual physical address are different, need to use ioremap to map physical address to virtual address so we can visit on the PC104 bus, to read the dual port RAM data. ioremap function is defined as:


Void * ioremap (unsigned long phy_addr, unsigned longsize)

Parameter phys_addr the physical address, size for the physical address length. ioremap return value is a unique virtual address can be used to access the specified the physical memory area, the virtual address to call iounmap to release last fall. The following will detail the various Linux drivers for the concrete realization of the function.

3.2.1 Initialization function and unloading functions to achieve

Equipment configuration and initialization function init_module () called, respectively:

register_chrdev (): for device registration;

request_irq (): interrupt request channel;

request_mem_region (): allocation of I / O memory area;

ioremap (): physical address mapped to the virtual address.

Source code is as follows:

Linux-based PC104 bus and CAN bus communication design

This completes the device driver initialization. Unloading part of the device driver and initialization Instead, uninstall is assigned to the device driver recovered a variety of resources. cleanup_module () call, respectively:

iounmap (): release of virtual address;

release_mem_region (): release memory regions;

free_irq (): release interrupt channel.

Source code is as follows:

Linux-based PC104 bus and CAN bus communication design

3.2.2 Reading of the function implementation

Read function definition of dual-port RAM read process, the source code is as follows:

Linux-based PC104 bus and CAN bus communication design

Kernel function which copy_to_user virtual address pPxp-VirtStartAddr the count of data copied to buf pointer to user space. Before the device configuration and initialization function ink_module () in ioremap () function has dual-port RAM physical address mapped to virtual address pPxpVirtStartAddr, so you can pxp_read () function to read dual-port RAM.

3.2.3 Write a function to achieve

Write dual-port RAM, called pxp201_write () function, the principle of dual-port RAM with similar reading, but pxp201_write () function call copy_from_user () kernel function.

Linux-based PC104 bus and CAN bus communication design

3.2.4 open function and the release function to achieve

pxp_open () function to achieve the following, which increases equipment use MOD_INC_USE_COUNT reference count.

Linux-based PC104 bus and CAN bus communication design

pxp201_release () function and pxp_open () process the contrary, the use of MOD_DEC_USE_COUNT decreasing device reference count.

Since then, Linux, dual-port RAM of the drive module is complete, you can use Insmod tool to load the kernel driver module. This can be embedded in the PC104 industrial computer's Linux operating system to access the dual-port RAM.

4 Concluding Remarks

This paper introduces the PC104 bus and CAN bus communication hardware, and PC104 embedded Linux computer operating system developed under the PC104 bus on the dual-port RAM IDT7134 access driver. Signs within the open area in the IDT7134, using soft handshake method to achieve the PC104 bus and CAN bus data communication. The adapter used in industrial control systems through practical and reliable test that can be run.

Declined comment

国产亚洲免费观看| 毛片电影网| 成人免费网站视频ww| 国产成人精品综合| 青青久久网| 国产伦精品一区二区三区在线观看| 毛片成人永久免费视频| 一级女性全黄生活片免费| 可以免费看污视频的网站| 黄视频网站在线看| 国产精品自拍亚洲| 精品在线观看一区| 99久久精品国产高清一区二区| 久久久成人网| 欧美爱爱网| 亚洲www美色| 欧美α片无限看在线观看免费| 99色播| 日韩字幕在线| 九九精品在线| 香蕉视频久久| 韩国三级视频在线观看| 日韩专区第一页| 久草免费在线色站| 国产成人啪精品| 麻豆系列 在线视频| 国产亚洲免费观看| 国产国语在线播放视频| 日韩男人天堂| 国产综合成人观看在线| 日本在线www| 国产精品自拍在线观看| 二级特黄绝大片免费视频大片| 午夜激情视频在线播放| 日本免费区| 精品国产一级毛片| 精品在线观看一区| 国产精品1024在线永久免费| 欧美夜夜骑 青草视频在线观看完整版 久久精品99无色码中文字幕 欧美日韩一区二区在线观看视频 欧美中文字幕在线视频 www.99精品 香蕉视频久久 | 天天做人人爱夜夜爽2020毛片| 久久久久久久免费视频| 国产a视频| 色综合久久手机在线| 成人影视在线观看| 欧美日本国产| 一级女性大黄生活片免费| 精品国产一区二区三区久久久蜜臀 | 亚欧乱色一区二区三区| 成人影视在线观看| 亚欧乱色一区二区三区| a级毛片免费观看网站| 欧美另类videosbestsex高清| 欧美夜夜骑 青草视频在线观看完整版 久久精品99无色码中文字幕 欧美日韩一区二区在线观看视频 欧美中文字幕在线视频 www.99精品 香蕉视频久久 | 成人免费观看的视频黄页| 天天做日日干| 欧美激情一区二区三区视频| 成人免费一级毛片在线播放视频| 欧美大片毛片aaa免费看| 黄色福利片| 夜夜操网| 一级女人毛片人一女人| 天天做日日干| 久久精品免视看国产成人2021| 国产原创中文字幕| 日韩av片免费播放| 久久99中文字幕久久| 国产一区免费在线观看| 日本久久久久久久 97久久精品一区二区三区 狠狠色噜噜狠狠狠狠97 日日干综合 五月天婷婷在线观看高清 九色福利视频 | 韩国三级视频在线观看| 亚洲精品影院一区二区| 亚洲精品久久久中文字| 你懂的国产精品| 亚飞与亚基在线观看| 国产一区二区精品尤物| 好男人天堂网 久久精品国产这里是免费 国产精品成人一区二区 男人天堂网2021 男人的天堂在线观看 丁香六月综合激情 | 99色视频在线| 精品在线观看国产| 午夜欧美成人久久久久久| 国产精品自拍一区| 午夜家庭影院| 亚洲 欧美 成人日韩| 欧美另类videosbestsex高清| 精品国产三级a∨在线观看| 九九精品在线| 国产不卡高清在线观看视频 | 91麻豆精品国产片在线观看 | 日本特黄特黄aaaaa大片| 成人免费一级纶理片| 可以免费在线看黄的网站| 午夜在线影院| 国产成人啪精品| 国产视频一区在线| 午夜在线影院| 日韩av成人| 青青青草影院| 国产成a人片在线观看视频| 人人干人人插| 日韩中文字幕一区| 成人免费一级纶理片| 国产成a人片在线观看视频| 日韩一级黄色片| 欧美18性精品| 成人免费福利片在线观看| 国产成人精品综合久久久| 99久久网站| 欧美国产日韩在线| 美女免费精品视频在线观看| 国产网站免费| 久久国产影院| 国产综合成人观看在线| 亚洲 国产精品 日韩| 青青久久精品| 日韩综合| 国产a一级| 亚洲爆爽| 台湾毛片| 国产亚洲精品成人a在线| 九九久久99综合一区二区| 毛片电影网| 日韩av成人| 国产一级强片在线观看| 久久福利影视| 久久国产一区二区| 天天做日日爱| 99久久网站| 成人免费网站久久久| 国产欧美精品| 美国一区二区三区| 四虎久久影院| 成人免费观看男女羞羞视频| 国产伦精品一区二区三区无广告 | 欧美一级视| 日韩免费在线| 欧美日本二区| 国产精品免费久久| 国产精品自拍一区| 国产成人女人在线视频观看| 久久久成人网| 日本伦理黄色大片在线观看网站| 日韩在线观看视频黄| 精品视频一区二区三区免费| 免费一级片在线观看| 久久精品免视看国产明星| 精品毛片视频| 四虎影视库| 国产91精品系列在线观看| 国产成+人+综合+亚洲不卡| a级毛片免费观看网站| 午夜激情视频在线观看| 国产网站免费观看| 国产伦久视频免费观看视频| 夜夜操天天爽| 免费国产一级特黄aa大片在线| 久久久久久久久综合影视网| 亚久久伊人精品青青草原2020| 在线观看成人网| 国产高清视频免费观看| 免费国产在线观看不卡| 免费国产在线观看不卡| 亚洲精品久久玖玖玖玖| 韩国三级视频网站| 毛片成人永久免费视频| 国产亚洲免费观看| 999久久狠狠免费精品| 亚洲第一色在线| 亚欧成人乱码一区二区| 国产伦精品一区二区三区在线观看| 四虎影视久久久| 国产网站免费视频| 亚洲wwwwww| 欧美国产日韩一区二区三区| 免费国产一级特黄aa大片在线| 九九久久99| 国产伦精品一区二区三区在线观看| 尤物视频网站在线| 日韩综合| 精品视频在线看| 欧美α片无限看在线观看免费| 成人免费网站久久久| 亚洲精品永久一区| 国产高清在线精品一区二区| 久久国产一久久高清| 亚洲 国产精品 日韩| 久久久久久久久综合影视网| 色综合久久天天综合绕观看 | 国产91精品露脸国语对白| 亚欧成人乱码一区二区| 日韩中文字幕在线播放| 国产91素人搭讪系列天堂| 日日夜夜婷婷| 国产成人啪精品| 久久精品免视看国产成人2021| 国产91精品一区| 国产91精品露脸国语对白| 久久国产影院| 九九久久99| 成人免费福利片在线观看| 日韩在线观看网站| 精品国产香蕉在线播出| 毛片高清|