I'm a beginner in ARM programming how do interface DHT22(temperature and humidity sensor) with LPC2148 I need help with flow chart and code if possible thank you uys in advance
How To Interface Anything to Anything Else:
www.8052.com/.../160143
Easy! Migrate it from Arduino.
www.electroschematics.com/.../
Hi Abhishek, you will need to implement a 1-wire master using GPIO or you need a I2C to 1-wire bridge. 1-wire is very similar to I2C. I would recommend using GPIO to implement a 1-wire master in software since it would be easier.
You can find lpc2148 gpio tutorial : www.ocfreaks.com/.../ and I2C basics tutorial : www.ocfreaks.com/.../
I am planning to do a tutorial on interfacing 1-wire devices with LPC2148 so it helps others who are using LPC2148 :)
-Regards
Is it?!
How so?!?!
Note that 1-Wire is a trademark of Maxim (formerly Dallas):
www.maximintegrated.com/.../1796
Although it has similarities, the protocol used by the DHT22 is not the same as the Maxim/Dallas 1-Wire.
The DHT22 protocol is described in its datasheet:
cdn-shop.adafruit.com/.../DHT22.pdf
As already noted, there is Arduino code & a tutorial available at:
www.adafruit.com/.../385
Hi Urang.
I look at your tuts but they are very old now. No one wants to use the old parts. When are you updating them to the cortex?
You must also add tut for keyboard and water sensor. This will be very useful to everybody.
Thanks pointing it out Andrew. Indeed it uses a sort-of similar protocol lacking support for Slave Addressing / ROM Numbers as one of the major differences I see. Also, really sorry for posting it in haste under the wrong impression that it uses 1 wire interface.
Abhishek : You can use the DHT library as reference for implementing it on lpc2148.
K Klasio : Thanks for the suggestion. I will post Cortex-M3 lpc1768 tutorials soon if time permits. Also you meant interfacing keyboard and water sensor with which MCU ?
You didn't explain how you think I2C is "similar" to 1-Wire?
I can't see that they are in any way similar at all!
IMO there are quite a few similarities like: Both use open drain output so they cannot drive the line high by themselves. This in turn means they need an external pullup to pull the line continuously high. Data is Received and Transmitted on the same line\wire. Both support multiple Slaves on the same bus. Also, the bus enters idle state when data line is continuously high.
Also with multiple slaves I mean the 'basic' topology since both support slave addressing.
Hi Urang. I need to interface keyboard and water sensor to STM32F103. it will be a better tut. when will u do it coz i need it very soon. also i must have a count for degrees.
OK, so they both use open-drain drivers, and support slave addressing.
I don't think that's sufficient to say that they are "similar" - certainly not "very similar"
There are also very significant differences:
I2C requires a clock line - 1-Wire does not;
The Slave addressing is optional for 1-Wire - not on I2C;
The signalling protocol is entirely different.
And, of course, the topic of this thread - the DHT22 - is not 1-Wire anyhow.
They both use serial to communicate. Thats reasonably similar. Just like pascal is similar to c.
Indeed.
So I2C is similar to Ethernet;
1-Wire is similar to USB;
They are both similar to an IR remote control ...