All Projects → rumpeltux → stm8s-sdcc-examples

rumpeltux / stm8s-sdcc-examples

Licence: other
Example codes using sdcc to target STM8S MCUs.

Programming Languages

c
50402 projects - #5 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to stm8s-sdcc-examples

SerialTransfer
Arduino library to transfer dynamic, packetized data fast and reliably via Serial, I2C, or SPI
Stars: ✭ 273 (+780.65%)
Mutual labels:  serial, uart
uPy-rosserial
An implementation of rosserial for uPy.
Stars: ✭ 19 (-38.71%)
Mutual labels:  serial, uart
pySerialTransfer
Python package to transfer data in a fast, reliable, and packetized form
Stars: ✭ 78 (+151.61%)
Mutual labels:  serial, uart
Quad-Serial
Quad serial project with FTDI CI's, Isolation and 1.8~5.5v UART port.
Stars: ✭ 17 (-45.16%)
Mutual labels:  serial, uart
Pulsesensorstarterproject
The Best Way to Get Started with your PulseSensor and Arduino
Stars: ✭ 38 (+22.58%)
Mutual labels:  serial, led
LibSerialPort.jl
Julia wrapper for the libserialport c library
Stars: ✭ 54 (+74.19%)
Mutual labels:  serial
rpi boat utils
Utilities for Raspberry Pi, mostly for usage on a boat. Includes UART control scripts, traffic measurement tools for Mikrotik (RouterOS) and OpenWrt, AIS wireless daemon, AIS decoder and an extensible boat & IoT sensor daemon for Signal K.
Stars: ✭ 71 (+129.03%)
Mutual labels:  uart
Saxi
Tools & library for driving the AxiDraw pen plotter
Stars: ✭ 234 (+654.84%)
Mutual labels:  serial
Ohsce
PHP HI-REL SOCKET TCP/UDP/ICMP/Serial .高可靠性PHP通信&控制框架SOCKET-TCP/UDP/ICMP/硬件Serial-RS232/RS422/RS485 AND MORE!
Stars: ✭ 206 (+564.52%)
Mutual labels:  serial
jrxtx
The Java serial communication library.
Stars: ✭ 74 (+138.71%)
Mutual labels:  serial
SwiftyXBee
⚡️ A Swift library for communicating with XBee radios in API mode
Stars: ✭ 22 (-29.03%)
Mutual labels:  uart
Huhnitor
Intergalactic serial monitor for ESP8266 Deauther
Stars: ✭ 265 (+754.84%)
Mutual labels:  serial
STM32 TimerInterrupt
This library enables you to use Interrupt from Hardware Timers on an STM32F/L/H/G/WB/MP1-based board. These STM32F/L/H/G/WB/MP1 Hardware Timers, using Interrupt, still work even if other functions are blocking. Moreover, they are much more precise (certainly depending on clock frequency accuracy) than other software timers using millis() or micr…
Stars: ✭ 27 (-12.9%)
Mutual labels:  interrupt
tobutobugirl-dx
An arcade platformer homebrew game for the Game Boy, Game Boy Color and Super Game Boy
Stars: ✭ 58 (+87.1%)
Mutual labels:  sdcc
Nodemcu Tool
🔧 Upload + Manage Lua files on NodeMCU
Stars: ✭ 248 (+700%)
Mutual labels:  serial
cyclops
Precision current source, with optional optical feedback, for driving LEDs and laser diodes
Stars: ✭ 38 (+22.58%)
Mutual labels:  led
Adalight Fastled
Adalight with FastLED support
Stars: ✭ 232 (+648.39%)
Mutual labels:  serial
arduivis
a bi-directional communication paradigm for programming languages & microcontrollers
Stars: ✭ 48 (+54.84%)
Mutual labels:  serial
neato-serial
Python serial interface for Neato robot vacuum cleaners. Testing on XV Signature Pro, should work on others.
Stars: ✭ 39 (+25.81%)
Mutual labels:  serial
ESP8266TimerInterrupt
This library enables you to use Interrupt from Hardware Timers on an ESP8266-based board. It now supports 16 ISR-based timers, while consuming only 1 hardware Timer. Timers' interval is very long (ulong millisecs). The most important feature is they're ISR-based timers. Therefore, their executions are not blocked by bad-behaving functions or tas…
Stars: ✭ 85 (+174.19%)
Mutual labels:  interrupt

STM8S examples using SDCC

There’s not a great number of useful examples for the stm8s chips that use sdcc. This repository aims to fix this. The examples are currently targeting the STM8S103F3P6 and were tested with the according dev board that is available online for <1$.

Resources

Run

  1. You’ll need a programmer, e.g. stlink-v2 or the esp8266-based esp-stlink
  2. Get stm8flash.
$ make
$ stm8flash -c stlinkv2 -p stm8s103f3 -w led.ihx

Examples

LED & Timer

led.c sets up a timer and uses the onboard LED to blink in defined intervals.

Serial

serial.c demos using the UART to transmit serial data.

Interrupts

  • serial_interrupt.c sets up an interrupt handler to perform serial transmission without busy wait.
  • gpio_interrupt.c wakes up from halt mode via external gpio interrupt on B4.

PWM

sound.c uses a timer and an interrupt to create 8-bit PWM output on a pin. You can directly attach a speaker and will hear a low-volume tone:

Oscilloscope View of PWM output

For better sound-quality add a 2.2μF capacitor to GND as a low-pass filter:

Oscilloscope View of PWM output with capacitor

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].