【校企合作案例】全自动智能核酸提取仪

       ——来自湖南工业大学&南华大学

陈柱老师团队

本期为大家推送迪文科技校企合作案例——全自动智能核酸提取仪。该方案具有直观的操作界面,通过屏幕实时监控设备状态、温度、时间等信息,可通过触摸屏调整参数,并集成了紫外消毒、密码修改等实用功能,增强了实验操作的便捷性与数据的安全性。同时,设备还支持实验启动、暂停及结束操作,以及HEAP和LED灯光控制,进一步确保了实验的精确性与可靠性。

 

演示视频

                        

完整开发资料含迪文屏DGUS工程资料与C51代码,获取方式:

邮箱:chenzhu220@163.com


【UI素材展示】

UI素材展示1

UI素材展示2



【GUI工程设计】

1

图1

2

图2

3

图3

4

图4

5

图5

6

图6


<主界面>:主要包括仪器主菜单选择,HEAP系统(减少气溶胶污染)、LED(照明)和实验选择等。(图1)

<设置>:核酸提取仪具体的仪器调试、参数设置等。(图2)

<新建实验>:核酸提取仪工作运行与工作参数配置。(图3)

<紫外消毒>:核酸提取仪开启关闭紫外线灯灭菌及开启时间的设置等。(图4)

< 登录界面 >:通过输入密码解锁使用权限。(图5)

< 密码修改界面 >:通过输入旧密码来更换成新密码。(图6)



UI开发示例

UI界面

C51工程设计

C51的代码量较大,这里以主函数代码及各种控件的处理代码为例。


主函数:

#include "sys.h"

#include "uart4.h"

#include "uart5.h"

#include "touch.h"

#include "tim0.h"

#include "norflash.h"

#include "lab.h"

 

void main(void)

{  

    sys_init();

    uart4_init(9600);

    uart5_init(9600);

    timer0_cnt_init();

    page_change(25);

    touch_init();

    while(1)

    {   

        val_addr_handler();

        lab_time_handler();

        Uart4_Rx_handler();

    }  

}


控件处理代码:

void val_addr_handler(void)

{

        #define  VAL_START_ADDR  0x5000

        u8 n;

        if(is_addr_scan==0)

        {

            return;

        }

        is_addr_scan=0;

        if(dwkey_show_scan==1)

        {

            keyshow_scan(DW_KEY_ADDR,DW_KEYSHOW_ADDR);

            keyshow_scan(DW_OLDKEY_ADDR,DW_OLDKEYSHOW_ADDR);

            keyshow_scan(DW_CHANGEKEY1_ADDR,DW_CHANGEKEY1SHOW_ADDR);

            keyshow_scan(DW_CHANGEKEY2_ADDR,DW_CHANGEKEY2SHOW_ADDR);

        }

        dwkey_show_scan=0; 

        sys_read_vp(VAL_START_ADDR,(u8*)&cur_scan_val,SCANLEN);  for(n=0;n<SCANLEN;n++)

    for(n=0;n<SCANLEN;n++)

        {

            if(n<=0x05)

            {

                if(cur_scan_val[n]>0)

                {

                    lab_data_run_view(n);      

                    lab_pop_clear(n,0);

                 }      

            }

            else if(n==0x06)

            {

                if(cur_scan_val[n]>0)

                {

                    page_id_update(cur_scan_val[n]);

                    lab_pop_clear(n,0);

                }

             }

            else if(n==0x07)

            {

                if(cur_scan_val[n]!=last_scan_val[n])

                {

                    lab_led_con(cur_scan_val[n]);

                    last_scan_val[n] = cur_scan_val[n];

                }

            }

            else if(n==0x08)

            {

                if(cur_scan_val[n]>0)

                {

                    lab_uv_con(cur_scan_val[n]);

                    lab_pop_clear(n,0);

                }    

            }

            else if(n==0x09)

            {

                if(cur_scan_val[n]!=last_scan_val[n])

                {

                    lab_heap_con(cur_scan_val[n]);

                    last_scan_val[n] = cur_scan_val[n];

                }    

            }

            else if(n==0x0A)

            {

                if(cur_scan_val[n]>0)

                {

                    lab_data_save();

                    lab_pop_clear(n,0);

                }

        }

            else if(n==0x0B)

            {

                if(cur_scan_val[n]>0)

                {

                    lab_data_default(n);

                    lab_pop_clear(n,0);

                }

            }

            else if(n==0x0C)

            {

                if(cur_scan_val[n]>0)

                {

                    lab_data_modify();

                    lab_pop_clear(n,0);

                }

            }

            else if(n==0x0D)

            {

            if(cur_scan_val[n]>0)

               {

                    lab_data_detele();

                    lab_pop_clear(n,0);

                }

            }

            else if(n==0x0E)

            {

                if(cur_scan_val[n]>0)

                    {

                        lab_start();

                        lab_pop_clear(n,0);

                    }

            }

            else if(n==0x0F)

            {

                if(cur_scan_val[n]>0)

                {

                    lab_end(1);

                    lab_pop_clear(n,0);

                }

            }

            else if(n==0x10)

            {

                if(cur_scan_val[n]!=last_scan_val[n])

                {

                    lab_pause_cont(cur_scan_val[n]);

                    last_scan_val[n] = cur_scan_val[n];

                }

            }

            else if(n==0x11)

            {

                if(cur_scan_val[n]>0)

                {

                    lab_page_status(n);

                    lab_pop_clear(n,0);

                    }

                lab_wash_chooose();

            }

            else if(n==0x12)

            {

                if(cur_scan_val[n]>0)

                {

                    lab_data_clear();

                    lab_pop_clear(n,0);

                }

            }

            else if(n==0x13)

            {

                if(cur_scan_val[n]>0)

                {

                    cur_scan_val[n] = 0;

                    sys_write_vp(0x5013,(u8*)&cur_scan_val,1);

                    touch_lock();

                }

            }

            else if(n==0x14)

            {

                if(cur_scan_val[n]>0)

                    {

                        cur_scan_val[n] = 0;

                        sys_write_vp(0x5014,(u8*)&cur_scan_val,1);

                        touch_changekey();

                }

            }

        }

}