3778 views|6 replies

374

Posts

3

Resources
The OP
 

Free evaluation - Topmicro intelligent display module (7) practical application [Copy link]

This post was last edited by wenyangzeng on 2021-11-8 15:08

Free evaluation - Topmicro intelligent display module (7) practical application

As an evaluation of actual application, STM8S105S4-PKT is used to drive this smart screen.

The arrangement is as follows:
1. The RS232 serial port of STM8S105S4-PKT is connected to the RS232 serial port of the smart screen.
2. The ADC3 of STM8S105S4-PKT is originally connected to a potentiometer for ADC conversion, and the conversion result data of ADC3 is used to drive the display of a progress bar on the smart screen.
3. The smart screen sets two different background pages. The first page arranges a password touch screen. Its password input control is very considerate. The entered password is displayed as an "*" in the window. Here, it is assumed that the 6-digit password 123456 is entered. When the "OK" button is pressed, the smart screen automatically transmits the password string from the serial port:
AA 77 00 00 00 80 30 31 32 33 34 35 36 CC 33 C3 3C
4. The serial port of the STM8 microcontroller receives the returned password information. If the password is correct, it sends the second page display command:
AA 70 00 01 CC 33 C3 3C
Then the STM8 performs ADC conversion and returns the conversion result to the smart screen to drive the display of the progress bar:

AA 3D 00 08 00 00 00 63 CC 33 C3 3C

The page setting process of SGTools will not be repeated, please refer to the previous posts of the OP.

Password keyboard configuration

Progress bar configuration

Partial code

unsigned char Pass_OK[8]={0xAA,0x70,0x00,0x01,0xCC,0x33,0xC3,0x3C};
unsigned char ADC_dat[12]={0xAA,0x3D,0x00,0x08,0X00,0X00,0X00,0X50,0xCC,0x33,0xC3,0x3C};
void Send_OK(void)
{
for(Tx_Count=0;Tx_Count<8;Tx_Count++)
  {
   while (!(UART2_SR & 0x80));
      UART2_DR=Pass_OK[Tx_Count];
  }
}

void Send_ADC(void)
{
for(Tx_Count=0;Tx_Count<12;Tx_Count++)
  {
   while (!(UART2_SR & 0x80));
      UART2_DR=ADC_dat[Tx_Count];
  }
}

#pragma vector  = UART2_R_RXNE_vector
__interrupt void UART2_R_RXNE_IRQHandler(void)
{
if(UART2_SR_RXNE==1)
    {
     Rx_buffers[Rx_Count++]=UART2_DR;
    }
  else
    if(UART2_SR_IDLE==1)
    {
      i=UART2_SR;
      i=UART2_DR;
      if((Rx_buffers[1]==0x77)&&(Rx_buffers[12]==0x00))
      {
        if((Rx_buffers[6]==0x31)&&(Rx_buffers[7]==0x32)
           &&(Rx_buffers[8]==0x33)&&(Rx_buffers[9]==0x34)
             &&(Rx_buffers[10]==0x35)&&(Rx_buffers[11]==0x36))
          Send_OK();
        Count=1;
      }
      Rx_Count=0;
    }
}

video


From the evaluation process, I realized that this smart screen is easy to program and saves a lot of work in graphics programming. It has very low hardware requirements. As long as an 8-bit microcontroller such as STM8S is used, it can easily drive a 1024×600 TFT screen to get a very satisfactory display effect.

This review is over. Thank you EEWORLD and TOPWAY.

This post is from Test/Measurement

Latest reply

The network port function of this product is its feature, which supports Internet remote control. I recommend you to try it.   Details Published on 2021-11-29 08:38
 
 

6547

Posts

0

Resources
2
 

As long as the 8-bit STM8S is used, this can be achieved, and the display is very clear.

This post is from Test/Measurement
 
 
 

623

Posts

0

Resources
3
 

I think it is very suitable to be applied to traditional PLC

This post is from Test/Measurement

Comments

This smart screen simplifies graphic programming and is suitable for many application environments.  Details Published on 2021-11-8 10:46
 
 
 

374

Posts

3

Resources
4
 
jobszheng5 posted on 2021-11-8 10:22 I think it is very suitable for application on traditional PLC

This smart screen simplifies graphic programming and is suitable for many application environments.

This post is from Test/Measurement
 
 
 

9702

Posts

24

Resources
5
 

This graphical programming looks really convenient

This post is from Test/Measurement

Comments

It is very convenient  Details Published on 2021-11-8 13:27
 
 
 

374

Posts

3

Resources
6
 
This post was last edited by wenyangzeng on 2021-11-8 16:39
littleshrimp posted on 2021-11-8 12:05 This graphical programming looks really convenient

It is indeed very convenient

This post is from Test/Measurement
 
 
 

76

Posts

2

Resources
7
 

The network port function of this product is its feature, which supports Internet remote control. I recommend you to try it.

This post is from Test/Measurement
 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list