Giter VIP home page Giter VIP logo

Comments (4)

Hikari-ky avatar Hikari-ky commented on August 21, 2024 1

You can find the ADC_GetCurrentTS function at the end of the ch58X_adC.c file to convert temperature values:
https://github.com/openwch/ch583/blob/main/EVT/EXAM/SRC/StdPeriphDriver/CH58x_adc.c#L214-L232

from ch583.

karlp avatar karlp commented on August 21, 2024

thank you! missed that!

from ch583.

karlp avatar karlp commented on August 21, 2024

I've been looking more at this, and I'm afraid I've just got more questions :) I can change the temperature of my ch582m device, and see the temp sensor raw readings go up and down, so I'm confident that it works but getting a real number out of it is... not so obvious. for ~ambient ~24°C, the linked function is giving me -36°C. I've also tried the function at https://github.com/openwch/ch583/blob/main/Application/wristband/firmware/Demo_Firmware/StdPeriphDriver/CH58x_adc.c#L163-L172 which produces different (still "wrong") values. (That function needs a cast to int on C25 otherwise nothing under 25°C is calculated properly anyway)

I've plotted the full range of values these functions generate, and they've giving quite different slopes, but still, it's just two linear equations. What is the value in in ROM_CFG_TMP_25C meant to be giving us? an offset? or a slope? If it's a slope, we need more information, because the two formulas given are both wrong anyway. If it's an offset, we need to be told the constant slope.

here's plotting the values generated by both functions for the ROM_CFG_TMP_25C value on my own board:
Screenshot from 2022-05-17 23-06-14

from ch583.

serpent213 avatar serpent213 commented on August 21, 2024

@Hikari-ky @zerosensei Would be lovely to get better support from WCH – the chips are really nice, but the (English) documentation and support is still lacking.

from ch583.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.