Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 09:01 06 Jul 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : MMbasic DHT21 bug?

Author Message
MipsyKing
Newbie

Joined: 12/02/2015
Location: Italy
Posts: 17
Posted: 06:20am 26 Feb 2015
Copy link to clipboard 
Print this post

Hello,
i'm experiencing a strange behaviour with MMbasic v4.6 and a DHT21 temperature-humidity senor. (this one: ebay

1) I connect sensor exactly like in the manual (with the pull-up resistor)
2) I program a simply loop reading sensor every 2 seconds. (no other functions called)
3) I get a long sequence of 1000,1000... 1000,1000 and only sometimes 2 or 3 REAL values, then a lot of 1000 again, and so on.
4) When values are OK, they show right temperature and humidity, so sensor is working.
5) Powering sensor at 3,3 or 5V doesnt change the problem.

6) the same sensor, connected to a PIC16f628 programmed by me in machine language is working without problems.

After all, I think problem may/seems to be (?) the MMbasic too critical about timings (?), or reading too near transation fronts instead in the middle (?), or disturbed by other interupts (?)
 
MipsyKing
Newbie

Joined: 12/02/2015
Location: Italy
Posts: 17
Posted: 06:23am 26 Feb 2015
Copy link to clipboard 
Print this post

...anyother is experiencing same unreliable behaviour from MMbasic and DHT2X sensor?Edited by MipsyKing 2015-02-27
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6269
Posted: 11:34am 26 Feb 2015
Copy link to clipboard 
Print this post

There is a bug in V4.6.
At temperatures below about 25 degrees C and above 42 degrees, the error occurs.
http://www.thebackshed.com/forum/forum_posts.asp?TID=7369&PN =5

The latest version of MM Basic V4.6B has fixed the bug.


Jim

VK7JH
MMedit
 
robot
Newbie

Joined: 28/01/2015
Location: Australia
Posts: 2
Posted: 11:54am 26 Feb 2015
Copy link to clipboard 
Print this post

MipsyKing, There is a known bug that was corrected in MMBasic 4.6B
You can download this version at http://geoffg.net/micromite.html
Unfortunately you have to flash the micro again.
 
MipsyKing
Newbie

Joined: 12/02/2015
Location: Italy
Posts: 17
Posted: 07:47am 27 Feb 2015
Copy link to clipboard 
Print this post

Many thanks to both!

I didnt suspect about this because i've flashed my firmware just a week ago!
But I was also in a "forced pause", caused by my PICKIT 3 incompatibily, so I didnt realize I was actually flashing a "surpassed" version. Thank again.Edited by MipsyKing 2015-02-28
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025