









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The design and implementation of an automated drying system that maintains specific temperature and humidity levels during the drying process. The system features a start and stop button, adjustable temperature and time settings, and a display that shows the current temperature, humidity, and drying time. Hardware design, flowchart, and control program written in c language for a pic16f887 microcontroller. The system is designed to provide efficient and controlled drying for various applications, such as food processing, material drying, or industrial processes. The document could be useful for students, engineers, or researchers interested in the design and development of automated drying systems, process control, and embedded systems.
Typology: Exercises
1 / 15
This page cannot be seen from the preview
Don't miss anything!










a> Thiết kế phần cứng phù hợp
void LCD_COMMAND(UNSIGNED CHAR MDK) //RS = 0 { OUTPUT_LOW(LCD_RS); OUTPUT_LCD(MDK); OUTPUT_HIGH(LCD_E); DELAY_US(20); OUTPUT_LOW(LCD_E); DELAY_US(20); } void LCD_DATA(UNSIGNED CHAR MHT) //RS = 1 { OUTPUT_HIGH(LCD_RS); OUTPUT_LCD(MHT); OUTPUT_HIGH(LCD_E); DELAY_US(20); OUTPUT_LOW(LCD_E); DELAY_US(20); } VOID LCD_SETUP() { OUTPUT_LOW(LCD_E); OUTPUT_LOW(LCD_RS); OUTPUT_LOW(LCD_RW); LCD_COMMAND(FUNCTION_SET); DELAY_MS(1);
#int_timer int8 bdn=0, giay=0, phut=0, gio=0; int J,K,H,Q,duty; float32 X1,T1,T2,A; void ngat1() { set_timer1(3036); bdn++; if(bdn==10) { giay++;bdn=0; if(giay==60) { giay=0; phut++; if( phut==60) {phut=0; gio++; if( gio>23) {
void T1_NHIETDOBUONSAYLUCDAU(){ { SETUP_ADC(ADC_CLOCK_DIV_8); SETUP_ADC_PORTS(SAN2); SET_ADC_CHANNEL(2); T1=0; FOR (Q=0; Q<200; Q++) { T1=T1+READ_ADC(); DELAY_MS(1); }
void T2_NHIETDOBUONSAYLUCSAU(){ { SETUP_ADC(ADC_CLOCK_DIV_8); SETUP_ADC_PORTS(SAN3); SET_ADC_CHANNEL(3); T2=0; FOR (H=0; H<200; H++) { T2=T2+READ_ADC(); DELAY_MS(1); } T2= T2 /4.887; T2= T2/200; T2=T2/1; } } void PHIM_STOP(){ duty=0; if(input(START)==0) duty=0;
khoitaotimer1(); //set_tris_d(0); set_tris_e(0); set_tris_c(0x00); set_tris_b(0xff); output_high(pin_c0); output_low(pin_c1); duty=0; set_pwm1_duty(duty); A_DOAM(); X1_TGIANSAY(); T1_NHIETDOBUONSAYLUCDAU(); T2_NHIETDOBUONSAYLUCSAU(); while(true) { IF (input(START)==0); { duty=750; set_pwm1_duty(duty); } IF ((input(STOP)==0)|| phut==(int)T1); { duty=0; set_pwm1_duty(duty); A_DOAM(); X1_TGIANSAY();
LCD_DATA((int)A/10%10+0x30);//chuc LCD_DATA((int)A%10+0x30);//dv LCD_COMMAND(0X8E); LCD_DATA((int)X1/10%10+0x30); LCD_DATA((int)X1%10+0x30); LCD_COMMAND(0XCE); LCD_DATA((int)T1/10%10+0x30); LCD_DATA((int)T1%10+0x30); LCD_COMMAND(0XC3); LCD_DATA((int)T2/10%10+0x30); LCD_DATA((int)T2%10+0x30); Hienthi(); } }