Temp & Humidity sensor interfacing question


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Apr 2008
    Posts
    5


    Did you find this post helpful? Yes | No

    Default Re: Temp & Humidity sensor interfacing question

    Hello tacbanon

    What i read from the waveform is diferent than you.

    First the sensor has an internal pull up resistor so the idle state is 1

    then you must send a low pulse and release back to 1 (blue color)

    then the sensor places data line low for sometime then back to high for sometime

    and after that sends the 40 bits in a row

    from the waveform it seems that a zero is a short pulse and a 1 a long pulse ( Twice the width ? )

    the problem is that i don't see anyware the pulse duration nor for ack pulse or 0 and 1 pulse duration.

    In the past i found a sample code in proton basic to decode infrared sony protocol that i ported
    to picbasic pro.

    As far as i remenber it was based on a array with the proper number of elements
    and used pulsin in a loop to wait for a start pulse that was longer than the others


    after detecting the start pulse you enter another loop
    with a counter wait a cicle time , read the port and store 0 or 1 on each increasing array number

    this aproach is not wat you need here because the sony infrared protocol (as far as i remenber ) was fixed leght bits
    with 0 or 1

    Here you have to use pulsin in a loop to measure the width of the 40 positive incoming pulses and decide what to store on
    the array 0 or 1 based on that.

    Sorry for my english . If i have time i will search for that code and post it to see if it can help you.

  2. #2
    Join Date
    Jun 2011
    Location
    Philippines
    Posts
    223


    Did you find this post helpful? Yes | No

    Default Re: Temp & Humidity sensor interfacing question

    Hi Fernando,Thanks for the information and sharing your time. I will try your suggestion and post my results. This will be a challenge for me Thanks,Tacbanon

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts