#use delay(clock=10000000)
int16 temp, cent;
int16 triptemp, TripTempc=40;
void main()
{
TRISA = 0x01;
TRISD = 0; //You haven't specified buzzer output
setup_adc_ports(all_ANALOG);
setup_adc(ADC_clock_internal);
set_adc_channel(0);
triptemp = (TripTempC*500)/1023; //This should be how it is. First dividing by 1023 makes the result always equal 0
while(1)
{
temp=read_adc();
cent=(temp*500)/1023; //Same mistake here
if(cent>triptemp)
{
output_high(PIN_D0); //What's 53?, Try with PIN_D0 (I assume this is where buzzer is connected)
}
else
{
output_low(PIN_D0); //Same here
}
delay_ms(100);
}
}