Hello,
This sensor appears to be just the ticket for the project I am working on, with its 12 bit
accuracy in both temp/hum. No need for calibration,price, and other features.
However, upon reading the datasheet for the AM2320, it appears to be a I2C device,
yet the only talk I have seen of it on the discussion boards treats it as a 1 Wire device.
I personally would like to use it as a I2C device, the macro for it shows no connection for the clock line.
I really could use some help getting started with some working sample code (Pic 16f1789, FC7, running clock at 19.660800Mhz)
A simple read/ write routine would be great, I can work out the math, and from a previous post that explains the data stream,
I think I can get going once I get a 2 finger grip on using this device. I will admit however that communications has not been
something I have much experience in. I am however willing to put in the research necessary to get this down pat.
This is a situation where I know what I don't know, and that is alot..
If anyone is successfully using this device, I would appreciate you sharing a simple as possible read/write routine. in FC6 or 7.
Thank You,
-Craig C
AM2320 temp/ hum sensor. Same as DHT22?
Moderator: Benj
- E*2Engineer
- Posts: 35
- Joined: Wed Dec 25, 2013 6:54 pm
- Has thanked: 12 times
- Been thanked: 6 times
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
Re: AM2320 temp/ hum sensor. Same as DHT22?
Hi,
I've not manged to find that device yet, but here are some links that should be of help...
https://www.matrixtsl.com/blog/simplifi ... c-and-spi/
http://www.matrixtsl.com/resources/file ... eation.pdf
Leigh
I've not manged to find that device yet, but here are some links that should be of help...
https://www.matrixtsl.com/blog/simplifi ... c-and-spi/
http://www.matrixtsl.com/resources/file ... eation.pdf
Leigh
-
- Valued Contributor
- Posts: 1208
- Joined: Wed May 31, 2017 11:57 am
- Has thanked: 70 times
- Been thanked: 440 times
Re: AM2320 temp/ hum sensor. Same as DHT22?
I have a simple program that reads all the data from a AM2320 sensor. It was written for the Arduino - but should work on PIC (you'll need pull-ups on the SDA and SCL lines)
Note that it reads a block of 8 bytes - First 2 mirror command (3, 4) and last 2 are CRC.
Humidity is at 2,3 and temp at 4, 5. The program just spits them out to UART with no attempt to convert them to anything meaningful...
The data sheet is at https://akizukidenshi.com/download/ds/aosong/AM2320.pdf and at first glance is a little confusing? (I wrote the above based on the Arduino AM2320 library)
Martin
Note that it reads a block of 8 bytes - First 2 mirror command (3, 4) and last 2 are CRC.
Humidity is at 2,3 and temp at 4, 5. The program just spits them out to UART with no attempt to convert them to anything meaningful...
The data sheet is at https://akizukidenshi.com/download/ds/aosong/AM2320.pdf and at first glance is a little confusing? (I wrote the above based on the Arduino AM2320 library)
Martin
- E*2Engineer
- Posts: 35
- Joined: Wed Dec 25, 2013 6:54 pm
- Has thanked: 12 times
- Been thanked: 6 times
Re: AM2320 temp/ hum sensor. Same as DHT22?
Thank you both Leigh & Martin,
Between the info from the both of you, I was able to start using the AM2320.
This was more valuable to me right now than than you might imagine, as this is not
for just a "pass the time" project.
I appreciate the information from both of you.
-Craig C
Between the info from the both of you, I was able to start using the AM2320.
This was more valuable to me right now than than you might imagine, as this is not
for just a "pass the time" project.
I appreciate the information from both of you.
-Craig C