![]() |
Forum Index : Microcontroller and PC projects : Pico problem with pin(TEMP)
Author | Message | ||||
apalert Newbie ![]() Joined: 06/07/2023 Location: AustraliaPosts: 34 |
At my workbench, ambient temperature 24 C > > ? pin(temp) -9.485304353 > Running MM Basic Ver 6.0001 Was working correctly just a few days ago, now its gone bad on both pico's I'm currently working with. |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 5050 |
Hi apalert, Where you running this continuous during few days, or has the unit been switched off in between. I am trying to duplicate. Volhout PicomiteVGA PETSCII ROBOTS |
||||
PhenixRising Guru ![]() Joined: 07/11/2023 Location: United KingdomPosts: 1358 |
V6.00.02RC24 ![]() |
||||
apalert Newbie ![]() Joined: 06/07/2023 Location: AustraliaPosts: 34 |
Both would have been turned off overnight. |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 5050 |
Hi apalert, Has been running for 2 hours straight, and no issues. The chip raised from 24C (cold) to 34C now. (RP2040 running 252MHz). I will turn it off now, let it cool for few hours, and then restart. Soo if I see the same (running 6.00.02). Is it possible that turning the boards OFF, and ON again generated some voltage spikes that killed the chips. Or maybe that when the power to the boards was turned off, that some of the IO pins (i.e. serial port) where still carrying voltage from the peripheral connected. In that case the chip on the pico could be "reverse biassed" and may have degraded. huh..phenix..how do you do that ? Volhout Edited 2025-07-09 19:10 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 5050 |
apalert, phenix, I tried - RP2350 genuine RP board on Game*Mite - RP2040 zero (the small one) - RP2040 genuine RP board (2x) Tried CPU speed 378000, 133000, 200000, 252000 on 2040's (252000 on 2350). Nothing, rock solid readings. One 2040 runs 5.08.00. Others run 6.00.02. Volhout Edited 2025-07-09 19:23 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
PhenixRising Guru ![]() Joined: 07/11/2023 Location: United KingdomPosts: 1358 |
Mine was a RP2040 clone but the RP2350 DIL reports 48° |
||||
apalert Newbie ![]() Joined: 06/07/2023 Location: AustraliaPosts: 34 |
Thanks for looking into this guys Incidentally I added a LM4040 3 volt reference to the VREF pin on both units yesterday with the aim of improving the noise levels from ADC pins. I've now removed one and while the result of ?pin(temp) has changed it's still rubbish. Then I reinstalled MMBasic V6.00.01 but again no improvement. It does seem installing the LM4040 may have been coincidental with pin(temp) going awry. |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7852 |
Could this be a glitchy power supply problem? Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 5050 |
Peter could shed some light into this, but.... Vref is used to measure the diode temperature inside the RP2040 chip. So when you change Vref, then the ADC reading is different. MMBasic has an option: OPTION VCC voltage (i.e. OPTION VCC 3.012). This is used in MMBasic to make sure that the value you read from the ADC is the actual voltage. But maybe it also corrects for the ADC reading of temperature. That I cannot say. Peter could. When you measure the accurate voltage on the LM4040, and put this value in OPTION VCC this helps for ADC readings. Maybe also for temp. Volhout P.S. when your Vref is 3V (LM4040 output is 3V, versus 3.3V normal Vdd = 10% low) and you would read a diode as temperature sensor with a value of around 0.6V, the 10% low Vref would give a reading of 0.66V (Vref lower, reading higher). That is 60mV higher. With a typical silicon temperature coeficient of -2mV/C, that would give a temperature reading roughly +0.06/-0.002 = 30 degrees lower. That is very much in line with the -9 degrees you see, when ambient is +24. So it is very well possible that the LM4040 is the culprit. Edited 2025-07-09 23:39 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |