Search found 6 matches

by hmeijdam
Sat Aug 05, 2023 6:02 pm
Forum: STM8 Core
Topic: How to use Interrupts on STM8 with sduino
Replies: 7
Views: 23227

Re: How to use Interrupts on STM8 with sduino

But defined interrupt is not actually working. I have tried with other PINs also for interrupt but non of them are working. Now your sketch should work: #define R1 PD1 //ROW1 #define R2 PC6 //ROW2 #define R3 PC5 //ROW3 #define R4 PC3 //ROW4 #define C1 PB4 //COL1 #define C2 PC7 //COL2 #define C3 PC4...
by hmeijdam
Sat Aug 05, 2023 4:27 pm
Forum: STM8 Core
Topic: How to use Interrupts on STM8 with sduino
Replies: 7
Views: 23227

Re: How to use Interrupts on STM8 with sduino

I removed the the digitalPinToInterrupt macro, that was causing trouble. After reading this https://tenbaht.github.io/sduino/usage/interrupts/ documentation it seemed better to remove it. So here is a revised example that should work on almost all pins (see code). // Update August 2023 by Hans Meijd...
by hmeijdam
Thu Dec 03, 2020 7:22 pm
Forum: STM8 Core
Topic: How to use Interrupts on STM8 with sduino
Replies: 7
Views: 23227

Re: How to use Interrupts on STM8 with sduino

Pin change interrupts support has been added to sduino . A little workaround was still needed for me, as the latest sduino version 0.5.0 does not yet includes it. I had to manually copy the files Winterrupts.h and Arduino.h from the sduino Github page and move that into my Arduino IDE overwriting th...
by hmeijdam
Tue Dec 01, 2020 4:10 pm
Forum: General discussion
Topic: Internal temperature sensor
Replies: 11
Views: 14304

Re: Internal temperature sensor

Thanks for checking :-) And now it works perfect and now I also get different results between genuine and counterfeit When I test my bluepill boards with genuine STM32F103C8 chips, manufactured by STMicro I get these results: VRef(mv)= 3294 Temp(°C)= 32 A0(mv)= 317 VRef(mv)= 3296 Temp(°C)= 32 A0(mv)...
by hmeijdam
Tue Dec 01, 2020 1:38 pm
Forum: General discussion
Topic: Internal temperature sensor
Replies: 11
Views: 14304

Re: Internal temperature sensor

I checked the datasheet of the STMF103C8T6, but the only thing it tells me is that the temperature sensor is on ADC1_IN16. I looked at the header files in the STM32 Arduino package and see that the ATEMP is defined depending on MCU as the last analog pin +1 So I redefined "ATEMP", which wa...
by hmeijdam
Fri Nov 27, 2020 8:25 pm
Forum: General discussion
Topic: Internal temperature sensor
Replies: 11
Views: 14304

Re: Internal temperature sensor

When I compile and upload the code (mentioned on the github page in the third post) to my blue pill board with STMF103C8T6 the VRef and the A0 sampling work ok, but I always get 266 or 267 degrees Celcius temperature. Even when i heat it up a little, it does not change. This is what I get: VRef(mv)=...

Go to advanced search