... void loop() {
if (digitalRead(PA1) != state)
Serial.println("state changed");
state = digitalRead(PA1);
delay(100);
}
and you can replace that PA1 with any pin you prefer to use.
--
OT: please post in the correct section in the forum, this section is for stm8, it could have been ignored.
Search found 47 matches: STM8
Searched query: stm8
- Thu Jan 23, 2025 3:48 pm
- Forum: General discussion
- Topic: Compilation error: base operand of '->' is not a pointer
- Replies: 3
- Views: 589
- Wed Feb 21, 2024 12:21 pm
- Forum: Let us know a bit about you and your projects
- Topic: Hello! First project is DIY NeoPixel for the theater
- Replies: 2
- Views: 5734
Hello! First project is DIY NeoPixel for the theater
... PCB, with 1-4 discrete LEDs for each color channel, including a white channel, driven by a MOSFET from a +12v power rail. I'm hoping to use a STM8 or STM32 to provide the logic and the 3 or 4 output pins to control the MOSFET.
The control logic should be do-able in a STM8 or -32. Strings of 24 ...
The control logic should be do-able in a STM8 or -32. Strings of 24 ...
- Sat Aug 05, 2023 6:02 pm
- Forum: STM8 Core
- Topic: How to use Interrupts on STM8 with sduino
- Replies: 7
- Views: 62435
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 ...
- Sat Aug 05, 2023 4:27 pm
- Forum: STM8 Core
- Topic: How to use Interrupts on STM8 with sduino
- Replies: 7
- Views: 62435
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 ...
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 ...
- Sat Aug 05, 2023 3:46 pm
- Forum: STM8 Core
- Topic: How to use Interrupts on STM8 with sduino
- Replies: 7
- Views: 62435
Re: How to use Interrupts on STM8 with sduino
... and move that into my Arduino IDE overwriting the current ones in the sduino folder:
E:\Arduino\arduino-1.8.13\portable\packages\sduino\hardware\stm8\0.5.0\cores\sduino
(I have a portable Arduino IDE installation, as I use many different versions of the IDE in parralel, so this may be somewhere ...
E:\Arduino\arduino-1.8.13\portable\packages\sduino\hardware\stm8\0.5.0\cores\sduino
(I have a portable Arduino IDE installation, as I use many different versions of the IDE in parralel, so this may be somewhere ...
- Sat Jul 15, 2023 8:48 am
- Forum: General discussion
- Topic: 32k crystal won't oscillate
- Replies: 6
- Views: 2124
Re: 32k crystal won't oscillate
Earlier stm32 and stm8 chips do tend not to oscillate. Adding caps usually resolve that. Or a parallel resistor.
High speed xtals tend not to need caps.
Thank you for sharing that information. You are correct that in some cases, certain STM32 and STM8 microcontrollers may require additional ...
- Fri Jul 07, 2023 9:44 pm
- Forum: General discussion
- Topic: 32k crystal won't oscillate
- Replies: 6
- Views: 2124
Re: 32k crystal won't oscillate
Earlier stm32 and stm8 chips do tend not to oscillate. Adding caps usually resolve that. Or a parallel resistor.
High speed xtals tend not to need caps.
High speed xtals tend not to need caps.
- Sun Apr 30, 2023 2:53 am
- Forum: General discussion
- Topic: Is the reset pin needed when debugging BluePill with STLink v2 clone?
- Replies: 0
- Views: 2981
Is the reset pin needed when debugging BluePill with STLink v2 clone?
For in-circuit debugging on a BluePill board with an STLink v2 clone dongle, does the reset wire need to be connected or is that exclusively for programming the STM8?
- Sat Feb 04, 2023 4:16 am
- Forum: General discussion
- Topic: NOT Solved -MAPLE and STM32 not uploading, IDE2.03 EXCEPTION ACCESS VIOLATION
- Replies: 6
- Views: 3321
Re: NOT Solved -MAPLE and STM32 not uploading, IDE2.03 EXCEPTION ACCESS VIOLATION
... to set boot0 for maple(roger's) bootloader)
dfu-util -a 2 -RD sketch.bin
the alternatives are:
st-link v2
\https://www.adafruit.com/?q=ST-Link+STM8%2FSTM32+v2+Programmer&sort=BestMatch
https://www.st.com/en/development-tools/st-link-v2.html
or even better st-link v3
https://www.st.com/en ...
dfu-util -a 2 -RD sketch.bin
the alternatives are:
st-link v2
\https://www.adafruit.com/?q=ST-Link+STM8%2FSTM32+v2+Programmer&sort=BestMatch
https://www.st.com/en/development-tools/st-link-v2.html
or even better st-link v3
https://www.st.com/en ...
- Mon Aug 29, 2022 7:43 pm
- Forum: Off topic
- Topic: Calculators, anyone?
- Replies: 10
- Views: 18354
Calculators, anyone?
... to suggest that many of the HP calculators were implemented on really old chips, like 6502.
That got me thinking: has anyone seen the actual code, preferably C, that implements a calculator? porting it to a 8-bit chip (STM8?) or a STM32F030F4 would be interesting.
for fun or for benchmarking.
That got me thinking: has anyone seen the actual code, preferably C, that implements a calculator? porting it to a 8-bit chip (STM8?) or a STM32F030F4 would be interesting.
for fun or for benchmarking.