rtd ECAN1000HR Скачать руководство пользователя страница 20

ECAN1000 User’s Manual  

 

 

20  

 

 

BDM-610020026 rev B 

INTERRUPTS

 

 

 What is an interrupt

?

 

 

An  interrupt  is  an  event  that  causes  the  processor  in  your  computer  to 
temporarily  halt  its  current  process  and  execute  another  routine.  Upon 
completion of the new routine, control is returned to the original routine at 
the point where its execution was interrupted. 

 

Interrupts  are  a  very  flexible  way  of  dealing  with  asynchronous  events. 
Keyboard activity is a good example; your computer cannot predict when 
you  might  press  a  key  and  it  would  be  a  waste  of  processor  time  to  do 
nothing whilst waiting for a keystroke to occur. Thus the interrupt scheme 
is used and the processor proceeds with other tasks. When a keystroke 
finally  occurs,  the  keyboard  then  'interrupts'  the  processor  so  that  it  can 
get the keyboard data .It then places it into the memory, and then returns 
to what it was doing before the interrupt occurred. Other common devices 
that use interrupts are A/D boards, network boards, serial ports etc. 
 
Your ECAN1000HR can interrupt the main processor when a message is 
received  or  transmitted  if  interrupts  are  enabled  on  the  ECAN1000HR 
board.  By  using  interrupts  you  can  write  powerful  code  to  interface  to 
your CAN network. 

 

 

Interrupt request lines

 

 

To  allow  different  peripheral  devices  to  generate  interrupts  on  the  same 
computer, the PC AT bus has interrupt request channels (IRQs). A rising 
edge transition on one of these lines will be latched into the interrupt con-
troller. The interrupt controller checks to see if the interrupts are to be ac-
knowledged from that IRQ and, if another interrupt is being processed, it 
decides  if  the  new  request  should  supersede  the  one in progress or if it 
has  to  wait  until  the  one  in  progress  has  been  completed.  The  priority 
level of the interrupt is determined by the number of the IRQ as follows; 
IRQ0  has  the  highest  priority  whilst  IRQ15  has  the  lowest.  Many  of  the 
IRQs  are  used  by  the  standard  system  resources,  IRQ0  is  dedicated  to 
the internal timer, IRQ1 is dedicated to the keyboard input, IRQ3 for the 
serial port COM2, and IRQ4 for the serial port COM1. Often interrupts 2,5 
and 7 are free for the user. 

 

Содержание ECAN1000HR

Страница 1: ...ECAN1000HR Isolated CAN interface board User s Manual BDM 610020026 Rev B...

Страница 2: ...ECAN1000HR ISOLATED 1 MB S CAN INTERFACE BOARD USER S MANUAL RTD Embedded Technologies INC 103 Innovation Blvd State College PA 16803 0906 Phone 1 814 234 8087 FAX 1 814 234 5218 E mail sales rtd com...

Страница 3: ...hed by RTD Embedded Technologies Inc 103 Innovation Blvd State College PA 16803 0906 Copyright 1999 2002 2003 2007 by RTD Embedded Technologies Inc All rights reserved The RTD Logo is a registered tra...

Страница 4: ...ALVANICALLY ISOLATED CAN BUS CONNECTOR 15 J34 GALVANICALLY ISOLATED CAN BUS TERMINATION JUMPER 15 CHAPTER 4 HARDWARE DESCRIPTION 16 THE CAN BUS CONTROLLER 17 GALVANIC ISOLATION OF THE CAN BUS 18 CHAPT...

Страница 5: ...N1000HR INTEGRATED IN A PC 104 RTD CPUMODULE STACK 14 FIGURE 5 19 EUROCARD RACK INSTALLATION WITH AN INTEGRATED PC 104 DATAMODULE AND 14 FIGURE 6 ECAN1000HR BLOCK DIAGRAM 16 TABLES TABLE 1 FACTORY CON...

Страница 6: ...the major features of the ECAN1000HR A more detailed discussion in included in Chapter 4 Hardware description and in Chapter 5 Board operation and program ming The board setup is described in Chapter...

Страница 7: ...N1000HR is designed on a PC 104 form factor An easy me chanical interface to both PC 104 and EUROCARD systems can be achieved Stack your ECAN1000HR directly on a PC 104 compatible computer using the o...

Страница 8: ...its functions so that you can obtain maximum use of its fea tures even in the most demanding applications This manual does not cover CAN bus network programming and system design When you need help T...

Страница 9: ...1 below illustrates the factory jumper setting for the ECAN1000HR Fig ure 1 shows the board layout of the ECAN1000HR and the locations of the jumpers The following paragraphs explain how to change the...

Страница 10: ...st setting up your module is address contention Some of your computers I O space is already occupied by other devices and memory resident programs When the ECAN1000HR at tempts to use its own reserved...

Страница 11: ...jumper is removed it corresponds to a logical 0 connecting the jumper to a 1 When you set the base address of the board record the setting inside the back cover of this manual BASE ADDRESS JUMPER SET...

Страница 12: ...utputs to one of the interrupt channels available on the host XT AT bus If your board has no AT extension interrupts IRQ 10 15 are not available Figure 3 Interrupt set to IRQ 5 Note The ECAN1000HR doe...

Страница 13: ...hardware Before installing the board in your computer check the jumper settings Chapter 2 reviews the factory settings and how to alter them If any alterations are needed please refer to the appropri...

Страница 14: ...n be easily inserted into a 19 rack installation us ing the CPU as a form factor adaptor Assemble your PC 104 data mod ules on an RTD single board EUROCARD computer and install the sys tem in a 19 enc...

Страница 15: ...9 GND isolated 10 N C Table 3 J12 CAN Bud Connector 9 7 5 3 1 I_GND N C I_GND BUS_L N C N C I_ 5V N C BUS_H I_GND 10 8 6 4 2 Table 4 Physical interface connector J12 pinout of the ECAN1000HR J34 Galva...

Страница 16: ...DM 610020026 rev B Chapter 4 HARDWARE DESCRIPTION This chapter describes in detail the major features of the ECAN1000HR The Philips SJA1000 CAN bus controller Galvanic isolation of the CAN bus Figure...

Страница 17: ...d can be configured to ei ther transmit or to receive Each message identifier contains control and status bits A message ob ject with a direction set for receive will send a remote frame by requesting...

Страница 18: ...ly to improve immunity to bus noise but also to protect the bus trans ceiver This choke also reduces the radiated emissions in the range of 30 200MHz A 1W DC DC converter may be used to power other re...

Страница 19: ...ribed in the next sections reprinted from the SJA1000 chip specific user s manual ADDRESS Description BASE 00h ADDRESS BASE 01h DATA of ADDRESS BASE 02h HARDWARE RESET OF SJA1000 Table 5 ECAN Memory M...

Страница 20: ...rds serial ports etc Your ECAN1000HR can interrupt the main processor when a message is received or transmitted if interrupts are enabled on the ECAN1000HR board By using interrupts you can write powe...

Страница 21: ...0h What exactly happens when an interrupt occurs Understanding the sequence of events when an interrupt is triggered is necessary to correctly write interrupt handlers When an interrupt request line i...

Страница 22: ...I command to the interrupt controller Finally when exiting the inter rupt routine the processor registers must be popped from the system stack and you must execute the IRET assembly instruction This i...

Страница 23: ...ting point mathematical operations in your ISR Note that the problem of reentrancy exists no matter what programming language you use Even if you are writing your ISR in Assembly lan guage DOS and man...

Страница 24: ...rray of pointers ad dresses and it is locate din the first 1024 bytes of the memory Segment 0 offset 0 You can read this value directly but it is better practice to use DOS function 35h get interrupt...

Страница 25: ...routine for set ting up interrupt vectors Remember that interrupt vector 8 corresponds to IRQ0 vector 9 for IRQ1 etc If you need to program the source of your interrupts do that next For ex ample if y...

Страница 26: ...rq_handlers Inputs Nothing Returns Nothing Purpose Set the pointers in the interrupt table to point to our funtions ie setup for ISR s void init_irq_handlers void _disable old_IRQ1_handler _dos_getvec...

Страница 27: ...parameters and speed of bus programmable Balanced CAN bus Choke Jumper selectable 120 Ohm termination resistors Transceiver type Philips 82C251 0 8W 5V isolated output power for other field devices Co...

Страница 28: ...description of the board s behavior List the name of a contact person familiar with technical details of the problem or situation along with their phone and fax numbers address and e mail address if...

Страница 29: ...d the control of RTD Embedded Technologies OR AS A RESULT OF SERVICE OR MODIFICATION BY ANYONE OTHER THAN RTD Embedded Technologies EXCEPT AS EXPRESSLY SET FORTH ABOVE NO OTHER WARRANTIES ARE EXPRESSE...

Отзывы: