Jump to content

gadolly

Members
  • Content Count

    1
  • Joined

  • Last visited

  1. arre, can you explain if(timerval<40*clockMhz) bit[byte]|=(1<<bitcount); I think it has to be if(timerval>40*clockMhz) as this will decide data"1" that takes long time. Also, how can you relate the 40*clockMhz to the 28usec time interval to decide data"0" or the 70usec time interval to decide data "1". clockMhz=40 in the code so this value will be 40*40=1600 that is too large for the time values in the data sheet of the sensor !
×