RFQ/BOM 0 로그인 / 등록하다

귀하의 위치를 선택하세요

사용자 이미지

How to compare the voltage results collected by the MCU twice?

MCU
7월 08, 2020 by West 604

I would like to ask, if the voltage collected by the microcontroller for the first time is 1.77v, and the second collection is carried out after ten minutes, the collected voltage is 1.76v, the single chip can collect the voltage collected for the second time and the first collection To compare the voltage? (The second collected voltage is greater than the last collected voltage is calculated as 1, the second collected voltage is less than the first collected voltage is calculated as 0) Then by analogy, each collected voltage is equal to Compare the voltage collected last time, and compare the results. I hope to see the great god can help me, grateful!

모든 댓글

user image

Shelley 게시 날짜 July 8, 2020

Set two buffers, one comparison result flag

The last put in buf[0], the latest put in buf[1]

Compare the relationship between buf[0] and buf[1] according to your logic, whether the flag is 1 or 0

Then set buf[0] = buf[1]; to wait for the next comparison.

0
  • West

    West 게시 날짜 July 8, 2020

    Thanks for your help, so I know how to communicate with the engineer, thank you very much.

  • 답글을 달려면 로그인이 필요합니다. 로그인 | 등록하다

user image

Mayer 게시 날짜 July 8, 2020

If you don't need to save it after power-off, you can use the variable to save and compare and replace.

0

답변 작성

답글을 달려면 로그인이 필요합니다. 로그인 | 등록하다