PYQ2898 Excelitas Technologies Sensors, PYQ2898 Datasheet - Page 7

no-image

PYQ2898

Manufacturer Part Number
PYQ2898
Description
Pyroelectric Infrared Detectors - Dual Element Detectors
Manufacturer
Excelitas Technologies Sensors
Datasheet

Specifications of PYQ2898

Lead Free Status / Rohs Status
RoHS Compliant part Electrostatic Device
interrupt [EXT_INT0] void ext_int0_isr(void)
{
}
// ****************************************************************************
// function: digipyro()
//
// do not read asynchronous to the ADC- converter. Read the interface interrupt-driven: High = new data
// this routine should preferrably be used by the interrupt routine only.
// use Data[] for access to the DigiPyro after interrupt
// reads DigiPyro data: Data[0]: Channel 1, Data[1]: Channel 0, Data[2]: Temperature
void digipyro(void)
{
}
void main(void)
{
}
w w w . o p t o e l e c t r o n i c s . p e r k i n e l m e r . c o m
for (j=0; j < 60; j++);
for (k = 0; k < 3; k++)
// Func6=In Func5=Out Func4=Out Func3=Out Func2=Out Func1=In Func0=In
// State6=T State5=0 State4=0 State3=0 State2=0 State1=T State0=T
// External Interrupt initialization
// INT0: On
// INT0 Mode: Rising Edge, DigiPyro triggers Interrupt to be immediately read after conversion
MCUCR &= 0xFC;
channel1
channel0
temperature = Data[2];
// ... your code ...
int i, j, k, pir_data;
pir_data = 0;
DDPDL = PORT_IS_INP;
while(DPDL_IN == 0);
{ for (i=0; i < 14; i++)
}
DDPDL
DPDL_OUT = 0;
DDPDL
return ();
// Port C initialization
PORTC = 0x00;
DDRC = 0x3C;
GICR
GIFR
SFIOR
#asm("sei")
int channel1, channel0, temperature; // DigiPyro data 3 x 14 Bit
MCUCR &= 0xFC;
digipyro();
MCUCR |=0x03;
// Disable External Interrupt0 until DigiPyro is read.
{ DPDL_OUT = 0;
}
Data[k] = pir_data;
pir_data = 0;
DDPDL
DPDL_OUT = 0;
#asm("nop")
DPDL_OUT = 1;
#asm("nop")
DDPDL = PORT_IS_INP;
#asm("nop")
#asm("nop")
for(j=0; j < 2; j++);
pir_data <<=1;
if (DPDL_IN) pir_data++;
|= 0x40;
|= 0x40;
|= 0x04;
= PORT_IS_OUTP;
= PORT_IS_INP;
= Data[0];
= Data[1];
= PORT_IS_OUTP; // Configure PORT C0 DPDL as Output
// 14 Bits each
// Set DPDL = Low, Low level duration must be > 200 ns (tL)
// Set DPDL = Low, Low level duration must be > 200 ns (tL)
// Set DPDL = High, High level duration must be > 200 ns (tH)
// Configure PORT C0 DPDL as Input
// wait appr. 5 µsec to ensure proper low level reading (tbit)
// sample bit
// Configure PORT CO as Input for
// DigiPyro Direct Link Interface (DPDL)
// wait appr. 30 µsec (tS)
// 3 Channels
// Configure PORT C0 DPDL as Output
// Set DPDL = Low, Low level duration must be > 200 ns (tL)
// Configure PORT CO DPDL as Input
// Ext. Interrupt 0 disabled while reading
// Ext. Interrupt 0 enabled
// wait for DPDL = high - max. 1 ms (in regular mode)
// no pullups: PUD=1 (Bit#2)
// Global enable interrupts
D i g i P yr o ® P Y Q 2 8 9 8
7

Related parts for PYQ2898