Go Down

Topic: Experiment–14:Measurement and Display of Room Temperature using UNO and LM35  (Read 2383 times) previous topic - next topic

GolamMostafa


Anindya14

I cannot understand how to add a decimal point in DP1. The Code is working fine but there is no decimal point.

GolamMostafa

Hints: Keep the cc-codes in a separate array (codeArray[]) before sending them onto the display. Now add decimal point by ORing 0x80 with the relevant digit (content of codeArray[2]) and then transfer the codes of codeArray[] onto display.




Razor365

Why you use the function timeDelay3sec() instead of delay(3000);

GolamMostafa

Why you use the function timeDelay3sec() instead of delay(3000);
Please check the outcome of the program by replacing the user-defined function (timeDelay3sec()) by the Arduino function delay(3000). Hopefully, you will find the answer!

Razor365

I have already checked that. But failed to understand why delay(3000) is not working. At the same time I can't understand timeDelay3sec() also . Would you explain to me?

GolamMostafa

What result have you got by replacing the user-defined delay function by the Arduino delay function? Is the system working?

//-----------------------------------------------------------------------------------------------------

Do you know how does multi-digit cc-type 7-segment display unit work?

Do you know why do we need delay (at least 1 ms) in-between displaying the contents of the digit positions? This is needed to synchronize the digit's positional data with its cc-pin. I am unable to explain it  to you in writing.

Do you have idea on the working principle of TC1 Module of Atmega328?

If the answers to the above questions are YES; you would be able to understand the program codes with a little bit efforts and experimentation using UNO/7-seg Monitor.

If the answers are NO; you have to wait until you make the answers YES!

Razor365

First of all I used both your function and the Arduino delay function. Arduino delay isn't working correctly. And my answer to all the above questions is yes accept TC1 module of Atmega328. May be that's why I failed to understand your user defined delay code.

GolamMostafa

Let begin learning the architecture and programming of the TC1 (Timer/Counter 1) Module of Atmega328P. You can find the experiment sheets here.

Go Up