2017-08-01 01:31 AM
Dear all,
i need to monitor ADC & display the value continuously in Text box using STEmwin Generated code. My ADC driver, handling for low threshold & high threshold value is working correctly as per testing done so far but i don't know how to integrated the ADC on STEmwin Generated code. What are the basic steps to achieve this? Please! give me the required guidance.
2017-08-03 11:50 PM
Nobody has replied so far, anyway i have solved my problem partially but not fully.
Now the only problem remaining is screen is flickering when the code is written like this:
void MainTask(void)
{ int temperature = 0; WM_HWIN hDialog; WM_HWIN hItem; //unsigned char te; GUI_Clear(); WM_SetDesktopColor(GUI_BLACK); hDialog = GUI_CreateDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), _cbDialog, WM_HBKWIN, 0, 0); //GUI_ExecDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), _cbDialog, WM_HBKWIN, 0, 0); //GUI_ExecCreatedDialog(hDialog); while(1) { //te=temperature_handling(); //if(te==1) //{ temperature=tempCalculate(); temperature=temperature/4; num_to_string(temperature); hItem = WM_GetDialogItem(hDialog, ID_TEXT_1); TEXT_SetText(hItem, (const char*) string); //} //if(te==0) //{ // hItem = WM_GetDialogItem(hDialog, ID_TEXT_1); // TEXT_SetText(hItem, ' '); //} //GUI_Delay(250); GUI_Exec(); }}When i use function GUI_CreateDialogBox screen begins to flicker but it able to get values continuously from ADC.
When i use function GUI_ExecDialogBox screen gets stable but it is not able to get values continuously from ADC.
How to achieve stable Screen with ADC values? Please! help me regarding this.