STC15W408AS library 0.18.0
Loading...
Searching...
No Matches
Change log

0.1.0

  • first version
  • system sfr headers support
  • bit manipulations
  • uart support

0.2.0

  • header flat structure
  • Doxygen documentation
  • add get chip id function (value F51FC47E1D0B52 for STC15W408AS)
  • add master clock and divider frequency functions
  • adapt delay_ms to clock divider, uart not adapted yet

0.3.0

  • add master clock output to pin P5.4 or P1.6 with dividers 1, 2, 4
  • get mode functions for timer0 and timer2
  • get clock divider functions for timer0 and timer2
  • timer0 mode0/12T and mode0/1T implementation with sync and interrupt (async) support. No GATE and INT0 support for timer0 running, only TR0 used for start and stop timer. No P3.5 output.
  • timer2 mode0/12T and mode0/1T implementation with interrupt (async) support. No P3.0 output.

0.4.0

  • Enable and disable timer0 mode0 output to P3.5 pin supported now
  • Enable and disable timer2 mode0 output to P3.0 pin supported now
  • timer0_enable_on_pinINT0_high implemented for timer0 work only on INT0/P3.0 pin is high
  • timer0 and timer2 use interrupts module routines
  • Interrupts module implemented (with interrupts priority and int0/int1 trigger config support)

0.4.1

  • frequency module use defines instead of function decl for output hex code decreasing
  • interrupts module use defines instead of function decl for firmware size decreasing
  • timer module use defines on common functionality instead of function decl for firmware size decreasing

0.5.0

  • delay module now uses #define instead of func decls
  • timer module now uses #define instead of func decl
  • timer0_modeX_run_once_and_wait now has only one parameter uint_16 - timer ticks count
  • timer0_start and timer2_mode0_start now have only one parameter uint_16 - timer ticks count
  • timer0 and timer2 are modules now
  • timer0 and timer2 mode0 reload timer routines implemented
  • timer0 mode1 implemented
  • timer2 mode0 implemented

0.6

  • timer0 mode 0,1,2,3 module full implementation
  • timer2 mode0 module full implementation
  • Aux module convert ticks to frequency implemented
  • Aux module unsafe convert frequency to ticks
  • timer_all.h to timer_common.h renamed
  • delay_ms partially rewrote to asm to decrease the size
  • UART to UART1 renamed
  • Fix: UART bias timer0 1T by setting AUXR.7 value to 1.
  • timer2 baud rate ticks calculation implemented
  • UART1 use timer2_mode0 and timer2 aux modules routines now
  • Implement ticks to times part of aux module for timer0, timer2

0.7

  • Fix: remove variables from the delay module
  • Reset routine implemented
  • Watchdog timer routines implemented
  • delay_ms now is defined again
  • Idle power management routine implemented
  • Power down mode implemented with initial wakeup timer support
  • Use bitmask as a constant in bits.h to avoid unnecessary bit operations in bit_set and bit_clr
  • Use bitmask as a constant in bits.h to avoid unnecessary bit operations in test_if_bit_set and test_if_bit_cleared

0.8

  • Add a memory dump example
  • WakeUp timer implemented
  • Convert time to ticks part of aux module implemented
  • Docs are included in to platformio package
  • Examples compilation is a step of build
  • Enhanced description of the project for indexing in google/yandex and so on search engines
  • Pin module implemented

0.9

  • Pin module set port mode routines implemented
  • Fix examples/mode0/timer2 compilation
  • Fix timer0_mode2_reload - TH0 value should be set, now used TL0
  • Fix INT0 should be defined in timer0 modes
  • timerX_modeX_direct_{reload, start}(TxH, TxL) for direct set TLx, THx registers implemented
  • Does not recompile examples every time. Compile only when it changed
  • Compiler output suppressed for examples building in non-verbose mode

0.10.0

0.11.0

  • Counter0 mode0 routines implemented
  • Counter2 mode0 routines implemented
  • Counter0 mode1 routines implemented
  • Counter0 mode2 routines implemented
  • Counter0 mode3 routines implemented
  • UART1 mode0 send routines implemented
  • UART1 mode1 with Timer2 (12T and 1T) as baud rate generator send routines implemented
  • Timer2 as baud rate generator routines removed from timer2_mode0.h
  • uart1 module use uart1_mode1_timer2_1T routines

0.12.0

  • Fix UART1 mode 0 docs and examples. UART1 interrupt is supported
  • Fix UART1 mode 0 docs. Baud rate is biased by a frequency divider.
  • Fix README content in subfolders
  • UART1 mode2 routines implemented
  • UART1 mode3 timer2 (1T and 12T) routines implemented
  • UART1 supports 2 stop bits on tx/rx in mode 2, 3 (8-N-2)

0.13.0

  • Build a library with cmake (but not examples)
  • Fix delay_ms. On small ms delays it works correctly, but on seconds’ delay it doubled.
  • Rename pin.h to gpio.h
  • Power management low-voltage flag routines implemented
  • Read byte from EEPROM via IAP registers implemented
  • Erase EEPROM page routine implemented
  • Write byte to EEPROM routine implemented

0.13.1

  • Add eeprom_data.hex with eeprom data used for examples
  • Fix issue #3

0.14.0

  • Add ADC (analog to digital convertion) support.
  • Electrical schema for adc examples added
  • Build examples using cmake
  • Generate docs during cmake build

0.15.0

  • Add utility to dump idata RAM (first 256 RAM)
  • Write utility to make a hex file from csv
  • Fix: copy eerprom_data.hex on cmake build eeprom examples
  • Fix: Cmake firmware size is not equal to PlatformIO build size
  • Fix: Firmware built by SDCC 4.5 works correctly
  • Comparator module initial implementation
  • EEPROM write array implemented

0.16.0

  • Wakeup timer init for a given duration routine implemented
  • Timer conversions between ticks and ms/frequency routines refactored
  • timer0_modeX_delay() simplified
  • pin examples folder renamed to gpio
  • Timer0 start on ms/mcs routines implemented
  • Timer2 mode0 start on ms/mcs routines implemented
  • Timer0 starts on freq routines implemented
  • Timer2 mode0 start on freq routines implemented

0.17.0

  • Timer0 sync delay routines implemented
  • CMake examples flash_* targets are fixed
  • Memory dump not only idata but xdata memory too
  • Memory dumper is documented
  • CMake and PlatformIO generate a build summary with firmware sizes table
  • SCons make STC15 library for examples and utilities build
  • Now CMake build can use SDCC 4.1 (PlatformIO), 4.5 (Default for Debian Trixie), and 4.6 (lastest on a current time sdcc version). 4.5 usedd by default
  • GitHub build. On the new tag GitHub CI builds release with artifacts and draft release.

0.18.0

  • Group PlatformIO and CMake build files in separate folders
  • Separate ./README on parts for firmware dev and contributor parts
  • Corrected library.json – Fix a license type from MIT to Apache
  • PCA/CCP module implemented (pca.h): pin group selection, counter clock source, 16 bit counter, compare/capture, high speed toggle output and 8/7/6 bit PWM
  • PCA examples added to examples/pca (PWM, 16 bit timer and capture)
  • Host tests for library headers added to test/ and wired to ctest
  • SPI module implemented (spi.h): master and slave mode, 4 clock dividers, all 4 CPOL/CPHA modes, MSB/LSB first, 3 pin groups, sync and async transfer, write collision detection
  • SPI example added to examples/spi (master loopback)
  • Rework bits module.
  • GitHub CI/CD: add build summary and examples to release

Next releases todo

  • TODO bits module remove SBIT definitions.
  • TODO All modules define bit positions, mask and bits
  • TODO Use static_assert
  • TODO UART1 support frame error
  • TODO UART1 Automatic address recognition support
  • TODO UART1 Relay broadcast mode support
  • TODO UART1 does not work correctly with freq scaling
  • TODO is PCON SMOD bit really double baud rate in mode 1, 2, 3?
  • TODO Try to read/write EEPROM using MOVC assembler command
  • TODO Timer sync delay implementation could use idle and isr handler
  • TODO Comparator module sync mode implementation
  • TODO Use ucsim for testing