Main Page | File List | Globals

driver.c File Reference

#include <ez8.h>
#include "main.h"
#include "driver.h"

Go to the source code of this file.

Functions

void adbusoutput (char c)
 Byte value to A/D bus.
void adress_enable_on ()
 Enables Address Enable signal.
void adress_enable_off ()
 Disables Address Enable signal.
void adress_decode_on ()
 Enables Address Decode signal.
void adress_decode_off ()
 Disables Address Decode signal.
void output_function_enable_on ()
 Enables Output Function Enable signal.
void output_function_enable_off ()
 Disables Output Function Enable signal.
void input_function_enable_on ()
 Enables Input Function Enable signal.
void input_function_enable_off ()
 Disables Input Function Enable signal.
void deselect_board_on ()
 Enables Deselect Board signal.
void deselect_board_off ()
 Disables Deselect Board signal.
void adressingboard (char id)
 Addressing a board.
void byteout (char data)
 Sends a byte to a board.
char bytein ()
 Recieves a byte from a board.
char singleadconverting ()
 A/D converting.
void dob (char id, char data)
 Digital Output Board operation.
char dib (char id)
 Digital Input Board operation.
void aob (char id, char data)
 Analog Output Board operation.
char aib ()
 Analog Input Board operation.
void setadcinputs ()
 Seting up port H to analog inputs.
void setadbustoinput ()
 Setup port G to input.
void setadbustooutput ()
 Setup port G to output.
void bussetup ()
 Seting up Bus system.


Function Documentation

void adbusoutput char  c  ) 
 

Byte value to A/D bus.

Function to output a char to the AD bus.

Definition at line 13 of file driver.c.

References ADBUSOUT.

Referenced by adressingboard(), and byteout().

void adress_decode_off  ) 
 

Disables Address Decode signal.

Function to turn on the Address Decode pin on Control Bus low. Does not affect other signals on the control.

Definition at line 60 of file driver.c.

References CONTROLBUSIN, and CONTROLBUSOUT.

Referenced by adressingboard().

void adress_decode_on  ) 
 

Enables Address Decode signal.

Function to turn on the Address Decode pin on Control Bus high. Does not affect other signals on the control.

Definition at line 48 of file driver.c.

References CONTROLBUSIN, and CONTROLBUSOUT.

Referenced by adressingboard().

void adress_enable_off  ) 
 

Disables Address Enable signal.

Function to turn on the Address Enable pin on Control Bus low. Does not affect other signals on the control.

Definition at line 36 of file driver.c.

References CONTROLBUSIN, and CONTROLBUSOUT.

Referenced by adressingboard().

void adress_enable_on  ) 
 

Enables Address Enable signal.

Function to turn on the Address Enable pin on Control Bus high. Does not affect other signals on the control.

Definition at line 24 of file driver.c.

References CONTROLBUSIN, and CONTROLBUSOUT.

Referenced by adressingboard().

void adressingboard char  id  ) 
 

Addressing a board.

Function to put an address on the AD bus.

Definition at line 145 of file driver.c.

References adbusoutput(), adress_decode_off(), adress_decode_on(), adress_enable_off(), and adress_enable_on().

Referenced by aob(), dib(), dob(), and main().

char aib  ) 
 

Analog Input Board operation.

Function to perform a full AD conversion. This function exists to match the other board functions.

Definition at line 247 of file driver.c.

References singleadconverting().

void aob char  id,
char  data
 

Analog Output Board operation.

Function to perform a full board operation for a Analog Output Board.

Definition at line 235 of file driver.c.

References adressingboard(), and byteout().

void bussetup  ) 
 

Seting up Bus system.

Function to set up the Z8 port E for Control bus use.

Definition at line 329 of file driver.c.

References ADBUSOUT, CONTROLBUSOUT, deselect_board_off(), deselect_board_on(), setadbustooutput(), and setadcinputs().

Referenced by main().

char bytein  ) 
 

Recieves a byte from a board.

Function to reveive data from a board. The function sets the AD bus to input mode before requesting data from the board. After data has been reveived, the board is turned off and AD bus set to output mode again.

Definition at line 176 of file driver.c.

References ADBUSIN, input_function_enable_off(), input_function_enable_on(), setadbustoinput(), and setadbustooutput().

Referenced by dib(), and main().

void byteout char  data  ) 
 

Sends a byte to a board.

Function to put data on the AD bus and toggle Output Function enable ON and OFF.

Definition at line 161 of file driver.c.

References adbusoutput(), output_function_enable_off(), and output_function_enable_on().

Referenced by aob(), dob(), and main().

void deselect_board_off  ) 
 

Disables Deselect Board signal.

Function to turn on the Deselect Board pin on Control Bus high. Does not affect other signals on the control.

Definition at line 132 of file driver.c.

References CONTROLBUSIN, and CONTROLBUSOUT.

Referenced by bussetup().

void deselect_board_on  ) 
 

Enables Deselect Board signal.

Function to turn on the Deselect Board pin on Control Bus high. Does not affect other signals on the control.

Definition at line 120 of file driver.c.

References CONTROLBUSIN, and CONTROLBUSOUT.

Referenced by bussetup().

char dib char  id  ) 
 

Digital Input Board operation.

Function to perform a full board operation for a Digital Input Board.

Definition at line 221 of file driver.c.

References adressingboard(), and bytein().

void dob char  id,
char  data
 

Digital Output Board operation.

Function to perform a full board operation for a Digital Output Board.

Definition at line 208 of file driver.c.

References adressingboard(), and byteout().

void input_function_enable_off  ) 
 

Disables Input Function Enable signal.

Function to turn on the Input Function Enable pin on Control Bus low. Does not affect other signals on the control.

Definition at line 108 of file driver.c.

References CONTROLBUSIN, and CONTROLBUSOUT.

Referenced by bytein().

void input_function_enable_on  ) 
 

Enables Input Function Enable signal.

Function to turn on the Input Function Enable pin on Control Bus high. Does not affect other signals on the control.

Definition at line 96 of file driver.c.

References CONTROLBUSIN, and CONTROLBUSOUT.

Referenced by bytein().

void output_function_enable_off  ) 
 

Disables Output Function Enable signal.

Function to turn on the Output Function Enable pin on Control Bus low. Does not affect other signals on the control.

Definition at line 84 of file driver.c.

References CONTROLBUSIN, and CONTROLBUSOUT.

Referenced by byteout().

void output_function_enable_on  ) 
 

Enables Output Function Enable signal.

Function to turn on the Output Function Enable pin on Control Bus high. Does not affect other signals on the control.

Definition at line 72 of file driver.c.

References CONTROLBUSIN, and CONTROLBUSOUT.

Referenced by byteout().

void setadbustoinput  ) 
 

Setup port G to input.

Function to set up the Z8 port G for AD bus input mode use.

Definition at line 303 of file driver.c.

Referenced by bytein().

void setadbustooutput  ) 
 

Setup port G to output.

Function to set up the Z8 port G for AD bus output mode use.

Definition at line 316 of file driver.c.

Referenced by bussetup(), and bytein().

void setadcinputs  ) 
 

Seting up port H to analog inputs.

Function to set up the ADC in the Z8.

Definition at line 288 of file driver.c.

Referenced by bussetup().

char singleadconverting  ) 
 

A/D converting.

Function to perform an AD conversion in the Z8. Only the 8 highest bit of the 10 bit result is used.

Definition at line 193 of file driver.c.

Referenced by aib(), and main().


Generated on Mon Jan 3 09:13:09 2005 for RapierZ8 by  doxygen 1.4.0