fingersensors.h File Reference

#include "t89c51cc02.h"
#include "datatypes.h"

Go to the source code of this file.

Defines

#define FINGERSENSOR_COLUMN_SELECT0   P1_6
#define FINGERSENSOR_COLUMN_SELECT1   P1_7
#define Fingersensors_PowerOff()   FINGERSENSOR_COLUMN_SELECT0=0; FINGERSENSOR_COLUMN_SELECT1=0
#define Fingersensors_SelectBank1()   FINGERSENSOR_COLUMN_SELECT0=1; FINGERSENSOR_COLUMN_SELECT1=0
#define Fingersensors_SelectBank2()   FINGERSENSOR_COLUMN_SELECT0=0; FINGERSENSOR_COLUMN_SELECT1=1
#define FINGERSENSORS_NR   4

Functions

void Fingersensors_init (void)
 initializes fingersensors subsystem
void Fingersensors_read (void)
 read all finger mounted force sensing resistors

Variables

WORD idata fingersensors [FINGERSENSORS_NR]
 storage buffer for current fingersensor values


Detailed Description

Definition in file fingersensors.h.


Define Documentation

#define FINGERSENSOR_COLUMN_SELECT0   P1_6
 

port pin to access sensor matrix column 0

Definition at line 5 of file fingersensors.h.

#define FINGERSENSOR_COLUMN_SELECT1   P1_7
 

port pin to access sensor matrix column 1

Definition at line 7 of file fingersensors.h.

#define FINGERSENSORS_NR   4
 

number of mounted finger sensors

Definition at line 16 of file fingersensors.h.

Referenced by Fingersensors_init(), and main().

 
#define Fingersensors_PowerOff  )     FINGERSENSOR_COLUMN_SELECT0=0; FINGERSENSOR_COLUMN_SELECT1=0
 

disables finger mounted sensors

Definition at line 10 of file fingersensors.h.

Referenced by Fingersensors_init(), and Fingersensors_read().

 
#define Fingersensors_SelectBank1  )     FINGERSENSOR_COLUMN_SELECT0=1; FINGERSENSOR_COLUMN_SELECT1=0
 

selects Bank 1 of the finger mounted sensors

Definition at line 12 of file fingersensors.h.

Referenced by Fingersensors_read().

 
#define Fingersensors_SelectBank2  )     FINGERSENSOR_COLUMN_SELECT0=0; FINGERSENSOR_COLUMN_SELECT1=1
 

selects Bank 2 of the finger mounted sensors

Definition at line 14 of file fingersensors.h.

Referenced by Fingersensors_read().


Function Documentation

void Fingersensors_init void   ) 
 

initializes fingersensors subsystem

P1.1 and P1.2 are configured as valid analogue inputs for the subsystem.

Definition at line 33 of file fingersensors.c.

References fingersensors, FINGERSENSORS_NR, and Fingersensors_PowerOff.

Referenced by main().

void Fingersensors_read void   ) 
 

read all finger mounted force sensing resistors

The samples are saved into the buffer. (see fingersensors )

Definition at line 49 of file fingersensors.c.

References ADC(), fingersensors, Fingersensors_PowerOff, Fingersensors_SelectBank1, and Fingersensors_SelectBank2.

Referenced by main().


Variable Documentation

WORD idata fingersensors[FINGERSENSORS_NR]
 

storage buffer for current fingersensor values

The buffer is located in indirect addressable IRAM of the T89C51CC02

Definition at line 26 of file fingersensors.c.

Referenced by Fingersensors_init(), Fingersensors_read(), and main().


Generated on Wed Oct 24 12:57:24 2007 for SensorControl by  doxygen 1.4.6