Where is this 1µs? Did I missed it?
As I understood, the sensor will respond only when the MC enters Z-state.
Ioannis
P.S. Oh I got it. But Alain, this is settling time, not bit width time.
Where is this 1µs? Did I missed it?
As I understood, the sensor will respond only when the MC enters Z-state.
Ioannis
P.S. Oh I got it. But Alain, this is settling time, not bit width time.
Last edited by Ioannis; - 11th December 2007 at 11:47.
Hi, Ioannis
looks the sensor output is seen by the PIC like a small capacitor ...and this capacitor is discharged by the low state of the pic pin ... not by the sensor itself.
this is a little confusing in the datasheet as the settling time is called as bitwidth time !!!
That explains why Ingvar's program works well ...
INPUT Datapin 'Let PIR control the Datapin
PIRdata.0(i) = Datapin 'Sample the datapin
surely need more than 1µs to be done !!! ...
Thanks, Ingvar ... we've learnt something !
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Alain, surely that was obvious .......Nah, must admit that it wasn't all that clear in the datasheet.
I figure the PIR must be driving the output with resistors since there would otherwise often be a collision when the MCU drives the pin. No good. Driving via resistors will always be sensitive to capacitance on the lead and therefore a settlingtime will be needed. I figured it had to be this way since they specified tbit as "Data bit settling time" with a 10pF load.
It is kind like the 1-wire of Dallas devices. They are active low with pull up resistors, so that collisions can be avoided.
Ioannis
Actually, I had to use 10K resistor to GND.
Without it, PIR's internal resistor is not good enough (at least for my circuit), and pin takes a free walk.
"If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte
Bookmarks