Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 02:57 18 Sep 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 : DS18B20 Temp sensor & MM Basic

Author Message
Hatrick
Newbie

Joined: 16/11/2015
Location: Australia
Posts: 6
Posted: 03:19am 17 Nov 2015
Copy link to clipboard 
Print this post

One for Geoff:
First, thanks for producing the Basic interpreter for the Micromite. This has stirred my interest after nearly 40 years from first learning Basic.
I understand that the DS18B20 temperature sensor takes 200mS to measure the value, and during this time the processor will ignore other interrupts.
My question is: during this measurement period, is the digital input count feature (ie, SETPIN (n) CIN, FIN)affected? Will it miss counting pulses during this period?

Gerry
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2948
Posted: 06:58am 17 Nov 2015
Copy link to clipboard 
Print this post

Hi Gerry,

Just out of interest, are you aware that there is a START command which simply triggers the 'conversion'. Whilst the DS18B20 is doing its thing, the MM can continue doing other stuff (including interrupts). Then simply perform a 'read'; if more than 200mS has passed since the START, then the data will be immediately returned, otherwise the 'balance' of time will need to expire first before the data is returned.

Hope this helps . . . .

WW

 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3303
Posted: 11:27am 17 Nov 2015
Copy link to clipboard 
Print this post

Gerry,

Yes, the count input will continue to count. In fact it is the only exception to the "freeze" that occurs while the temperature reading is made.

As WW suggested, you can use TEMPR START to start the conversion and do other things while it is progressing. However, if you are just counting it is not really necessary.

Geoff
Geoff Graham - http://geoffg.net
 
Hatrick
Newbie

Joined: 16/11/2015
Location: Australia
Posts: 6
Posted: 01:57pm 17 Nov 2015
Copy link to clipboard 
Print this post

Thanks for that, guys. That gives me some ideas as to where I will plant the DS18B20 command in the code.
And I might tinker with that START command as well - wasn't aware of that one!
rgds
gerry
 
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