Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

execution time of c programe

Status
Not open for further replies.

i_chaitanya

Member level 2
Joined
Jun 4, 2012
Messages
47
Helped
4
Reputation
10
Reaction score
5
Trophy points
1,288
Location
pune
Activity points
1,569
i am trying to develop a furnace temperature sensor. the idea behind this is that there is a hardware which receives data from the temprature sensor present inside the furnace . and the calculations are done on those data by the µC present in the hardware and then the generated report is sent to the server via GPRS module attached to it so that this data can be accessed via internet from anywhere
my program is working fine and the results are what i expects but there is one problem
the server does not show present data it shows data of half hour earlier time .
i think i need to speed up the report generation of data. but before doing that i want to make sure that my c code is not generating data in near about real time (time delay of 2 - 5 min is alright but not half an hour)
is there any way i can calculate exact time taken by µC to receive data from the temperature sensor and generate the report
and please sorry guys i cannot share the c code as it is industrial project and i am bound by legal agreements
 

Do you have any available timer or real time clock?
If so you can use it to keep track of time.
 

you can have a timer which starts when uC receives data and runs till it generate report. So, timer will run for the time the uC is processing the data. Based on the timer value, you can calculate the exact time.
 

hello

:| normally NO DATA => NO ANSWER !


Can you add an Uart output RS232 to a terminal in your controller. ?

by using Uart Hardware ou a simple Software UART , because need Tx output only

you write a data to the terminal at the beginnig of the programme
ex: PutChar('@') ; PutChar(10);PutChar(13);
and another data at the end.
ex: PutChar('#'); PutChar(10);PutChar(13);

If you use Vbray terminal you can valide the "Time stamp function" writen before each caractere receiving
time resolution is about 50mS..
maybe egnouh compare to minutes .

you will get something like this
14:28:21.903>@
14:28:34.171>#
duration is the difference = 12,268 seconds


see sw_uart.c on microchip site
you don't need the receive part
and can use any free pin as TX output .
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top