simulation problem with proteus

Status
Not open for further replies.

shadyusef

Newbie level 1
Joined
Jun 6, 2016
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
9
i face problem with simulation in proteus
i got wrong output not the expected from the written program but i dont know why ?!
Code:
while(1){
	start :
	temp = temp_sensor_func();	// call temp sensor function
	dtostrf(temp, 1, 2, buffer); //convert temp value from double to char to display on LCD and transmit with Uart
	lcd_print(&Lcd , buffer);		//display on Lcd 
	_delay_ms(100);					//delay to hold the data on Lcd
	//lcd_clr(&Lcd);
	
	if (temp >37.8||UART_recieve1(&Uart)=='c')			//condtion to check if val is normal or out of range
	{
	lcd_print(&Lcd , buffer);	//display temp on lcd 
	lcd_clr(&Lcd);				//clr lcd 
	UART_transmit_string1(&Uart ,buffer);
		_delay_ms(1000);//send temp to the App
		}//if		
	
	
goto start;	
}// for while
}//for main


this code should display the temp value and send it if it out of range >37.8 or if it receives 'c' char
this code works normaly
but if i change the range from normal to out of range Ex40) it doesn't send or display the temp unless i send 'c' char to continue the code
some thing goes wrong but i cant specify if it from proteus or some thing wrong with the code
kindly i need your help
regards
thanks advance
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…