AUTOMOTIVE MULTIPLEX SYSTEM

Abstract: An automotive multiplex system has three stations (10, 11, 12). Each station has an optical interface (13), a microcom­ puter (14), and an input/output matrix (15) for receiving input signals, for example, from switches and for providing output signals (16) to vehicle components. Each interface (13) trans­ mits optical data signals through an optical fibre (17) and receives signals through a fibre (18). The fibres (17) are con­ nected to one end of rod (19) which operates as a passive optical mixer, the fibres (18) being connected to the other end. The rod (19) and a set of fuses (21) are housed in a junction box (20) and each station receives power power from the fuses (21) through a power rail (23). The stations are arranged to transmit in turn, the next station transmitting if one station fails. Each station is prevented from transmitting more than 10 times in direct succession.

Description: Automotive Multiplex System" This invention relates to an automotive multiplex wiring system. The requirement to provide increased electrical system functions in a road vehicle but at the same time to reduce the size, weight, complexity and cost of vehicle wiring has led to the development of vehicle multiplex wiring systems. The majority of the systems use electrical wiring as the transmission medium. A few of the systems use optical fibres as a transmission medium, the use of optical fibres providing the advantages of immunity from electromagnetic radiatlon and electrical isolation. One arrangement which ses optical fibres comprises a central active it which is connected to each individual station by a pair of optical fibres. The central unit includes a separate transmitter and a receiving element for each individual station an is arranged to receive data from the individual stations and then to retransmit this data back to the other stations. This system suffers from a number of disadvantages. The need to provide a central active unit having a separate transmitting and receiving element for each individual station results in a system which is both complex and costly. Furthermore, as all data must be relayed via the central unit this causes a delay in transmitting data which may not always be tolerable in an automotive application. Also, this system suffers from the disadvantage that failure in the central active unit will cause failure of the entire system. It is accordingly an object of this invention to provide a new or improved automotive multiplex system in which the above-mentioned disadvantages are overcome or reduced. According to this invention there is provided an automotive multiplex system comprising a plurality of individual stations, each individual station including an optical interface, a set of optical guides each of which is connected at one end to the optical interface of a respective individual station and a passive optical mixer connected to the other ends of the optical guides thereby providing an interconnection between the individual stations. By using the passive optical mixer, the problems of cost and complexity are overcome and a delay in transmitting data is eliminated. Also, as there is no central active unit, there is no danger of failure in such a unit causing a failure of the entire system. In the present invention, there must clearly be some order in which the individual stations make their transmissions. However, if one station fails to transmit this may lead to problems. In order to avoid such problems, each station may include means for causing the stations to transmit in a predetermined order, and means for causing the next station to transmit in the event of one station failing to transmit. Each station may further include means for preventing the station from transmitting more than a predetermined number of times without receiving data. The electrical supply to the individual stations could be provided by a ring circuit. However, as the ring circuit would have to be installed separately from the optical guides and as the electrical supply to some or all of the stations in any road vehicle must be fused, the overall arrangement would be complex. In a preferred arrangement of the present invention, the system includes a set of fuses positioned beside the optical mixer, and a set of power lines each of which is connected between the set of fuses and the power input of a respective individual station and each of which runs alongside its associated optical guide. Conveniently, each optical interface includes optical receiving means and optical transmitting means and each optical guide comprises at least one optical fibre or at least one bundle of optical fibres. Conveniently, each optical guide comprises a pair of optical fibres or a pair of bundles of optical fibres, one fibre or bundle being associated with the receiving means and the other fibre or bundle being associated with the transmitting means. As the present system is designed for use in road vehicles, there is likely to be a high degree of variation of received signal strength between the individual stations. Therefore, it is important that the signal processing of the received signals in the individual stations has a high degree of immunity from noise whilst maintaining high sensitivity to valid signals of low amplitude. Preferably, each station includes means for processing received optical signals, said processing means being provided with hysteresis. Preferably, the effect of hysteresis reduces with increasing frequency. By providing the processing means with hysteresis, a high degree of immunity from noise may be achieved. At the same time, by reducing the effect of hysteresis with increasing frequency, distortion of pulse duration is substantially reduced. Also, when the power of the received signals is at a very low level, there may be an intolerably high error rate in receiving the signals and it is clearly important for this to be indicated. By providing hysteresis, the processing means will not respond to received signals of very low power and will thereby provide the desired indication. When a station is transmitting, it is clearly essential for the station to provide a synchronising pulse. If the synchronising pulse is provided at the beginning of transmission, this may lead to problems in the other stations as the initial pulse would be liable to erroneous reception. In order to overcome this problem, each station may be arranged to transmit optical data in accordance with a predetermined format, said format comprising an initial set of data bits, a synchronisation pulse, and one or more further sets of data bits. Said format may include a second sychronisation pulse following said one or further sets of data bits. In order to permit easy distinction between the first and second sychronisation pulses, the first and second sychronisation pulses may be opposite logic levels. Each set of data bits may terminate with a parity bit, the parity bit serving both as a check on the parity of data in the preceding data bits and to adjust the logic level of the optical signal to the correct level for the succeeding data bits or synchronisation pulse. The initial data bits may commence with one or more bits of predetermined data, said predetermined data being identical for each station. Each station may include means for verifying the received optical signal by examining the predetermined data bits. This invention will now be described in more detail by way of example, with reference to the accompanying drawings in which: Figure 1 shows a general arrangement of an automotive multiplex wiring system embodying this invention; Figures 2a, 2b, 2c and 2d illustrate the format used to transmit signals in the arrangement of Figure 1; Figure 3 is a circuit diagram of the optical interface and microcomputer provided in each station of the arrangement shown in Figure 1; Figure 4 is a circuit diagram of an input/output matrix used in each station of Figure 1; Figure 5 is a block diagram showing the overall program structure used to control the computer shown in Figure 3; and Figures 6 to 19 are flow charts of the individual programs. Referring now to Figure 1, there is shown the overall arrangement of a multiplex wiring system for handling data concerned with control functions related to the front doors of a passenger vehicle. Although the present invention will be described with reference to this particular system, it is to be appreciated that the present invention may be used to control other or further functions and that the particular example has been selected only for purposes of illustration. The system shown in Figure 1 comprises a station 10 positioned in the driver's door, a station 11 positioned in the front passenger door, and a station 12 positioned in the central console. Each of these stations comprises an optical interface 13, a microcomputer 14, and an input/output matrix 15. The input/output matrix 15 receives input signals. For example, in the case of the station 10 these signals will be derived from switches for operating the vehicle windows, the position of mirrors located on both the driver's door and the passenger door, the positions of the driver's seat, and various lights inside the vehicle. In the case of the station 11, the input signals will be derived from switches for operating the window on the passenger door, and the position of the passenger seat. In both the stations 10 and 11, input signals are also received from a switch associated with the door lock for controlling locking of all doors in the vehicle. Each input/output matrix also provides output signals and these are indicated by the arrows 16. In the case of stations 10 and 11, the output signals will control functions such as the position of the windows, the position of the mirrors mounted on the doors, and the operation of the door locks. In the case of station 12 positioned in the central console, the output signals will control the position of the front seats, position of the windows in rear doors, the locks mounted in the rear doors and in the tail gate, and various lights in the vehicle. Each optical interface 13 transmits optical data signals through a lmm plastic optical fibre 17 to a passive optical mixer 19 and receives optical signals from the optical mixer 19 through a lmm plastic optical fibre 18. The optical fibres 17 and 18 associated with each interface thus operate as an optical guide. The passive optical mixer 19 comprises a 30mm long rod of 3mm diameter plastic fibre, and the fibres 17 are connected to one end of this rod whilst the fibres 18 are connected to the other end. The mixer 19 is positioned inside a junction box 20 which also houses a set of power fuses 21. One end of the fuses 21 is connected to a positive terminal 22 and the other end of each fuse is connected to a power line 23 which is connected to the power input of an associated station. Each of the power lines 23 is associated with a rail 24 which supplies the logic circuitry of its associated station. The rails 24 are connected at a junction point 25. The two plastic fibres 17 and 18 and the two electrical rails 23 and 24 which extend between the junction box 20 and a particular station are combined to form a four core ribbon cable. Thus, the wiring between the junction box 20 and the individual stations and also the fusing of the power supply to the individual stations is achieved in a particularly simple manner. Although in the present arrangement each station is associated with a pair of fibres, it is envisaged that the pair of fibres may be replaced by a single fibre. In this case,the mixer 19 would take the form of an optical block provided with a mirror on one face with the optical fibres being connected to the block on a face which opposes the mirror. Moreover, each optical fibre may be replaced with a bundle of fibres. Although the rails 23 are permanently energised, the rails 24 receive power from the rails 23 only upon closure of one of three switches 26, 27 and 28. When one of these switches is closed, the signal supplied to the logic circuitry of each station causes the station to be reset and initialized. The switches 26 and 28 are operated upon insertion of a key into the lock of the associated door and the switch 27 is closed upon operation of the vehicle ignition switch. Thus, the system is brought into operation either by inserting a key into one of the front door locks or by operating the ignition switch. Each station in turn makes a transmission of data bits in accordance with a fixed format. This format is illustrated in Figures 2a to 2d. The transmission is made by using a light emitting diode which is operated on an ON/OFF basis with ON corresponding to a high logical level and OFF corresponding to a low logical level. The data is biphase encoded so that one logic level transition in a data bit corresponds to logic On and two level transitions correspond to logic "1". As shown in Figure 2a, each transmission commences with four zeros Z and these are followed by four address bits D which identify the station. The address bits are followed by a single odd parity bit P and this is followed by high synchronisation pulse S. The high sychronisation pulse is followed by one or more sets of data bits. Each set of data bits except for the last set comprises eight data bits D followed by an even parity bit P. The number of data bits in the last set is determined by the requirement of the particular station and the data bits are followed by an odd parity bit D. All parity bits are with respect to zero. After this odd parity bit, the light emitting diode is turned off thereby providing a low synchronisation pulse S. The first four zeros and the address bits and a high synchronisation pulse are illustrated in more detail in Figure 2b, the subsequent set of data bits are shown in more detail in Figure 2c, and the final set of data bits and the low sychronisation pulse are shown in Figure 2d. By positioning the high sychronisation pulse after the initial zeros and address bits, it is ensured that this pulse will be received reliably. If this pulse were positioned at the beginning of the transmission, there would be a danger that it would be received unreliably as the initial bit or bits of a transmission are particularly prone to corruption. The sychronisation pulse also serves to inform each station that it must change from a mode in which it is identifying the transmission station to a mode in which it decodes the data bits. By making the initial sychronisation pulse high and the final sychronisation pulse low, the arrangement required to distinguish between these two sychronisation pulses may be made particularly simple. If both sychronisation pulses were high but of different duration, it would be necessary to provide very accurate timing circuitry in each station to distinguish between them. The four zeros at the beginning of each transmission gives each station an opportunity to adjust to the power level of the received signal. Also, the initial zeros are tested and, if they are not correctly received, the data in the subsequent transmission is not used. The optical interface 13 and the microcomputer 14 in each station is identical and their circuit diagram is given in Figure 3. The received optical signals are detected by PIN photodiode D1, the cathode of which is connected to the positive power rail and the anode of which is connected to the non-inverting input of a type CA3140 operational amplifier 40. The anode of this diode is also connected through a 1 megohm resistor R1 and a 51 kilohm resistor R2 to earth. Resistor R2 is bridged by 0.1 microfarad capacitor C1 and the junction of resistors R1 and R2 is connected to the positive supply rail by a 100 kilohm resistor R3. Resistors R2 and R3 and capacitors C1 serve to provide a bias for diode D1 and the resistor R1 converts the current from diode D1 to a voltage. The output of amplifier 40 is connected through a 100 kilohm resistor Rq, a 10 kilohm resistor R5 and a 0.1 microfarad capacitor C2 to earth and the junction of resistors R4 and R5 is connected to the inverting input of amplifier 40. Resistors R4 and R5 provide amplifier 40 with the desired amplification and capacitor C2 provide a bias voltage for eliminating the DC component from the input signal and for making the amplifier substantially insensitive to the effect of temperature variation on diode D1. The output of amplifier 40 is connected through a 100 kilohm resistor to to the non-inverting input of another type CA3140 operational amplifier 41. Resistor R6 is bridged by a 15 nanofarad capacitor C3 and the output of amplifier 41 is connected to the non-inverting input through a 5 megohm resistor R7. The inverting input of amplifier 41 is connected to the junction of resistors R4 and R5. Resistors R6 and R7 provide hysteresis for amplifier 41, thereby providing this amplifier with a high degree of immunity from thermal and electrical noise and ensuring that no output is provided when there are no optical signals being transmitted. Capacitor C3 reduces this hysteresis at higher frequencies such as are experienced during data transmission and thereby prevents the hysteresis caused by resistors R6 and R7 from causing any appreciable distortion in pulse duration. By connecting the junction of resistors R4 and R5 to the inverting input of amplifier 41, the bias voltage for this amplifier is supplied directly from the bias voltage for amplifier 40. Consequently, the output of amplifier 40 is connected directly to the input of amplifier 41 without a component such as a capacitor which would cause a time delay and which might cause severe corruption to the input signal to amplifier 41. It is to be appreciated that amplifier 40 thus operates as an AC amplifier whilst amplifier 41 operates as a DC amplifier with high gain. The high gain of amplifier 41 provides the overall arrangement of amplifiers 40 and 41 with a very high dynamic range. For best results, the time constant of resistor R6 and capacitor C3 and resistor R5 and capacitor C2 should be approximately equal. If the time constant of resistor R6 and capacitor C3 were too long, the effectiveness of hysteresis would be reduced whilst if the time constant were too short it would have the effect of reducing overall sensitivity. Also, in order to permit the amplifiers 40 and 41 to adjust quickly to the signal level of each data transmission, the time constant should be relatively short and should be chosen to correspond to 1.5 bit periods. Although in the arrangement described above, the hysteresis is achieved with resistors R6 and R7 and capacitor C3, other arrangements are possible. For example, digital electronics may be used and, if desired, the hysteresis may be achieved by using software. Also, although amplifier 40 and 41 provide two stage processing of the receiving optical signals, other arrangements are envisaged. For example, a third stage may be provided to increase the gain still further. Thus, during reception of optical signals, at the output of amplifier 41 there appear pulse trains as shown in Figures 2b, 2c and 2d. The output of amplifier 41 is connected to one input of an exclusive NOR gate 42, the other output of which is connected to the positive supply rail. The output of NOR gate 42 is connected to one input of an exclusive NOR gate 43, the output of which is connected to one input of a further exclusive NOR gate 44. The other input of gate 44 is connected to the positive supply rail. The output of gate 44 is connected to the interrupt pin INT of microcomputer 14. Microcomputer 14 takes the form of a Motorola type MC68705P3 microcomputer. The program for controlling this computer is stored in its read-only memory and this program will be described in due course. Pin Co of port C of microcomputer 14 is connected to the other input of NOR gate 43 and pin C1 is connected to the output of NOR gate 42. In operation, three quarters of the way through each bit period the level of the output signal of gate 42 is read using pin C1 and pin C0 is then set to this level. Consequently, the level transition at the beginning of the next bit period causes the signal supply to the interrupt pin INT to go low and this causes a hardware interrupt in microcomputer 14. Also, the level of the signal at the interrupt pin IN reé quarters of the way through each SSW period will be high when a logic 1 is beings transmitted and low when a logic 0 is being transmitted and so may be used to decode the optical signals. Pin C3 is used during data transmission and this pin is connected to one input of an exclusive NOR gate 45 the other input of which is connected to the positive supply rail. The output of gate 45 is connected to the base of a PNP transistor T1, the collector of which is connected to earth and the emitter of which is connected through a resistor R8 to the positive supply rail. The emitter of transistor T1 is also connected to the anode of a 670nm high brightness light emitting diode D2, the cathode of which is connected to earth. The diode D2 is decapped and brought into very close contact with its associated optical fibre. In operation, when the output signal of pin 3 is high, diode D2 is energised thereby transmitting light into its optical fibre and when the output of this pin is low diode D2 is de-energised. Ports A and B of microcomputer 14 are connected to the input/output matrix shown in Figure 4. In particular, pins Bo to B7 are connected to rails 50 to 57 of the matrix, these rails respectively defining rows 0 to 7, and pins Ag to A7 are connected to rails 60 to 67, these rails respectively defining columns 0 to 7. Each cross-point of the matrix which is used defines either an input to the microcomputer from the matrix or an output from the computer to the matrix. In each matrix, row 0, columns 7 to 4 are not used for convenience. Consequently, no connections are made between the rows and the columns for these four intersections. Also, in each matrix row 0, columns 3 to 0 provide data which represents the identity of the station in which they are located. In Figures 3 and 4 these cross-poir.ts are denoted by reference letter A. To achieve this, diodes are connected between the columns and rows with the anodes of the diodes being connected to the columns and the cathodes being connected to the rows so as to provide the correct identity. In each matrix, row 1, columns 7 to 0 are used to provide inputs to the microcomputer for control functions which occur only at their own station. Such inputs will be referred to below as local inputs. Inputs which provide data to be transmitted to other stations commence at row 2, column 7 and continue through the remaining columns and rows as far as may be required. These inputs will be referred to below as transmitting inputs. Each input is achieved by connecting the respective column through a switch to the anode of a diode, the cathode of which is connected to the respective row. Additional wiring may be provided so as to combine inputs in any logical manner which may be desired. At each intersection which represents an output, the column is connected to the D input of a D-type flip flop and the row is connected to its clock input. The Q output of the flip flop is connected to the gate of an FET transistor, the source of which is connected to earth and the drain of which is connected through a relay coil to a 12V rail. The relay controls one or more power switches which provide the desired output control signals. In the example shown in Figure 4, such outputs occur in row 7, columns 7 to 0. The flip flops, transistors and relay coils are respectively denoted by reference numerals 70, 71 and 72. In operation, the inputs are read by strobing each row in turn with a low signal and the data is read by port A of the microcomputer 14. Consequently, the data is received in inverted form and, as will be explained below, it is complemented before being used. Data is transmitted to the input/output matrix by strobing each row in which outputs are present and supplying the data via port A of the microcomputer. Each microcomputer 14 is identically programmed. Consequently, if a microcomputer fails it may be replaced with a spare microcomputer or, alternatively, with a microcomputer from a less important station. The overall program structure for the microcomputer is shown in Figure 5. Referring now to Figure 5, when the system is initially energised program flow enters a program RESET. This program calls a program BACKGROUND. The overall program includes two interrupt programs HWI and TIMER. The program HWI is entered when the signal on pin INT goes low. The microcomputer has an internal timer having a data register which is continuously decrimented by the internal clock. When the data register reaches 0, a timer interrupt occurs and the program TIMER is entered. If a microcomputer is operating in a data receiving mode, program flow passes from the program TIMER to a program RX. If it is operating in a data transmitting mode, then the program flow passes to a program TX. The program RX can call one of four sub-routines DECODE, SYNCH, PRIORITY and POINTER. The sub-routine DECODE operates on each data or parity bit as it is received and calls further sub-routines TRANSLAT and FORMAT. The sub-routine SENCH performs certain operations upon detection of the high or low synchronisation pulse. This sub-routine calls further sub-routines OUTPUT and SAVE. The sub-routine PRIORITY is a dummy sub-routine in the present program. However, if the present invention is used in a system in which it is desired to give priority to a particular input, this sub-routine may be used to make the station jump into the transmitting mode upon operation of such an input. The sub-routine POINTER checks to see if the station is the next station to transmit and, if it is, a sub-routine INITIAL is called which prepares the station for transmission. The program TX is responsible for data transmission and controls the transmitting output signals of port C. This program calls a sub-routine STAMOD which provides the data bits prior to the high synchronisation pulse and a sub-routine DATMOD which provides the subsequent data bits. The overall program includes four look-up tables SRCTAB, LDTAB, STATAB, and MAP. Each input in each input/output matrix is assigned an address which will be referred to below as a source address. The input of row 2, column 7 of the first station is assigned address Ol and the remaining inputs of this station and then the inputs of the remaining stations are assigned addresses in ascending order. A dummy address is included at the end of each station. The source address of the first input of each station is stored in the table SRCTAB. Each output of each input/output matrix is also assigned an address and these addresses will be referred to below as load addresses. Load addresses commence with address Ol for the output located at row 7, column 0 of the first station and the numbering then continues row by row and station by station. The load address of the first output of each station is stored in the table LDTAB. The load address or addresses associated with each source address are stored in the table MAP. In the table STATAB, the address of each station together with the correct parity bit is stored as a function of station address. The individual programs will now be described in more detail. After entering the program RESET, in a step S1 the direction registers are initialized, the station then reads its own address from its own input/output matrix and stores this at location STANUM. The initial load address of the present station and also the load address of the next station are read and stored at locations LOADDP and LOADDN. The timer interrupt mask is then cleared and lastly, in a step D2, counter 0FCCTR is cleared and software matrices OUT and PEND are set to zero. The matrix PEND is used to store data as it is being received during each transmission and the matrix OUT is used to store data at the end of each transmission. Program flow then passes to the program BACKGROUND in which the timer interrupt and the hardware interrupt masks are continuously cleared. These masks are cleared continuously to prevent them from being set by noise hits which may easily occur in an automotive environment. Throughout the overall program, it will be observed that various registers are set to desired values more often than may appear necessary and the reason for this is also as a precaution against the possibility of noise hits. After entering the program HWI, a flag SEND is examined in a step S3. This flag is set during the transmission mode. If it is set, a return from interrupt is performed. If it is not set, after a delay of four cycles the pin INT is examined. The purpose of this is to check that this interrupt was not caused by noise. If the pin INT is high, a return from interrupt is performed. If it is low, the timer data register is set so as to cause a timer interrupt three quarters of the way through the bit period. k counter CNTRL is then set to zero. The counter CNTRL controls program flow through the program RX. Lastly, the timer interrupt request bit is cleared before performing a return from interrupt. After entering the program TIMER, the timer interrupt request bit is cleared and then, in a step S47 the flag SEND is examined. If it is set, program flow passes to the program TX and if it is clear the program flow passes to the program RX. After entering the program RX, the counter CNTRL is incremented. The timer data register is then set so that the next timer interrupt will occur after the lapse of a further three quarters of a bit period. Providing a data or parity bit is subsequently transmitted, the next interrupt will in fact be a hardware interrupt. The purpose of setting the timer data register at this stage is to detect either a high or a low synchronisation pulse. Then, the hardware interrupt mask is cleared as it is important to determine if a hardware interrupt has occured during execution of the program RX. In a step Ss, the pin INT is read, a register SHIFT is rotated one bit to the left and a new data bit is stored on bit 0 of this register. Next, the pin C1 is read and then, in a step a atest is made to determine if a hardware interrupt has occurred. If such an interrupt has occurred, the data stored in the step Ss is unreliable and so, in a step S7 this bit is deleted. After performing step S7, program flow jumps to a step S8 in which the direction registers are set for the receiving mode before performing a return from interrupt. If a hardware interrupt has not occurred, in a step Sg pin C0 is set to the value read for pin C1. The purpose of doing this as explained above is to cause the ¯next level transition in the input data to cause a signal at pin IN to go low. Next, the counter CNTRL is examined. If this counter is equal to 1, the sub-routine DECODE is called. If it is equal to 2, the sub-routine SYNCH is called, if it is equal to 4, the sub-routine PRIORITY is called and if it is equal to 5, the sub-routine POINTER is called. If the counter CNTRL is equal to or greater than 12, it is reset to 4. After entering the sub-routine DECODE, a flag VALID DATA is examined. This flag is set in the sub-routine SYNCH during the high synchronisation pulse. If this flag is not set, a return from sub-routine is performed. If it is set, in a step Slo a flag PENDING ERROR is examined. If this flag is set, it is reset to 0 and the flag ERROR is set. The sub-routine then continues with a step Sll in which bit 0 of register SHIFT is examined. If this bit is equal to 0, counter ZERCTR is incremented. The counter ZERCTR counts the zeros in each set of data bits and is used for parity checking. The sub-routine then continues with a step S12 in which a counter BIT is decremented. This counter is then examined in a step S13 and, if it is equal to 0, this means that all eight bits and the parity bit of one set of data bits have been transmitted. If it is 0, it is reset to 9 in a step S14 in preparation for the next set of data bits. In steps S15 and S16, the flag ERROR is examined and the counter ZERCTR is also examined to determine if the parity of the eight data bits is even. If the parity is even, the counter ZERCTR is set to 0 and, if the parity is odd, the flag PENDING ERROR is set and the counter ZERCTR is set to 0. Return from interrupt is then performed. If it is found in step S13 that the counter BIT is 0, the program passes to the sub-routine TRANSLAT. In the sub-routines TRANSLAT and FORmAT, the data bit which has just been received is stored in the matrix PEND. After entering the program TRANSLAT, the load address corresponding to the source address of the bit which has just been transmitted is obtained from the table MAP. In order to do this, the table MAP is addressed with the present value of a variable SOURCE. The varible SOURCE is set to the initial source address of the transmitting station during the program SYNCH. Then, in a step S17 the load address is compared with the initial load address LOADDN of the next station. If it is equal to or greater than this address, the variable SOURCE is incremented and a return from sub-routine is performed. If is less than this load address, the initial load address LOADDP of the present station is subtracted from the load address of the data bit to obtain the relative load address. Then, in a step S19 the relative data address is examined. If it is negative, a return from sub-routine is performed. If the relative load address is not negative, it means that the load address for this data bit is within the present station and so, in a step 520 the relative load address is assigned to the data bit. The variable SOURCE is then incremented in a step S21 in preparation for receiving the next data bit. The program flow then passes to the program FORMAT in which the data bit is loaded into the matrix PEND. A return from sub-routine is then performed. As mentioned above, program flow passes to the sub-routine SYNCH when the counter CNTRL is found equal to 2 in the program RX. This will occur if a level transition in the optical signal does not occur at the end of a data bit or a parity bit and so will normally occur during the high synchronisation pulse or the low synchronisation. After entering this program, in a step S21 pin C1 is examined. If the high synchronisation pulse is being received, this pin will be high and so, in a step S22, the contents of register SHIFT are examined. If the initial four zeros and the address bits have been transmitted and received correctly, the parity of these bits will be odd. If the parity is found to be odd in step S22, a variable POINT is loaded with the address of the transmitting station and this is obtained from the register SHIFT. Then, in a step S23, the variable SOURCE is loaded with the initial source address of the transmitting station and this address is obtained from the counter SRCTAB. Lastly, before performing a return from interrupt, counter BIT is set to 9, flag ERROR is cleared, flag VALID DATA is set, counter ZERCTR is cleared, and flag SEND is cleared. These operations are performed in preparation for receiving the data bits which follow the high synchronisation pulse. If in step S22 it is found that the parity is even, in a step S24 flag VALID DATA is set to 0 thereby preventing subsequent data bits from being entered into the matrix PEND. If in step S21 pin C1 is low, this means that the low synchronisation pulse has been received and the program flow jumps to step S2s. As explained above, the last set of data bits are transmitted with odd parity and this parity is examined in step #25 If the parity is odd, and flag ERROR is cleared, in a step S26 the flag VALID DATA is cleared, the counter ZERCTR is set to 0, and the counter OFFSTR is set to 0. If in step S25 it is found that the parity is even, in a step S27 the flag ERROR is set, the flag VALID DATA is cleared, and the counter ZERCTR is set to 0. After performing step S26 or S27, the sub-routine OUTPUT is entered. After entering the sub-routine OUTPUT, in a step S29 the flag ERROR is examined. If this flag is set, the data present in matrix PEND is not reliable and so the program flow passes to the sub-routine SAVE in which the contents of matrix OUT are copied into matrix PEND. Thus, the matrix PEND is provided with the most recent set of reliable data. The program flow then passes to the beginning of program BACKGROUND. If the flag ERROR is clear, in a step S29 row 0 of matrix PEND is copied into row 0 of matrix OUT. This data relates to outputs which are also addressed by local inputs of the station. Then, in a step S30 these local inputs are read, the read data is complemented, and then logically OR'ed with row 0 of matrix OUT. Then, in a step S3lr row O of matrix OUT is loaded into the appropriate outputs of the input/output matrix. In a step S32, the remainder of matrix PEND is loaded into the appropriate outputs of the input/output matrix and in a step S33 the remainder of matrix PEND is copied into matrix OUT. The program flow then passes to the beginning of program BACKGROUND. As mentioned above, the sub-routine PRIORITY is a dummy sub-routine in the present system and is illustrated as such in Figure 14. After the low synchronisation pulse has been transmitted each station must decide if it is the next station to transmit. This decision is made in the sub-routine POINTER. After entering this sub-routine, in a step S34 the variable POINT is incremented and this variable is then examined in a step S3s. If this variable is equal to the variable STANUM the present station will be the next station to transmit and so program flow passes to the sub-routine INITIAL. If in step S35 it is found that the variables POINT and STANUM are not equal, in a step S36 the initial source address corresponding to the present value of the variable POINT is obtained from the table SRCTAB. x test is then made to see if the source address is O in a step S37. If the address is 0, it means that the variable POINT has been incremented to a station which does not exist and so this variable is reset to 0 and the program returns to step S35. If the variable SOURCE is not 0, a return from interrupt is performed. If for some reason such as a detachment of the light emitting diode from its optical fibre occurs in the station which is next to transmit, the counter CNTRL will continue to be incremented during each passage through the program RX in the remaining stations. When this counter reaches a value of 12, it will be reset to the value of 4, as was explained above, and consequently in each station a further passage will then be made through the sub-routine POINTER. Thus, in the event of transmission failure in one or more stations, the transmission sequence will move on until it reaches a station which is able to transmit. After entering the sub-routine INITIAL, in a step S38, the counter OFFCTR is examined. If this counter is set to a value less than 10, it is incremented in a step S3g. Then, in preparation for data transmission, the flag SEND is set, the counter BINCTR is set to 8, and the various flags used during transmission are initialized. Then, in a step S40 and still in preparation for transmission, port C is initialized for transmission and in a step S41 a register BUFFER is cleared. As will be explained, the data which is about to be transmitted is stored in this register. A return from interrupt is then performed. Providing a station is operating correctly, it will never transmit more than once in succession. However, a fault may occur which causes a station to transmit continuously. For example, if the photodiode becomes detached from its optical fibre, the station will not receive the transmissions of other stations and it will never pass into the receiving mode. In the present system, each station is prevented from transmitting more than eleven times. If in step S38 the counter OFFCTR is found to be greater than 10, it means that the station has already transmitted eleven times. In this event, in a step S42r the counter OFFCTR is set to 11 and the flag SEND is cleared to prevent further transmissions. Then, as data may have been received incorrectly, in a step S43 all the outputs in the input/output matrix are reset and a¯ jump is then made to step S40. After entering the program TX, in a step S44 the timer data register is set to a value which will cause a further timer interrupt after half a bit period has elapsed. Thus, timer interrupts occur each half period and as may be readily appreciated this is necessary for transmission of biphase coded data. Then, in a step S45, a flag SEND SYNC is examined. This flag is set for transmission of one of the synchronisation pulses. If this flag is not set, the program continues with a step S46 in which the flag ZERO TRANSITION is examined. This flag is cleared when a O is being transmitted to prevent level transmission halfway through the bit period. If this flag is clear, in a step S47 it is set and the program then jumps to a step S4g. If this flag is set, in a step S49, bit 7 of register BUFFER is examined. This bit represents the bit which has been currently transmitted. If this bit is 1, in a step #so' port C of the microcomputer is complemented in order to cause a level transition and the program then continues with step S8. If this bit is 0, in a Step S51 a counter PTYOTR IS incremented. This counter is used to count the zeros in each set of data bits and is used to determine the correct value for the parity bit. Then, in a step S52 the flag ZERO TRANSITION is cleared in preparation for the next passage through this program. The program then jumps to step S50. In step S48r a flag NEW BIT is examined. This flag is set during the first half of each bit period so as to cause a new data bit to be entered into bit 7 of register BUFFER during the subsequent passage through program TX. Thus, if the flag NEW BIT is set, in a step S53 it is reset. Then, in a step S54 a flag HIGH SYNC is examined. This flag is set after transmission of a high synchronisation pulse. Consequently, if this flag is cleared, the sub-routine STAMOD is called and, if it is set, the sub-routine DATMOD is called. A return from interrupt is then performed. If in step S48 it is found that the flag NEW BIT is clear, this flag is set to 1, and, in a step S55 the counter BINCTR is incremented. The counter BINCTR is used to count the transmission of each successive data bit. Next, in a step S56 the direction registers are set and a return from interrupt is then performed. After entering the sub-routine STAMOD, in a step S57 the counter BINCTR is examined. In each transmission, during the first passage through this sub-routine this counter will have a value 8. When it does have this value, in a step S58 the first row of the input/output matrix is read. Then, the station's own address is stored at location STANUM, the register BUFFER is loaded with the station number and parity bit obtained from table STATAB, and the next row of the input/output matrix is strobed. k return from sub-routine is then performed. During the next passage with this sub-routine, the counter BINCTR will have a value 7. In this case, in a step S59, the load addresses of the present station and the next station are stored at locations LOADDP and LOADDN. Then, in a step S60, using the table SRCTAB the number of inputs to the station are calculated by subtracting the initial source address of the present station from the initial source address from the next station. This value is stored at location SRCCTR. As a dummy source address is included for each station, the number stored will in fact be one greater than the number of inputs. Then, in a step S the next data bit is moved into bit 7 of the register BUFFER by rotating this buffer and a return from interrupt is then performed. During the next 6 passages through this sub-routine the register buffer is rotated to put a new bit in bit 7. During the last passage, the counter BINCTR will have a value of 0 and, in a step S63 t the counter SRCCTR is examined. If this counter has a value greater than 7, in a step S64 the counter BINCTR is set to 8, the counter PTYCTR is set to 1, and the counter DATCTR is set to 0. If the counter SRCCTR is at a value less than 8, in a step S65 the counter SRCCTR is decremented and the counter BINCTR is then set equal to the new value of SRCCTR in a step S66, Steps S64, S65r and S66 are performed in preparation for the first passage through the sub-routine DATMOD. Following these steps, in a step S67 the flag SEND SYNC is set in preparation for the high synchronisation pulse. Then, the flag HIGH SYNC is set and, as a precaution, the flag SEND is set. A return from sub-routine is then performed. After entering the sub-routine DATMOD in a step S68 the counter BINCTR is examined. If this counter is at a value greater than 0, in a step S69 the counter DATCTR is examined. If this counter is greater than 0, in a step S70 a new bit is loaded into bit 7 of the register BUFFER. If this counter is at 0, new data is required in preparation for transmission of the next set of data bits. Therefore, in a set of steps S71 to S73, the counter DATCTR is set to 8, the next row of the input/output matrix is strobed, and the complement of the data read at port A of the microcomputer is stored on the register BUFFER. Following steps S70 to 573, the counters SRCCTR and DATCTR are decremented before performing a return from sub-routine. If in step S68 it is found that the counter BINCTR is set to 0, in a step S74 the counter SRCCTR is examined to see if there are further data bits to be transmitted. If this counter is at a value greater than 0, it is examined again in a step 575. If it is at a value equal to or greater than 8, the counter BINCTR is reset to 9 in a step S76, If the counter SRCCTR is at a value less than 9, the counter BINCTR is set at the present value of counter SRCCTR in a step 577 and, in a step S78, the counter SRCCTR is decremented. Step S78 is needed to compensate for the dummy source address in each station. After performing step S76 or steps S77 and S78r in a set of steps S79 to Sglr bit 7 of register BUFFER is set to the value of bit 0 of the counter PTYCTR in preparation for transmitting the parity bit. Bit O of counter PTYCTR will indicate the correct parity. If in step S74 it is found that the counter SRCCTR is equal to 0, there are no further data bits to be transmitted and the program continues with a step S82. In step S82 a flag LOW SYNC is examined. If it is clear, in a step S83 this flag is set. In a step S84 bit 7 of the counter PTYCTR is inverted in order to provide for the odd parity bit at the end of the present set of data bits. Then in a step S85 the counter BINCTR is incremented in order to force the program flow to pass from step S68 to S74 through the next passage through this sub-routine. The parity bit is then set at bit 7 of register BUFFER in steps 579 to S81 as before. During the next passage through this sub-routine, from step S82 the program jumps to step S85 in which the flag SEND is cleared. This will cause transmission to be terminated during the next passage through the program TIMER. Lastly, in a step S86 the flag SEND SYNC is set.

Claims: CLAIMS: 1. An automotive multiplex system comprising a plurality of individual stations (10,11,12), each individual station including an optical interface (13), a set of optical guides (17,18) each of which is connected at one end to the optical interface (13) of a respective individual station, and characterized that the system further includes a passive optical mixer (19) connected to the other ends of the optical guides (17,18) thereby providing an interconnection between the individual stations (10,11,12). 2. An automotive multiplex system as claimed in claim 1 characterized in that each station (10,11,12) includes means for causing the stations to transmit in a predetermined order, and means for causing the next station to transmit in the event of one station failing to transmit. 3. An automotive multiplex system characterized in that each station (10,11,12) includes means for preventing the station from transmitting more than a predetermined number of times without receiving data. 4. An automotive multiplex system as claimed in claim 1, characterized in that the system includes a set of fuses (21) positioned beside the optical mixer (19), and a set of power lines (23) each of which is connected between the set of fuses (21) and the power input of a respective individual station (10,11,12) and each of which runs alongside its associated optical guide (17,18). 5. An automotive multiplex system as claimed in claim 4, characterized in that each power line (23) is combined with its associated optical guide (17,18) to form a ribbon cable. 6. An automotive multiplex system as claimed in any one of the preceding claims in that each optical interface (13) includes optical receiving means (D1) and optical transmitting means (D2) and each optical guide (17,18) comprises at least one optical fibre or at least one bundle of optical fibres. 7. An automotive multiplex system as claimed in claim 6, characterized in that each optical guide (17,18) comprises a pair of optical fibres or a pair of bundles of optical fibres, one fibre or bundle (18) being associated with the receiving means (D1) and the other fibre or bundle (17) being associated with the transmitting means (D2). 8. An automotive multiplex system as claimed in any one of the preceding claims, characterized in that each station (10,11,12) includes means (40,41) for processing received optical signals, said processing means (40,41) being provided with hysteresis. 9. An automotive multiplex system as claimed in claim 8 characterized in that the effect of hysteresis reduces with increasing frequency. 10. An automotive multiplex system as claimed in any one of claims 1 to 7, characterized in that each station (10,11,12) includes means for processing received optical signals, said means comprising a first stage (40) for providing AC amplification, a second stage (41) for providing DC amplification, means (R6,R7) for providing the second stage (41) with hysteresis, and means (C3) for reducing the effect of hysteresis with increasing frequency. 11. An automotive multiplex system as claimed in claim 10 characterized in that each processing means (40,41) includes a bias signal generator (C2) for the first stage (40), means for providing a bias signal for the second stage (41) directly from the bias signal to the first stage, the output signal of the first stage being provided to the input of the second stage without a time delay. 12. An automotive multiplex system as claimed in any one of the preceding claims characterized in that each station (10,11,12) is arranged to transmit data in accordance with a predetermined format (Figures 2a), said format comprising an initial set of data bits, a synchronisation pulse, and one or more further sets of data bits. 13. An automotive multiplex system as claimed in claim 12 characterized in that said format (Figure 2a) includes a second synchronisation pulse following said one or further sets of data bits. 14. An automotive multiplex system as claimed in claim 13, characterized in that the first and second sychronisation pulses are of opposite logic levels. 15. An automotive multiplex system as claimed in any one of claims 12 to 14 characterized in that each set of data bits terminates with a parity bit, the parity bit serving both as a check on the parity of the data in the preceding data bits and to adjust the logic level of the optical signal to the correct level for the succeeding data bits or synchronisation pulse. 16. An automotive multiplex system as claimed in any one of claims 12 to 15 characterized in that the initial data bits commence with one or more bits of predetermined data, said predetermined data being identical for each station. 17. An automotive multiplex system as claimed in claim 16, characterized in that each station (10,11,12) includes means for verifying the received optical signal by examining the predetermined data bits.

Inventors: CHANA, RAWINDER SINGH, DUESBURY, PAUL GEOFFREY
Applicants: LUCAS INDUSTRIES PUBLIC LIMITED COMPANY
Application year: 1984
Main classification: B60R16
IPC codes: B60R16, G02B6