Problems with Microcontroller Projects? You may face many Problems, but do not worry we are ready to solve your Problems. All you need to do is just leave your Comments. We will assure you that you will find a solution to your project along with future tips. On Request we will Mail you the Codes for Registered Members of this site only, at free service...Follow Me.

LOAD CELL BASED PRODUCT CHEKING SYSTEM


DSC00095DSC00097PIC16F877A C CODE:
DSC00096op07 Amplifier Circuit#include<16f877a.h>
#fuses HS,NOWDT,NOLVP,NOPROTECT
#use delay(clock=20000000)
#use rs232(baud=9600,xmit=PIN_C6,rcv=PIN_C7)
void main()
{
unsigned char load_cell_var;
setup_port_A(ALL_ANALOG);
setup_adc(ADC_CLOCK_INTERNAL);
output_c(0×01);
// printf(”Welcome To PC based weight scale System \n”);
// delay_ms(1000);
while(TRUE)
{
set_adc_channel(0);
delay_us(100);
load_cell_var=READ_ADC();
printf(”\r Digital value=%u\r\n”,load_cell_var);
if((load_cell_var>=76)&&(load_cell_var<=77))
{
output_c(0×01);
printf(”PRODUCT IS GOOD”);
delay_ms(1500);
}
else
{
output_c(0×00);
printf(”PRODUCT IS DEFECT “);
delay_ms(1500);
output_c(0×01);
}
}
}

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...

Recent Comments

Popular Projects

Give Support

Give Support
Encourage Me through Comments

Microcontroller Projects

Total Pageviews