• No results found

Eindhoven University of Technology MASTER An intelligent sensor controller using Profibus Zinken, P.J.H.

N/A
N/A
Protected

Academic year: 2022

Share "Eindhoven University of Technology MASTER An intelligent sensor controller using Profibus Zinken, P.J.H."

Copied!
121
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

Eindhoven University of Technology

MASTER

An intelligent sensor controller using Profibus

Zinken, P.J.H.

Award date:

1998

Link to publication

Disclaimer

This document contains a student thesis (bachelor's or master's), as authored by a student at Eindhoven University of Technology. Student theses are made available in the TU/e repository upon obtaining the required degree. The grade received is not published on the document as presented in the repository. The required complexity or quality of research of student theses may vary by program, and the required minimum study period may vary in duration.

(2)

~ ICSlEB691

Technische Universiteit t U J Eindhoven

Faculty of Electrical Engineering ICS (EB) Section of Information and Communication Systems

Master's Thesis:

An intelligent sensor controller using Profibus

P.l.H. Zinken

Id.nr.403715

Location Coach Supervisor

: Ellips BV, Eindhoven, The Netherlands : Ir.H.P.E. Stox

: Prof.Ir.M.PJ. Stevens

~

(3)

SUMMARY

An intelligent sensor controller using Profibus

E~

The new fruit grading system that is currently developed by Ellips B.V. is based on a Profibus DP (PROcess FIeldBUS Decentralised Peripheral) environment. The system consists of one master computer and several intelligent slaves; an I/O controller, a weight controller, a sensor controller and a diameter- and color measurement system.

Inthis document the design of the sensor controller card will be discussed.

The sensor controller board is a multifunctional board for the decentralised handling of position measurement, static/dynamic weight measurement, input/output control and fruit roll measurement.

It features two high-resolution rotary encoders, a 24-bit sigma delta analog/digital converter, 8 isolated analog inputs and 4 isolated digital outputs.

The sensor controller board is an embedded system based on an 80C31 0 micro controller, it interfaces to the Profibus by a SPC4 Profibus controller. A Quicklogic FPGA is used to implement most of the Memory Management, the position decoding and to glue all other parts together.

Inthis design the position measurement must be as accurate as 1I20thcup. The static weight measurement is performed with a peak-peak resolution of 16 bits, so accuracy is better than 0.2 gram. Dynamic operation can be performed at 14 bits and an

accuracy of better than 1 gram. (Based on a 10 kg bridge.)

The input circuitry can handle most industrial encoders, proximity sensors and photo switches. The output circuitry is designed for the switching of relays up to 1.8 Ampere.

(4)

An intelligent sensor controller using Profibus

TABLE OF CONTENTS

ELLIPS ~

4.1 4.2 4.3 4.4 4.5

1. INTRODUCTION 6

2. CONTROLLER CONCEPT 7

2.1 OVERVIEW 7

2.2 THE FRUIT GRADING SYSTEM 9

2.2.1 Mechanical structure 9

2.2.2 Communication model 12

2.2.3 Profibus 14

2.2.4 Profibus-DP 15

2.2.5 Timing Specifications 19

3. EMBEDDED SYSTEM DESIGN 23

3.1 SPECIFICATIONS 23

3.2 DESIGN 24

3.2.1 Profibus 1nterface 24

3.2.2 Microcontroller 25

3.2.3 Memory Management 30

3.2.4 Glue 34

3.2.5 Power-supply& watchdog 37

3.3 TEST RESULTS 38

4. POSITION MEASUREMENT 39

SPECIFICATIONS 39

ROTARY ENCODERS 40

DESIGN 43

METASTABILITY 48

TEST RESULTS 49

5. WEIGHT MEASUREMENT 50

5.1 SPECIFICATIONS 50

5.1.1 STATIC 51

5.1.2 SEMI-DYNAMIC 51

5.2 STRAIN GAUGE TRANSDUCER 52

5.3 DATA ACQUISITION 53

5.3.1 Sigma delta ADC's 54

5.3.2 Analog Devices compared to Burr Brown 55

5.4 ANALOG DEVICES AD7730 59

5.4.1 1nterfacing the weight-bridge 60

5.4.2 Configuration of the AD7730 62

5.5 DESIGN 67

5.5.1 Static 67

5.5.2 Semi-dynamic 68

(5)

An intelligent sensor controller using Profibus

E~

7. SOFTWARE 80

7.1 PROFIBUS PROTOCOL SOFIWARE 80

7.2 SENSOR CONTROLLER SOFIWARE 82

7.2.1 Sensor Input Handling 82

7.2.2 Decoder software 83

7.2.3 Data Acquisition Software 84

8. CONCLUSIONS & RECOMMENDATIONS 87

8.1 CONCLUSIONS 87

8.2 RECOMMENDATIONS 87

9. BIBLIOGRAPHY 88

10. ACKNOWLEDGEMENT 90

APPENDIX A: NOMENCLATURE 91

APPENDIX B: PROFIBUS PERFORMANCE 92

APPENDIX C: ENCODER CALCULATIONS 94

APPENDIX D: ADC CALCULATIONS 95

APPENDIX E: SIGMA DELTA AID CONVERTERS 96

APPENDIX F: ADC COMMUNICATION 100

APPENDIX G: MMU TIMING REQUIREMENTS I04

APPENDIX H: VHDL DECODER PACKAGE 107

APPENDIX I: VHDL SOURCE GLUE 112

LIST OF TABLES

TABLE3.1:GLUE MEMORY CONFIGURATION 35

TABLE3.2:MMU SIGNALS OF THE GLUE 35

TABLE3.3: I/OSIGNALS OF THE GLUE 36

TABLE3.4:ADDITIONAL SIGNALS OF THE GLUE 36

TABLE4.1:ELECTRICAL ENCODER SPECIFICATIONS 40

TABLE4.2:MECHANICAL ENCODER SPECIFICATIONS 40

TABLE4.3 :ENVIRONMENTAL ENCODER SPECIFICATIONS 41

TABLE4.4:VENDOR SPECIFIC ENCODER SPECIFICATIONS 43

TABLE4.5:ENCODER STATE TRANSITIONS 44

TABLE5.1:ADC TYPE COMPARISON 54

TABLE5.2:ANALOG DEVICES VERSUS BURR BROWN 58

TABLE5.3:FILTER REGISTER SETTINGS 69

TABLE5.4:MODE REGISTER SETTINGS 69

TABLE5.5:CALIBRATION DURATIONS 70

TABLE6.1:SENSOR INPUT CONFIGURATIONS 75

(6)

An intelligent sensor controller using Profibus

LIST OF FIGURES

E~

FiGURE 2.1: SENSOR CONTROlLER CORE 8

FIGURE 2.2: LINE SYSTEM 9

FIGURE 2.3: STATIC WEIGHT SYSTEM 10

FIGURE 2.4: ROLL SYSTEM 11

FIGURE 2.5: PROFIBUS COMMUNICATION MODEL 12

FIGURE 2.6: PROFIBUS PRODUCT GRAPH 14

FIGURE 2.7: TELEGRAM-SEQUENCE IN THE PROFIBUS-DP-SYSTEM 16

FIGURE 2.8: PROFIBUS-DP-sLAVE STATE MACHINE 17

FiGURE 2.9: PROFIBUS MESSAGE CYCLE TIME 19

FIGURE 2.10: SYSTEM REACTION TIME VERSUS N 21

FIGURE 2.11: ENCODER RESOLUTION VERSUS N 21

FIGURE 2.12: ENCODER RESOLUTION VERSUS UPDATE RATE 22

FIGURE 3.1: DESCRIPTION PROFIBUS-INTERFACE 24

FIGURE 3.2: DS80C320-MICROCONTROlLER FROM DALLAS 26

FIGURE 3.3: MEMORY-ORGANISATION OF THE MICROCONTROLLER 27

FIGURE 3.4: 80C32 INTERRUPT-MODEL 28

FIGURE 3.5: INTERRUPT-SCHEME 80C320 29

FiGURE 3.6: MEMORY CONFIGURATION OF THE 80C31O/3 20 32

FiGURE 4.1: ENCODER OUTPUT SIGNALS 42

FIGURE 4.2: STATE DIAGRAM OF THE DECODER 44

FIGURE 4.3: COUNTER HYSTERESIS WINDOW 46

FiGURE 4.4: SNAPSHOT OF POSITION ENCODING SIMULATION 49

FiGURE 5.2: GAUSS DISTRIBUTED P-P NOISE 56

FIGURE 5.3: GAUSSIAN DISTRIBUTION 57

FIGURE 5.4: FUNCTIONAL BLOCK DIAGRAM OF THE AD7730 59

FIGURE 5.5: AC-EXCITED BRIDGE APPLICATION 61

FIGURE 5.6, FREQUENCY RESPONSE 1sTSTAGE FILTER 62

FIGURE 5.7, FIR-FILTER RESPONSE 63

FIGURE 5.8: STEP RESPONSE FOR FASTSTEP AND NORMAL OPERATION 64

FIGURE 5.9: PEAK TO PEAK RESOLUTIONS (CHOPPING MODE) 67

FIGURE 5.10: PEAK TO PEAK RESOLUTIONS (NON-CHOPPING MODE) 68

FIGURE5.11: JAPIE 1,2,3 73

FIGURE 5.12: JAPIE4 ON THE110BOARD 73

FIGURE5.13:JAPIE5 74

FIGURE 6.1: IDS-UDS CHARACTERISTIC BF556c 77

FIGURE 6.2: SINGLE INPUT CIRCUIT 78

FIGURE 6.3: DC (UPPER) AND AC (LOWER) OUTPUT CONFIGURATIONS 79

FIGURE 7.1: SENSOR CONTROlLER SOFTWARE 82

FIGURE 7.3: WEIGHT MACHINE 84

FIGURE 7.2: SENSOR STATE MACHINE FOR WEIGHT 86

(7)

An intelligent sensor controller using Profibus

1. INTRODUCTION

E~

With this work the last step is taken for graduation at the faculty Electrical

Engineering of the Eindhoven University of Technology. For the five-year curriculum it consists of a nine-month period of work in one out of five sections at either the university itself or, external, in a company.

This graduation work is supervised by the section Information and Communication Systems (ICS), it consists of two research chairs: Computer and Communication Systems and Design Technology.

This work is done in labour of the section "Computer and Communication Systems", which focuses on analysis and specification methods, design, realisation, and

application of digital information and communication systems. These are extremely complex systems with high communication speeds, a large number of operations per time unit, special memory structures, etc. The realisation is based on a (formal) design process, in which an optimal architecture is developed with a proper balance between hardware and software.

The choice was made to do this graduation work external, namely at Ellips B.V.

Eindhoven. Ellips B.V. is specialised in designing electronic control systems, including all relevant software, for vision applications.

In real time images are processed from industrial and natural products such as raw materials, fruit, vegetables, etc. Dimensions, contour characteristics, position, colour and quality are calculated in order to classify these products in terms of control parameters for the production process.

One of the systems Ellips B.V. is working on is a machine control unit for the grading of fruit and vegetables on several criteria, e.g., size, shape, weight and colour. Fruit is passing by at speeds of up to 20 pieces a second per line.

In the next chapters we will discuss the design of an intelligent sensor controller board that will be part of the next generation of fruit grading systems. The sensor controller will take care of position measurement, fruit roll measurement, weight measurement and input/output control.

(8)

An intelligent sensor controller using Profibus

2. CONTROLLER CONCEPT

~

ELLfpS

In this chapter the concept of an intelligent sensor controller board is described and an overview is given of its functionality in the next generation of fruit grading systems using Profibus. After describing the mechanical and communication models, timing specifications will be explained. Inthe last paragraph a short description of Profibus is given.

2.1 Overview

The new sensor controller board is the third board to be designed for the next generation of fruit grading systems. An I/O controller and a weight controller board have already preceded it.

The main task of the sensor controller board is the measurement of cup positions in order to synchronise other processes (e.g. fruit exit-control) in the system. Further the board features fruit weight measurement, fruit roll measurement and general-purpose input/output control. Inthe next paragraph these functionality will be explained while an overview is given of the next generation of fruit grading systems.

Like previous controller designs, the sensor controller is based on an 80C51

embedded system featuring a Profibus controller that takes care of the lower layers of the Profibus protocol, a galvanically separated interface to the Profibus and several memory units for program code and data.

Further the board contains a Field Programmable Gate Array (FPGA) for the Memory Management Unit (MMU) and to 'glue' all parts together. The board is powered by a switched supply in order to reduce power dissipation. A watchdog is used for the detection of power and software failures.

(9)

An intelligent sensor controller using Profibus

E~

The core (as depicted in figure 2.1) of the sensor controller can be divided in the following functional blocks:

• Profibus-interface

• Profibus-controller

• Micro-controller

• Memory units (Flash, SRAM, EEPROM)

• Glue

• I/O-interface

• Data acquisition (static/semi-dynamic weight measurement)

• Power-supply

GLUE

Figure 2.1: Sensor Controller core

(10)

An intelligent sensor controller using Profibus

E ~ LLIPS

2.2 The fruit grading system

Inthis paragraph we will explain the fruit grading system's mechanical structure and its communication model which is based on a PROcess FIeldBUS (Profibus)

infrastructure.

2.2.1 Mechanical structure

Inthe grading system fruit is moving in cups from left to right over one of M (in our case: M~ 8) lines until, after the grading has taken place and its quality is known, the fruit is led to an exit by one of the N lines. See figure 2.2.

Inorder to measure cup-positions, a sensor SO indicates the position of the first cup on the line and the displacement of the cups is measured either by two proximity-sensors S 1 and S2 or is measured by a rotary encoder RE 1 which is coupled to the line's motor. A sensor S3 is used to indicate if any stretch has occurred in the chain of the line.

- - ~ ~

r-- ,...,

It---

'-" "-"

r-- I'-'

'-"

I ( ) ( ) c . , ) ( ) ( ) I

cC

p

I ( ) ( ) ( ) ( ) ( ) I

I ( ) ( ) ( ) ( ) ( ) I

I( )

.

( ) ( ) ( )# # ( )t I

l

Il II 0-

- ••

[S1] [52] [S3]~

'-- ~ ~ ~

M

.

[SO]

-

#

3 2

1

123 N

Figure 2.2: Line System

(11)

An intelligent sensor controller using Profibus

All fruit that is not qualified for sale is sorted out by hand beforeitreaches the grading system.Itis led to a delivery-line from which it is led to a weight-line where its

weight is measured in order to gain information about the amounts of degraded fruit.

This amount can then be subtracted from the total delivered amount of fruit in order to pay the supplier. At the end of the weight line a valve is placed to prevent fruit falling of the line.

Because of the static character of the weight measurement, the lines have to be controlled to assure an accurate measurement. A sensor initiates the weighing after detecting a full weight-line. The transducer used for the weight measurement is a standard load-cell [LC] that is placed in a Wheatstone bridge, see paragraph 5.2.

The system acts as follows:

While both the delivery- and weight-line are running and the exit-valve is closed, the fruit is led from the delivery-line onto the weight-line where the fruit is collected.

When the weight-line is full (indicated by the lack of pulses from a sensor [s4]) the delivery-line is stopped first, then the weight-line is stopped and after a certain debounce time the weight measurement takes place. When finished the exit-valve is opened and the weight-line is started in order to empty its cups. When, after a

specified time, the weight-line is empty the exit-valve is closed and the delivery line is started. Now the whole process is repeated again. See figure 2.3.

Start/stop

Valve

lr cJ

~ ~~

~'"

¥~--'-W-e-ig-h-t"~~ ~

Load cell [Lc]

Full-Sensor [54]

41>

~

....

"Delivery"

Figure 2.3: Static Weight System

(12)

An intelligent sensor controller using Profibus

When measuring colour, the fruit is rotated with a certain speed in order to get an accurate measurement. Inthe old grading system the fruit rotation was closely coupled to the system's line motor. Inthe current system this speed can be independent of the machine's line speed because a separate motor drives it. This way a more flexible system is achieved. An incremental encoder [RE2] that is attached to the motor takes care of the rotation speed measurement. See figure 2.4:

o

CoI"C••m

Rotation Encoder [RE2]

Figure 2.4: Roll system

(13)

An intelligent sensor controller using Profibus

E ~ LLIPS

2.2.2 Communication model

The communication model of the new fruit grading system is outlined in figure 2.5.

The general idea is that maximum flexibility must be offered to any customer using this system. Therefore, the system's architecture includes communication to the outside world. This way remote diagnoses and service of the system is possible, which is convenient when the actual factory is somewhere abroad. For example: the software of any device attached to the system can be updated from anywhere in the world by using the modem connection.

The grading system consists of several intelligent controllers and measurement systems that are all attached to one of two Profibuses. See paragraph 2.2.3 for a brief description of Profibus. One bus is used for peripherals that require fast data-

exchanges (token rotation lOms) in short messages (32 bytes data length), and the other one is intended for devices that will produce

Windows Windows

Sensor

ColorO :lVl :lVl

..0 ..0 I/O

~ ~

e e

a... a...

Colorl

~ Weight

co

V) V)

=> =>

co co

(14)

An intelligent sensor controller using Profibus

E ~ LLIPS

data at a slower rate (token rotation lOOms) but with more information (256 byte data length). Bus A (slow) is located in the systems 19" rack, while bus B (the fast one) is distributed over the line system. Only one master computer controls all devices.

This master computer is based on a real time operating system with the Profibus hardware in it. The master detects each new attached device and configures it according to the user's specifications. During operation the master receives

information of all devices attached to the busses in order to completely control the grading process. The grading system features the following devices [1]:

~ sensor controller

• detects cup-positions, performs roll- and 'static' weight measurement

~ weight controller

• dynamically measures the weight of the cup and its contents

~ I/O-controller

• switches relays on and off to let the cups drop their contents

~ diameter measurement unit

• measures the diameter of the fruit by means of a camera

~ colour detector

• detects the colour of the fruit inside the cup

Because the diameter measurement and the colour detector require only one data transfer for every cup but must be able to send complete images to the master computer, these devices are attached to the slower Profibus. The sensor controller generates more than one message for each cup and thus must be connected to the fast bus. The I/O-controller is used for dropping the contents of the cup, but is suited for any switching purpose. Therefore, switching at higher rates is also provided and the I/O-controllers are also connected to the fast bus. The weight controller might be attached to both busses since it requires only one message per cup but does not need to send large messages. For the moment we will leave itattached to the fast Profibus connection.

A unique number, the envelope number, will indicate every row of cups. Once a row of cups, maximal eight, passes a device, the master computer will indicate that device to start its measurement and will tell the device the envelope number of that row of cups. All devices will send their measurement results (e.g. weight or diameter) to the master computer, accompanied by the envelope number. The master computer stores all the information of the cups of that envelope, until it has all the information needed to send the contents of a cup to a certain exit. At the exits a semi-dynamic

measurement of the fruit weights can be carried out. This involves a simple and

(15)

2.2.3 Profibus

An intelligent sensor controller using Profibus

E ~ LLIPS

Nowadays automation systems are successfully established with fieldbusses. The main advantage of using fieldbusses is that information can be easily exchanged between the main system and its (distributed) devices in the field. Since fieldbusses operate from only two wires the costs of cabling can be drastically reduced.

Today there are several types of fieldbusses, some of them are INTERBUS-S, P-NET, CAN, PROFIBUS and WorldFIP [1]. Only few busses in the range of fieldbusses are standardised in Europe (EN 50170), these are PROFIBUS, P-NET and WorldFIP.

For our application the choice was made to use PROFIBUS since it is the fastest standardised fieldbus, it supports speeds up to 12 MbiUs and according to several studies (CONSULTIC, PNO) it is the fastest growing standard in this area.

At the moment there are more than 1200 Profibus-DP, PA and FMS products and services available from a broad range of manufacturers. As can been seen from the graph below, the number of Profibus-DP products is the fastest growing. (Source:

PNO, 1998)

PROFIBUS·DP iR::.ttfrc;tioftof "'\

jPROFIBUS·OP )

OIN1~245p.rt3, ~~~~~~;;~~~\

DIN 1'245 or'4 /

I ...

lROFIBUS.FMI

f. • • ShartofFMS/

DPClnbl Devlal

91 92 93 94 95 96 97

Figure 2.6: Profibus product graph

The Profibus standard specifies three kinds of communication protocols, namely Profibus FMS, PA and DP.

From these standards only Profibus DP (Decentralised Peripheral) can achieve 12 MbiUs, Profibus FMS (Fieldbus Message Specification) and Profibus PA (Process Automation) have maximum speeds of 1.5 MbiUs respectively 31.25 kbiUs.

Profibus DP is the fastest because its protocol is based on the lowest two layers (physical, data link) and the application layer of the OSI model, leaving out the other layers [2]. In the Profibus specification the data link layer is called Fieldbus Data Link

(16)

An intelligent sensor controller using Profibus

2.2.4 Profibus-DP

E~

In this paragraph we will discuss the functions of masters and slaves in the Profibus DP system. At the end of this paragraph the advantages of the use of Profibus DP will be summarised.

Profibus-DP Master

Two kinds of masters are possible in Profibus-DP [2]. The first one is a master of class 1 and the other one a master of class 2. A master of class 1 polls the associated slaves cyclically to submit data to its local users. A master of class 2 requests or sends a-cyclically messages with masters and slaves. A master of class 2 is used as a

programming- and/or management-system. In a realistic system it's possible that one master acts as a master class 1 as well as a master class 2.

Functions of a master class 1 are:

• Initialization of the DP-system

• Parameter-assignment and configuration of the dedicated DP-slaves, if

parameterization and configuration were okay then data-exchange-mode can be entered, otherwise the slave will be made inactive

• Cyclic data-exchange with the DP-slaves, this is done by polling all slaves sequentially

• Monitoring of the DP-slaves

• Fetching of diagnostic information from the DP-slaves (if errors occur) Functions of a master class 2:

• Commissioning of new active stations

• Down- and upload of parameters from and to other masters

• Checking of the configuration of slaves

• Downloading of in- and output-images of DP-slaves

A master communicates in four modes with the slaves:

~ Off-line

• No communication at all between a master and his slaves. This is the starting

(17)

An intelligent sensor controller using Profibus

E~

~ Clear

• This mode is the first real communication with the slaves. The slaves are parameterised and configured.Ifall went well the data-exchange-mode can be entered.Inthis state"OOH" is sent as output indicating that the slaves are still to be inactive in processing outputs.

~ Operate

• Now the master can cyclically exchange data with the dedicated DP-slaves.

Every slave is polled in a sequence. Each slave can receive output-data and send input-data to the master in one poll-cycle.Ifan error occurs at the slave then this will indicated to the master with a high-priority telegram.

An example of a poll-cycle is depicted below:

I

Trailer

I

Output-DATA

I

Header

> I

1

DP-SLAVE

DP-MASTER Immediate Respons

I

Trailer

J

r

Header

I

Input-DATA

~

Figure 2.7: Telegram-sequence in the Profibus-DP-system

The master will always start in off-line-mode (power-up). After this the following sequence has to be made to enter the productive (i.e.: operate) mode:

Off-line

-+

Stop

-+

Clear

-+

Operate

Furthermore to assure the correct timing in the DP-system, the master (de-) activates the watchdog-timer of the slave.Ifthe master doesn't communicate with the slave within the specified watchdog-time (defined in the parameter-telegram) the slave will assume that a serious (fatal) error has occurred (for example a power-failure or line- break).Ifthis happens the master has to parameterize and configure the slave in order to let the slave enter the data-exchange mode again.

(18)

Profibus-DP Slave

An intelligent sensor controller using Profibus

E~

A slave in the Profibus-DP system can be interrogated by a master of class 1 as well as by a master of class 2. A description of DP-slave communication is shown in below figure that presents the state-machine of the slave. Every ellipse in the picture is a state and every arrow is an event that directs the slave into a possible state.

SLAVE_Diag GET_CFG

CHK_CFG,NO OK

SET_PRM, NO __- - - I

OK

SLAVE_Diag SET_PRM GET_CFG

Figure 2.8: Profibus-DP-slave state machine

We'll start from the upper edge with the first phase: 'Power-On' mode. Only in this state an address-change-request is permitted only from a class 2 master.Ifthe slave supports this changing of the station-address, it shall have non-volatile memory on board. After this state the slave will go in wait-parameter-mode.

(19)

An intelligent sensor controller using Profibus

E~

After the 'Wait-Parameter' state, the 'WaicCfg' state is entered. The slave expects configuration-data from the master to check whether the master knows the length, sort and consistency of the exchange-data the slave expects. A master of class 2 can ask for the configuration of a slave by a GeCCfg-request. After the master has received the configuration of the slave, it will be send back to the slave in order to check for correctness.

After these two last states are approved, the data-exchange-mode will be entered.

Inthe 'Data-Exchange' mode the real data is exchanged (Le.: slave's in/output).

During this state diagnostic information can be requested by the master if the slave indicates an error to the master with a high-priority telegram (this is indicated in the FC-octet together with eventually input-data from the slave).

The images of the inputs and outputs of a slave can be requested by every master.

However the exchange of data from master to slave such that the slave has to process it, is only possible by the master that has parameterized and configured the slave before.

Advantages using Profibus:

Evaluating the system using Profibus DP as its communication protocol reveals that it has several advantages over the old fruit grading system.

Advantages of this new Profibus architecture are:

• only two twisted-pair cables necessary instead of two wires for every device, often resulting in several kilometres of wire

• higher speeds possible since the Profibus standard supports bit rates of 12 Mbit/s

• easy adding and removing of devices to the system

• easy update of software of each device via the modem-connection and Profibus

• connectivity of any third-party device designed for Profibus

(20)

An intelligent sensor controller using Profibus

2.2.5 Timing Specifications

E~

Timing is vital in fieldbus applications, particular in the case of our fruit grading system. The system must be able to respond within a certain amount of time to commands issued by the master computer. This is called the System Reaction Time.

We shall examine the reaction time for Profibus systems in this paragraph. We first define the Message Cycle Time, TMe, which is the time that elapses between two consecutive transmissions of a Profibus master station.

Figure 2.9 illustrates the Message Cycle Time[l],[2].

Master Station Slave Station Master Station

I

Send / Request1 ----~I

__

R_e....:.sp_o_ns_e_1 ~ Send / Request 2

I

~f---T-S-IR----"~TTD+TSDR~--T-AIR-~~

TTD+Till

~

.~---~

TMC

Figure 2.9: Profibus Message Cycle Time

The Message Cycle Time is therefore defined as:

(2.1)

TSIR

=

TAIR

=

TSDR

=

TID

TTD

=

Where all times are in bit times (TBIT

=

1 / bit rate) and

Transmission time of the action frame =a . 11 bits, a is the number ofUART-characters to send

Transmission time of the response frame

=

b .11 bits,

bis the number of UART-characters to send

Station Delay Time of Responders, time that elapses between request and response

Idle Time, time that elapses between response and new request Transmission Delay Time, time that elapses on the transmission medium between transmitter and receiver when a frame is

T line length (m)' bit rate (bit/s) b'

transmitted, - It

TD- 2· 108(rn!s)

(21)

An intelligent sensor controller using Profibus

E~

TMc,RE~is the message cycle time for a retry. We shall assume that this is the same time as the normal Message Cycle Time.

Inour fruit grading system two timing values are important. We must be able to switch the relays within a certain amount of time to ensure that fruit will leave the system at the correct exit. The time between two consecutive polls of a relay is the same as the System Reaction Time if we assume that all relays are listed once in the master's Poll List. The second important timing is the time between two consecutive polls of the encoder card (read sensor controller) in order to detect cup positions. To guarantee the required accuracy, the encoder must be polled more than once between two consecutive relay polls to give the exact conveyor position. This means that this card must be listed more than once in the Poll List. Unfortunately this is not possible in Profibus DP, therefore in the current design we will also need to access the FDL- layer directly.In future Profibus DPe (DP extensions) will be implemented, which allows the a-cyclic polling of slaves.

The desired specifications are that at a speed of 20 cups per second the system must be able to control the relays with an accuracy of l/5thcup. This means that the System Reaction Time must be less than 10 milliseconds. The encoder precision must be

1I20thcup at the same speed, so the time between two consecutive encoder polls must be less than 2.5 milliseconds.

Suppose the Poll List is set up in such a way that the master polls n other slaves, then the encoder, then again n other slaves, the encoder again and so on, until all slave stations are serviced. Assume furthermore that the relays are polled with an SD2- frame containing 4 user bytes, thus 13 bytes total. The response of each relay is simply an acknowledgement with a SC-message of 1 byte. The weight controller has also 13 bytes in its action frame and uses a total amount of 29 bytes in the response SD2- frame. The encoder needs a 6-byte SD1-frame and a 13-byte SD2-frame for its response. The Message Cycle Times for each device can be calculated from equation (2.1). For a description of the frame formats see [1], [2].

The total Message Cycle Time is:

Where:

TMC, TOTAL

=

nr .TMC,RELAY +TMC,WEIGlIT +

I

n:

1,

TMC,ENCODER

Nr

=

The number of I/O-controllers in the system Np

=

the total number of slaves in the system

N

=

the number of slaves polled between two encoder polls

(2.3)

The System Reaction Time TSR can then be determined from (2.2). The time between

(22)

An intelligent sensor controller using Profibus

E~

TSENSOR

= I npn-1l

(2.4)

Figures 2.10 and 2.11 show what the impact is of changingn with respect to the System Reaction Time and the encoder resolution for various bit rates, for a system containing one master, one encoder, one weight controller and 28 I/O-controllers.

-+-0,5 MbiVsii' _ 1 , 5 MbiVs ---J!r-3 MbiVs

-X-6MbiVs I

1 12 MbiVs

10 15 5

3

~ 50 - , - - - ,

l/)

E 45 -; 40 i=E 35 c 30

~ 25

g 20

ex:Gl 15

~ 10

~5f==::::;~===a~~~~~~

l/) 0 +-_ _-+-_ _--+ -I---_ _~

1

n

Figure 2.10: System Reaction Time versus n

I-+-0,5 MbiVs

~

_1,5MbiVS---J!r- 3 MbiVs I

""",*"",6 MbiVs I

___ 12MbiVs I

15 10

5 3

12 - , - - - .

11O

c .S! 8 'S~Gl 6 ex:

~ 4

"C

~

o

: ~~~~§§~~~~!=~::T

1

n

Figure 2.11: Encoder Resolution versus n

(23)

An intelligent sensor controller using Profibus

E~

Since we use a bitrate of 12 Mbit/s we can see from appendix B that the System Reaction Time TSR is 3.2 ms and the total Sensor Controller's Resolution TENcis 0.8 ms. So for two measurements (position and roll) the Sensor Controller's resolution has to be 0.4 ms.

Because we use reply update communication for the transfer of position information, theoretically the effective resolution (in cups) of the position measurement (paragraph 4.1) is dependent on the rate at which the position information data is updated.

Eff .resolution= cps' Tupd (2.5)

Where: cps

Tupd

cups per second Position update rate

0.09 - , . - - - , 0.08

0.07

0.06

'S 0.05 '0:ll

..

0.04

== 0.03

Cll 0.02 0.01

O~..:....,...,...,__r_.,...,.__r_.,...,...,...._ __r_...,..__r_...,..__r_,...,...,...I

(Tupd / 100) ns

\ 10cups/s

t 20cups/s

Figure 2.12: Encoder resolution versus update rate

As can be seen from above table, the resolution is within the required accuracy of 1I20lhcup at update rates below 2.6ms. This is with 1 cup per rotation, with 10 cups per rotation the resolution is 10 times lower at the same update rate.

(24)

An intelligent sensor controller using Profibus

3. EMBEDDED SYSTEM DESIGN

E ~ LLIPS

Inthis chapter the design of the embedded system will be discussed. First the desired specifications for the system will be formulated. Then the design is discussed and finally test results will be evaluated.

The sensor controller should, as stated earlier in chapter 2, act as a slave in the Profibus DP environment so all communications are restricted to this protocol.

Because Profibus DP makes use of Decentralised Peripherals, the sensor controller should be intelligent in order to handle dedicated processes and communicating only with the master to initiate processes and deliver results.

3.1 Specifications

The main task of the system is position measurement, while the other functions are implemented so the board can be used in a broader range of applications. The idea is that this board has to be much cheaper than the previous boards (I/O, Weight) and that it can be used instead whenever the required specifications are less demanding.

The embedded system as already described in paragraph 2 .2 should meet the following requirements:

• Galvanic connection to Profibus

• ESD-proof (Electro Static Discharge-proof)

• Support Profibus DP communication protocol (12 Mbit/s)

• Support Direct FDL access

• Support remote updates

Also (as seen in paragraph 2.2) the sensor controller needs to implement the following functions:

• Position measurement

• Fruit roll measurement

• Static weight measurement

• Semi-dynamic weight measurement

(25)

3.2 Design

An intelligent sensor controller using Profibus

E~

Inthis paragraph we will give a brief description and only discuss changes and extensions to parts of the embedded system that were used by the I/O controller and Weight controller board [1], [2].

3.2.1 Profibus Interface

The standard interface connection that is described in all Profibus specifications is shown in figure 3.1.

...lIllIl lll....PROFIBUS-DP

Shielded/Isolated

Profibus-

RTS RTS Controller

~ 1 INV I...

i

OPTO-CPLR

,

...

,

I'"

I'"

TxD-enable ....... RxD

.J

..

UART

"I

OPTO-CPLR

I ,

~

..

RS-485

I

,

,- DRIVER I... I... TxD

~

I

OPTO-CPLR

I'"

II

1_- _

"'IIIlII III"""

Figure 3.1: Description Profibus-interface

Inabove figure we see that opto-couplers are used to establish a galvanic isolation towards the Profibus controller's UART. The opto-couplers prevent disturbances from the hardware to occur at the Profibus controller and therefore disturbing the whole system.

On the other hand the circuitry should be protected against Electro Static Discharge (ESD) and any transients occurring on the Profibus.

Inorder to stay below the specified maximum capacitance of the Profibus (30 pF/m), the capacitance of the protection device should be low.

The Harris SP723 is a low capacitance (5 pF) electronic protection array, used for ESD and Over-Voltage protection. Up to six lines can be protected. Also care should be taken not to corrupt the RS-485-driver's common mode range (for the ADM1485: - 7 to+12 Volt). Shifting the SP723's input voltage levels with zener diodes assures

(26)

An intelligent sensor controller using Profibus

3.2.2 Microcontroller

E~

The Sensor Controller board will be the third board for the new fruit grading system since it is preceded by the I/O Controller and the Weight Controller.Inorder to achieve backward compatibility it is convenient to use the same microcontroller on all boards. The choice of an appropriate microcontroller depended on several aspects.

Main selection criteria were:

• 8 bit databus microcontroller because of the simple functions

• no critical speed (enough to control inputs / outputs / weights)

• watchdog (in case of power/software failures)

• easy interfacing with a Profibus controller

• low price (8 bit is cheaper than 16 bit)

• number of ports (depends on how many control-lines are needed)

• serial communications-protocol (UART and SPI)

• software-compatibility with a standard 8051

• number of pins (design of PCB easier)

• Flash-memory preferable instead of other (EEP)ROM (code uploads via Profibus) Because some experience is available at Ellips BV with the 8051-family, the 80C32 was chosen. Also this processor is recommended for the interface to the desired Profibus controller.

Unfortunately, after evaluation of the processor performance on the I/O-board, it was clear that the required timing requirements were not met.

The problem is that the interrupt handling is too slow, this occurs whenever the Profibus controller receives an indication and the microcontroller has to deliver the required (position) data. Inorder to assure the required response times (see paragraph 2.2.5) the system should be (at least) twice as fast as the old configuration.

Although it should be possible to speed up the lame part of the software (SPC4- communcication), this is not easy since this part is written by a third party (TMG- itec). Besides the fact that it is very time consuming, rewriting the code would probably not yield the required improvement in speed.

Inorder to speed up the system it is necessary to replace the 80C32 by a faster microcontroller that has to be compatible with it in order to support the previous

(27)

An intelligent sensor controller using Profibus

E~

By redesigning the processor core, wasted clock- and memory cycles have been removed, yielding a speed improvement of about 2,5 (at the expense of an increase in microcontroller-costs by factor 5). This should be sufficient for our application.

While the DS80C31 0 only features more interrupts, the DS80C320 additionally has a second serial port, a programmable watchdog and a powerfail interrupt.

The most speed improvement is gained from the dual data pointers, speeding up block data memory moves.

Because of the increased speed, attention should be paid to the timing requirements of the memory interface. For this purpose the DS80C31O/320 provides speed-adjustment in order to slow down off-chip data memory accesses when using slower memory.

The 80C31 0/320 is fully compatible with the well-known micro-controllers 80C51 and 80C32, featuring additional hardware (bracketed numbers for 80C32 specs).It contains a 256-byte scratchpad RAM, four 8-bit I/O-ports, three 16-bit timer/counters,

13(7) sources of 3 (2) priority level interrupts and 2(1)serial ports. All extra hardware is accessed via new special function registers.

Figure 3.2: DS80C320-microcontroller from Dallas

Because both the 80C310 and 80C320 are compatible with the 80C32, in the next paragraph a global description will be given of both controllers, indicating the differences between them. The memory-organisation is described and the interrupt model will be explained. For further detailed information, please refer to the

(28)

An intelligent sensor controller using Profibus

Functional description

E~

Port 0 is used as a multiplexed address/data-bus. Asserting ALE results in sending an address to an external latch. As ALE goes low, the address is latched and data can be send.

Port 2 is used as the upper 8 bit address-bus. The 80C31 0/320 from Dallas has no program-memory on board. The read- and write-control-lines are used to transfer data from and to external memory. PSEN is used to fetch program-code from EEPROM or Flash-memory. An USART can perform serial communication with other devices.

Also two timers are available to the user for counter/timer-purposes.

The memoryworganisation of the microcontroller

This micro-controller doesn't have any program-space internal, but instead all program-space is accessed outside. The memory-model of the controller is showed below:

External Ext.rncl

OOOOH OOOOH

'---y----./ '---v---' '~---v".---'

"Code Space" "Data Space" "Internal Data Space"

Figure 3.3: Memory-organisation of the microcontroller

Because the 80C31O/320 doesn't have any internal code-space. Up to 64KB ROM and 64KB RAM can be externally addressed by using the EA-signal. Also internally some

(29)

An intelligent sensor controller using Profibus

E~

The interrupt-system of the microcontroller

Timor 0 Ovorflow .-"0 ...0

ETO IE. 1

Timor 1 Ovorflow .-"0 ...0

TCON.O

H1 1E.3

~1 .-"0 ...0

ET2 EXEN2 IE.o

T2CON.3

.-"0 ...0

~1 USART

ES IE.4

P3.2/ ...0

INTO

EXO ILO

P3.3/ ...0

INT1

ITl EX1 EA PX1

TCON.2 IL2 1E.7 IP.2

Figure 3.4: 80C32 interrupt-model

From figure 3.4 we see that the 80C32 supports six maskable interrupt-sources with a two-level priority. The 80C320 adds 7 interrupt-sources to this scheme, extending the priority to three levels, where high priorities are commonly used for time-critical applications. The 80C31O has the same scheme as the 80C320 except for the Power Fail Interrupt (PFD, the 2ndSerial Port Interrupt (SCONl) and the Watchdog Toggle Interrupt (WDTl).

The interrupts can be level sensitive or event sensitive. All settings can be made by using the special function registers.

(30)

An intelligent sensor controller using Profibus

Below table summarises all interrupt sources of the 80C310/320:

E~

NAME PFI INTO TFO INTl TFl SCONO TF2 SCONl INT2 INT3 INT4 INT5 WDTt

DESCRIPTION Power Faillnterrupl Extemallnlerrupl 0 limerO Extemallnterrupll limer1

TIO or RIO from serial port0 limer2

Til or Rll from serial port 1 Externallnterrupl2 External Interrupt3 External Interrupt 4 Externallnlerrupt 5 Watchdog lime-out Interrupt

VECTOR 33h 03h OBh 13h lBh 23h 2Bh 3Bh 43h 4Bh 53h 5Bh 63h

NATURAL PRIORITY 1 2 3 4 5 6 7 8 9 10 11 12 13

OLD/NEW NEW OLD OLD OLD OLD OLD OLD NEW NEW NEW NEW NEW NEW

Figure 3.5: Interrupt-scheme 80C320

The Power-fail interrupt (PFI), if enabled, always has the highest priority. The two remaining priority-levels are user selectable high or low. All other new interrupt- sources have a lower natural priority than the original (80C32) ones.

(31)

An intelligent sensor controller using Profibus

3.2.3 Memory Management

E~

The memory management consists of the configuration of the memories for the 80C310/320 and the configuration of the memory located in the glue.

Memory Configuration of the 80C310

The microcontroller will need non-volatile memory for storing its program-code. Also Static RAM (SRAM) is needed for storing variables. We could use an EEPROM as program memory, but this would be inconvenient with respect to remote software updates. For a fruit grading system abroad this would mean that a new EEPROM has to be shipped every time the software is changed. Flash memory has the advantage that the processor itself can program it. After power on, the controller will transfer its program from Flash memory to SRAM and run from SRAM afterwards.Ifthe master computer sends new software, the host controller will store it in Flash memory, from whichitcan boot. This provides a very flexible service for upgrading the system's software, since the actual program code can be send to the master station over a phone line using modems.

The memory-module can be divided into three parts:

1. SRAM 2. EEPROM 3. Flash-memory

The SRAM is addressed via the glue-logic and micro-controller to store variable data and new program code for the Flash-memory.

Also the stack from the micro-controller can be located here if wished.

Aspects to consider when selecting a type of memory are: price, speed, second sources, compatibility, availability and memory size (32Kbytes or more needed for SRAM)

Several manufacturers produce SRAM memory, some of them are Samsung, Hitachi, UMC, Toshiba, Cypress and others.

(32)

An intelligent sensor controller using Profibus

ELLIPS ~

The Flash-memory is used to hold the complete sensor-controller software. Also specific parameter-data can be stored here, for example the Serial Number which is used for identification of the sensor-controller.

To assure that it is possible to download new firmware, a boot-sector-program is always present in the lowest 16K-part of the Flash-memory. This program includes only the most elementary communications-code, capable to download new code over the Profibus with the ASIC and Profibus-DP protocol.

Several Flash-memories are available, but not all of them are programmable in a trivial way. The most convenient way is to program the memory by software, without the use of additional hardware. A lot of Flash-memories need a 'high' voltage for programming the device, but a few Flash-memories can be programmed by the same 5-Volt voltage that is used for its power supply. This eliminates the need for

additional hardware. Manufacturer AMD has introduced some Flash-memories that can be programmed with a voltage of 5 Volt. The minimum size of these Flash- memories is 128Kbytes. These Flash-memories have the possibility to erase whole blocks (sectors) of memory at once. Also very straightforward programming-software is presented with it. Second sources for this device are from ATMEL and Toshiba.

An EEPROM is used to store the actual station-address of the device. The EEPROM is connected to the microcontroller via a Serial Protocol Interface (SPI), which is a protocol standardised by Motorola. SPI consists of three lines; one line provides a clock-signal, while the other lines are used to transmit the data and address. In this way the EEPROM is quickly addressable and is less complex to program than the Flash-memory.

The microcontroller can perform all actions if it is able to choose from one of three memory configurations, shown in figure 3.6. The left side in each memory block is program memory, while the right side is data memory.

After power-on the host will start in theboot-configuration, in which it will run its program from Flash-memory. The Flash memory is 128kB and only the lower 64kB will be used in this state. The processor will start running from address 0 and this is where its "survival code" is located. This piece of code allows the host to download new software over the Profibus. In this way, the system will always run, even if by accident the rest of the host software is erased.

(33)

An intelligent sensor controller using Profibus

E~

The upper 64kB of the Flash memory is used in the nonnal-configuration. This allows the host to run a different program by simply switching the memory configuration.

The lower 64kB of the Flash-memory can for example be filled with the "survival- code", while the actual encoder functions are located in the upper 64kB of the Flash- memory.

The memory mode can be controlled (read/write) by a special register in the Glue, while the Flash bank is selected with a write-only register in the Glue.

Bus arbitration is necessary, since only one multiplexed data/address bus is used to address the Flash memory, the SRAM, the SPC4 and the micro-controller.

Furthermore, the different memory modes imply that program instructions are fetched from both SRAM and Flash-memory. Access control of the appropriate chips is also managed by the Glue logic.

The figure below shows the three memory configurations of the 80C3l 0/320.

FFFF FFFF FFFF

F GLUE GLUE GLUE

cooo F cooo cooo

L

IX

L

IX

Flash-

A A bank

S 8000 S 8000 8000

H H

0 RAM 1 RAM RAM RAM

ססoo ססoo ססoo

Boot Normal Update

Figure 3.6: Memory Configuration of the 80C310/320

The MMU on the I/O board and the weight board was established conventionally, namely chipselect was operated by an adresdecoder in the glue, read and write control signals were shared for the data memory and PSEN was used for the program

memory. Also the demultiplexing of data/address was done in the glue.

When using the Dallas DS80C3l 0/320, this MMU does not meet all timing requirements because the memory interface is too slow (see Appendix G).

Inorder to win some time, all devices' chip selects should be tied to the appropriate levels in order to be continuously asserted. Then we make use of separate read/write signals for each device. This saves up to l5ns resp. 20ns for the SRAM and the Flash.

(34)

An intelligent sensor controller using Profibus

E~

Although the SPC4 is too slow, this is simply solved by using the Dallas' feature for stretching read/write operations. A stretch value of I should be sufficient. See appendix G.

When fetching program code the MMU should decide whether to access the Flash or the SRAM. The signal PSEN controls this flow. Dependant on the provided address either the Flash or the SRAM has to be selected. Since the chipselects are all asserted an active PSEN signal will always access the Flash first. However when the address falls in the SRAM area a fast switch has to be made.

The read and write signals should be delayed and should not become active before the correct address is valid. Incase of reads this isn't very important because the correct value will be read at the end. But in case of a write, (code) data can be corrupted.

From appendix G we see that the address latch has critical specifications, the

propagation delay should be low (around IOns), because the more propagation delay the less time remains for the memory access. Also the hold time should be less than 3ns because PSEN can become active already 3ns after ALE has become inactive.

This means we have to place the latch outside the glue. With a fast latch (74VHCT573) this timing is assured.

When the read/write signals are delayed by IYz-clock cycles, it is assured that the address will be valid before the actual action is carried out. Also the read/write signals should become inactive whenever the original read/write has become inactive, this way its pulse width stays within the specified ranges.

When implementing the MMU in the glue it is highly recommended to fix the read and write logic near to each other to keep the propagation delays as low as possible.

See appendix I.

(35)

3.2.4 Glue

An intelligent sensor controller using Profibus

E~

The glue is used for the implementation of the Memory Management Unit (MMU), the position decoding logic and all supplementary hardware.

Its functionality is described with VHDL and implemented in a Quicklogic pASIC, type QL 2003 QPFIOOC. See appendices H andI.

The following table summarises all registers and their addresses, located in the glue:

Address ReadlWrite Function

COOO-DFFF - Not Used

EOOO-E5FF RIW SPC4 dual ported ram

E600-EFFF - Not Used

FOOO W Memory Mode:

OOh - Boot Olh- Normal 02h- Update

FOOl W Flash Bank: 0-7

The number of the Flash bank that will be mapped in data memory at 8000h-BFFFh in memory mode Update.

F002 R Slave address of Sensor controller as set with the switches F003 RIW Output register: (1=active, O=inactive)

Bit 0: Solid Output 0 Bit I: Solid Output I Bit 2: Solid Output 2 Bit 3: Solid Output 3 Bits 4-7: 0

F004 RIW Interrupt register:

Writing a zero to the bit resets it (* no interrupt generated).

Bit 0: 1 = General Purpose Interrupt Bit 1: 1 = Position AddWin Interrupt Bit 2: 1 = Position SubWin Interrupt Bit 3: 1 = Position Zero Indication * Bit 4: 1 = Latch Command

Bit 5: 1 = Roll Addwin Interrupt Bit 6: 1= Roll SubWin Interrupt Bit 7: 1 = Roll Zero Indication * F005 R General Purpose Input register:

Bit 0: Digital input 0 (ApISdisp IISfull) Bit I: Digital input I(BpiSdisp2) Bit 2: Digital input 2 (Cp)

Bit 3: Digital input 3(Ar) Bit 4: Digital input 4 (Br) Bit 5: Digital input 5 (Cr) Bit 6: Digital input 6 (SO) Bit 7: Digital input 7 (Sr)

A description of the interrupt register is given in paragraph 4.3

(36)

An intelligent sensor controller using Profibus

E~

F006 RIW GPI-interrupt-mask

Bit 0: Digital input 0, (l=enable, O=disable interrupt) Bit 1: Digital input 1

Bit 2: Digital input 2 Bit 3: Digital input 3 Bit 4: Digital input 4 Bit 5: Digital input 5 Bit 6: Digital input 6 Bit 7: Digital input 7

F007 R Bits 0-3 : RollCounter-MSB-value (bits 8-11) Bits 4-7 : PositionCounter-MSB-value (bits 8-11)

F008 R PositionCounter-LSB-value

F009 R RollCounter-LSB-value

FOOA RIW Counters Mode Register: (1= enable, 0 = disable) Bit 0: Position count reset at zero-pulse Bit 1: Roll count reset at zero-pulse

FOOB-FFFF - Not Used

Table 3.1: Glue memory configuration

The design of the MMU can be derived from above table and the design of the position decoding from paragraph 4.3.

The glue consists of the following in- and outputs, grouped by its functionality:

Signal: Port type: Description:

AD7 ... ADO in/out Multiplexed address and data A7 in ... AO in in 8 lower address lines

A8 in ... All in in Address lines for ITAG purposes A15 in ... AI2 in in Address lines for register addressing A16 out. .. A14 out out Address lines for MMU bankswitch

WRN in Memory-write from uC

RDN in Memory-read from uC

PSEN in Strobe for code reads from uC

RDN_FLASH out Read signal Flash

RDN RAM out Read signal SRAM

RDN SPC4 out Read signal SPC4

WRN FLASH out Write signal Flash

(37)

An intelligent sensor controller using Profibus

ELLIPS ~

Signal: Port type: Description:

OUTO ... OUT3 out Outputs to solid state switches GPIO ... GPI7 in Inputs from the sensors

GLUE INTN out Interrupt from glue to J..lC Table 3.3: I/O signals of the glue

Si~nal: Port type: Description:

CLK 2 in 24 MHz from SPC4

RST m reset logic in glue

RST ADC in reset AID Converter

RSTN OUT out active low reset

10 0 ... 10 6 out slave address sensor card

Table 3.4: Additional signals of the glue

The Memory Management takes care of redirecting all accesses to SRAM, Flash, EEPROM, SPC4 or the registers in the glue.

Because the SOC31 0/320 has a multiplexed data/address bus, demultiplexing is necessary.

As stated earlier this is done with an extemallatch.

For the processing of the inputs and outputs the glue provides registers to store actual values, for the inputs an interrupt is generated every time an input-value changes. An interrupt mask register is provided in order to mask interrupts when using rotary encoders.

The glue further consists of the rotary decoding logic and conversions from active high to active low of some signals.

See appendices H andI.

Referenties

GERELATEERDE DOCUMENTEN

We will thus investigate how we can use cloud object storage to provide a cost effi- cient storage solution, which is sufficiently protected against single cloud provider outages,

This research is an exploratory study into finding ways to optimize the existing data transfer protocol over Bluetooth Low Energy (BLE), so that the relatively large amount of

Because Heves is planning to ask for a patent on the product idea and design, a part of the research question and full thesis title is left out as well as further details about

Is it, within the possibilities of Voetencentrum Wender and current or new partners, feasible to develop a system that can measure pressures over the complete foot, in such a way

The performance of the cMWS is not limited by the process of multiplexing the APP coronagraph and Holographic Modal Wavefront Sensor (HMWS) constituents or structures in the tele-

Annotation_id refers to an ID in an Annotation table (Table 7) which contains all annotations for that ID and possibly a comment on it which is stored in the table Comments (see

A design has been made of the joint controller framework, which consists of real-time tasks in order to execute the function blocks with real-time requirements. A prototype of the

Future research can look further into the opportunity identification process. The personality