[si-contact-form form=’1′]

72 Responses to “Contact”

  1. G. Himangi says:

    Hello Mr. Stevens,

    I am Himangi from LogicNP Software, the developer of CryptoLicensing For .Net. CryptoLicensing for .Net is a 100% .Net solution to add licensing, copy-protection and activation capabilities to your .Net, Windows Forms (WinForms) and WPF applications, components and controls and ASP.Net web sites. CryptoLicensing uses the latest military strength, state-of-the-art cryptographic technology to ensure that your software and intellectual property is protected. You can find more info at

    I recently came across your blog at and found the articles to be quite interesting and useful.

    I am emailing to request you to consider reviewing or mentioning about CryptoLicensing for your site. I feel that your readers will find a review/information about CryptoLicensing quite useful, at the same time a review from an influential writer such as yourself can help us increase awareness of the product.

    I can provide a licensed copy of CryptoLicensing to you so that you can access its full functionality and I will gladly help you during the review process. If you charge any fees for your time, please let me know.

    Thank you for your time. Looking forward to hearing from you.

    LogicNP Software

  2. Hi,

    There are some great projects on your blog, it’s a really nice online resource.

    We’ve been developing an Arduino-based rapid prototyping board that’s designed to make prototyping sensor and Internet-of-Things type projects faster and easier. It has pretty much all you need on one board. It’s called SODAQ. It recently got a lot of attention at Maker Faire Rome including from Atmel and Seeed Studio (we use their Grove sockets). Naturally, now we’re about to start producing it we’re running a Kickstarter to get it going…

    We’re Oxford and Netherlands based, and trying to let as wide a variety as possible of developers and electronics hobbyists here know about it. Would be really grateful for any tips you might have on promoting it a bit.

    For further info, our website is

    The Kickstarter page is

    And our Github repository is

    Best regards,


  3. Farrukh Hussain says:

    Sir I started work on STM8S few days back, just found your wonderful blog but i’m not understanding these codes are from which compiler?

    thank you very much in advance

  4. Sidney Smith says:

    Please I have goon through your tutorials. I am using STM8S Discovery with Cosmic C compiler. I am having some difficulties to test your source codes.

    Please can you advice me on how to proceed.

    Kind regards

    Sidney Smith

  5. Hi Mark,

    First and foremost, thank you for posting the UART code snippets for STM8 – I’ve been tasked with debugging an ST-based board with absolutely no ST micro / IDE knowledge, your website has been an immense help.

    If I may just point out a tiny issue which may or may not be localised to a single page on your website (OCD mode *ON*):

    Line 12 of the third code block: UARTPrintF(“Hello from my microcontroller….nr”);

    It appears as though the backslashes are being stripped out of your posted content (clearly it was meant to be an escaped linefeed and carriage return)

    Petty, I know, but I figured I’d want someone to tell me about that if it happened on my own website, perhaps you’re the same

    Again, thank you, and keep up the fantastic work!

    • Mark says:

      Good to hear that the STM8S information is proving useful.

      Thanks for the information about the error on the page. I’ll get it corrected.

      Good luck with your projects.


  6. Sharique Hussain says:

    provide me a simple example of flash EEPROM(Read/Write) through Registers in stm8s

  7. Sharique Hussain, Nadeem Siddiqui, Shakti Saini says:

    #include “stm8s105c6.h”

    #define PointerAttr @ near
    unsigned int Address = 0x0010A5;
    unsigned char Data = 20,Read = 0;

    FLASH_CR1 &= (~0x01);
    FLASH_CR1 |= 0x00;

    if (FLASH_IAPSR == 0x00) // DUL Bit 0 for Enable
    FLASH_DUKR = 0xae;
    FLASH_DUKR = 0x56;

    (*( PointerAttr*)Address) = Data;
    Read = (*( PointerAttr*)Address);

  8. Sharique Hussain, Nadeem Siddiqui, Shakti Saini says:

    This program write/read properly

  9. Mehwish Mushtaq says:

    Hello Mr. Stevens

    i want to use multiple channels of ADC through registers in stm8l just as five or six channels . So guide me the right way.

    i write as ADC_CR3 = 0x07|0x0B|0x16|0x17|0x0E
    it just a example is it right?

  10. Drexel Haden says:

    Thanks so much for the great site. I have a bit of a newb question regarding timers on the STM8. Is it possible to configure a timer to cause an update interrupt every 30 seconds? I can only get this working down to 1ms. I don’t require any PWM output, just a 30 second wait before triggering an interrupt.

    • Mark says:

      I do not know the answer to this by but this is what I would look at if I was investigating this problem:

      1 – Use a higher speed interrupt and count how many time this happens until I have reached 30s, reset the counter and execute the action.
      2 – Check to see if you can feed the low speed oscillator to any of the the timers.

      I’m glad you find this site useful.

      Hope this help,

  11. Justus says:

    I want to use interrupts on STM8L Discovery Board.
    Id found your Code for useing interrupts on the STM8S MCU.
    They are similiar but i get stuck while translating this follwing section for the STM8L.
    // Set up the interrupt.

    26.EXTI_CR1_PDIS = 1; // Interrupt on rising edge.
    27.EXTI_CR2_TLIS = 1; // Rising edge only.

    PDIS and TLIS does not exist.Id only found this.
    In iostm8l152c6.h //

    #define EXTI_CR1_P0IS EXTI_CR1_bit.P0IS
    #define EXTI_CR1_P1IS EXTI_CR1_bit.P1IS
    #define EXTI_CR1_P2IS EXTI_CR1_bit.P2IS
    #define EXTI_CR1_P3IS EXTI_CR1_bit.P3IS

    #define EXTI_CR2_P4IS EXTI_CR2_bit.P4IS
    #define EXTI_CR2_P5IS EXTI_CR2_bit.P5IS
    #define EXTI_CR2_P6IS EXTI_CR2_bit.P6IS
    #define EXTI_CR2_P7IS EXTI_CR2_bit.P7IS

    In my Case ive got the LEDs on PE7 and PC7 and a Button on PC1
    (On STM8L-Discovery)
    Im a newbie in programming STM MCUs.

    I would be proud if somebody can help me.
    I only want to let a LED Blink when i press a button using Interrupts.
    Like you did.

    Thanks in Advance

    • vikas says:

      hello sir
      you are helping so much . but can you please help me with internal rtc of stm8l152c6 to configure it.

      • Mark says:

        Glad you are finding the series of posts useful. Unfortunately I do not have the microcontroller you have quoted and I have not used the RTC as the STM8S chip I am using does not have this feature enabled.

        I wish you all the best in finding a solution to you problem,

  12. ashvini says:

    hi mark
    writing from new delhi india,
    i understand that you are using IAR wk’bench.
    question is – how on earth are you able to access indivisual bits of STM8 GPIO registers ?
    afaik, STM8 GPIO memory is not bitmapped. so how are you able to write somthing like CLK_ICKR = 0 ??

    is this some secret of the IAR compiler ?
    could you possibly share your register bit definitions file ?


  13. ashvini says:

    sorry, i wrote ‘GPIO registers’ above by mistake.
    it should read ‘all STM8 registers’
    my apologies.

  14. Sean says:

    This is a fantastic post:

    We’ve being trying to draw more attention to great Internet of Things related posts. Would you be interested in posting it on CodeProject (10 million members) to get more eyes on it?

    Please email me at sean[at] if you are interested, or if you have further questions.

  15. Arash Kazemi says:

    Hi Mark,
    First, let me thank you for your magnificent website, which has been the best resource I have found on developing for STM32 and STM8, and have used it a lot.

    I am currently working on a project using STM32F103R8, and I have problem securing it. I use a JLink programmer/debugger, and when I use the Secure Chip option in JFlash, the chip stops working. I have no clue about the reason. Could you please give me some hints? I used to work with AVR family, they have some lock bits which prevent reading the flash content when set, but seems like that is not the case in STM32. I have searched a lot but couldn’t find anything, that’s why I am asking you. Thanks a lot.

  16. Maxime says:

    Hello Mark,

    I’ve discovered your blog through your posts about the TLC5940.
    ( )

    First of all thanks for this documentation, which is the most precise I could find about external clock and Tlc5940.
    I’ve been running a Tlc5940 with an Arduino, and got stucked because of the small speed of pwm write on the arduino to control the GSCLK. That’s why i’m currently looking for solutions to make it quicker and found your blog.
    All this circuit part, with crystal and everything is really new to me, so, soryy if my question is a bit silly…
    In your circuit diagram, we see that your controller blank pin is connected to the 74HC32, but I thought the blank was sent automatically every 4096 pulse by the combination of the crystal and the 74HC4060. Do you still need to send the blank with your program?

    Hope you will read me, and thanks again for this great documentation.

    • Mark says:

      Glad you find this information useful.

      You do not need to send the blank signal from your application. You can rely on the counter to trigger the blank pulse at the right time. The reason I added the OR gate was so that if a slow clock was being used and the application wanted an instant reset then it could be supplied from the micro-controller. You can remove the gate and the signal from the micro-controller if you want. With the 8MHz clock circuit I designed it is a bit of overkill.

      All the best with your project,

  17. Ted Jones says:

    I am starting an STM32L15x project using a CooCox IDE. One area is a radio link so I’m going to use a Microchip MRF24J40MA Zigbee module but purely for point to point 2 way comms. So my aim was to use a Microchip stack, the MiWi P2P protocol, however I believe that this is only licenced for PIC microcontrollers.

    The MRF24J40MA uses an SPI bus with three I/O lines (INT, WAKE and RESET) so changing the SPI code from PIC to STM32 should be possible. Any ideas or tips? Thanks.

    Ted Jones

  18. Wolfgang Kurz says:

    Hello Mark,

    i saw your excellent Example to communicate with your Netduino over USB with Windows Forms. I need also windows form for my netduino plus 2 application wich works with the serial port. I am new to c# and windows froms either, so i wanted u to ask if u can help me if I send u my programming code wich is not very big and easy to explain. Or can u give me an easy tutorial, how to link buttons with ur netduino events or smth like that.
    Thanks in advance!


    Wolfgang Kurz

  19. Marcelo says:

    Hi there, your site is very good! please, what is the compiler that you used in the examples for STM8 microcontrollers? Tks1!

    • Mark says:

      Thank you, the STM8S section of the site has been an interesting journey.

      I use the IAR free compiler, it is good for 8K of code, after that you need to purchase a licence. I have not run into any limits so far.


  20. Jack says:

    Hello Mark
    I have a problem about UART RX interrupt. would you pls. would you pls put a example in your website or give me an email to me so i can share my code with you ?


  21. Rin says:

    There ‘s a mistake in your article here:
    You wrote:
    I2C_OARH_ADD = 0; // Set this device address to be 0x50.
    I2C_OARL_ADD = 0x50;

    If your slave’s address is 0x50 then OARL register content should be 0x50<<1.
    This mistake makes me waste two day until I notice it in the reference sheet. Well I'm in the wrong for not read the doc carefully.

    Anw your blog helped me a lot ! Thank you.

  22. Mehrdad says:

    Hi Mark,
    First, let me thank you for your magnificent website,
    which has been the best resource I have found on
    developing for STM8l, and have used it a lot.

    I am currently working on a project using STM8l151C6.
    I use a STVD and Cosmic debugger, and want to
    use the micro in low power run mode but I have problem.
    I have no clue about the reason. Could you please
    give me some hints? I used to work with AVR family,
    but seems like that is not the case in STM8l.
    I have searched a lot but couldn’t find anything,
    that’s why I am asking you.
    Thanks a lot.

    • Mark says:

      Thank you for your appreciation of this site. I’m glad you find it useful.

      On the STM8S I’d be looking at section 10 of RM0016, The reference manual. Specifically section 10.2 in order to work out which power saving mode would be applicable to me. I have never looked at the power saving features before so I can only suggest what I would look at. If I was looking for the maximum power saving and no processing required unless interrupted then I would be thinking about using the halt statement (I think this would be the __halt() instruction in IAR’s environment). I believe you would need to be using the internal HSI for this to work. I also think you need to looking at disabling the main voltage regulator (REGAH bit in the CLK_ICKR register).

      Hope this helps,

  23. Niczko says:

    Looked at your STM8S I2C slave mode example, thanks for posting it.

    A quick note: you don’t need to set timing details (I2C->FREQR, I2C->CCRH, I2C->CCRL, I2C->TRISER) when the peripheral is only operating in slave mode.

    I think that setting these registers in this tutorial is confusing, because that seems to defeat the purpose of a synchronous communication where the receiver doesn’t need to know about the incoming data rate (at the expense of a separate clock line).

    • Mark says:

      Thank you for taking the time to point this out, I’ll bear this in mind in future.


      • Niczko says:

        Also, it seems you don’t handle the STOP condition in your interrupt routine.
        As a result, the micro will endlessly reenter the interrupt routine (because the flag STOPF in register I2C->SR1 is never cleared).

  24. Arko says:

    Hi, Is it really needed to set registers to their init value after boot/reset?
    Isn’t POR takes care about that? (I also saw the overuse of Deinit() from lib).


  25. Nick HIll says:

    Hi. Thank you for putting up example code for the STM8. I am just getting started with this micro.

    I have installed STVD and COSMIC compiler. I have gotten as far as to create LED flasher from scratch,.

    It must be because I have just started with this micro, and don’t understand how the STM8 world works yet… but it really seems to me that each compiler comes with it’s own version of headers for a particular part… and each vendor choses a different name for the ports. And Cosmic doesn’t appear to set names for special purpose bits as bolean values in SFRs.

    Of course this kills code portability stone dead, and any C code to be valid for the micro would need the same vendor’s header file and moving from one vendor to another would either force re-learning of SFR names, or for the user to write their own compatibility headers.

    I’m not sure where to go from here. I am truly loathed to write code against a specific vendor’s non-redistributable headers. I have written my own header for port bits for the “Hello World” LED flasher, but surely this isn’t really how to get started with this micro. Have I got it all wrong? Perhaps you can advise?


  26. Robothito says:

    Hello. Great tutorials.
    I have been working with the STM8 just recently. And I found your post on GPIO

    I have two questions:
    1) in the first picture

    What is the yellow cable in the left (near the NRST pin I guess-in green)? This cable is going left and it seems to be connected to the ground black cable… can you explain please?

    2) You don’t put any wiring to the NRST pin? I figure it out that some capacitor , a resistor and maybe a switch would be needed…

    Would appreciate very much a reply on these


    • Mark says:

      Glad you like the tutorials.

      The yellow cable is actually the GPIO pin that is being toggled and this is going to my oscilloscope. It is not connected to the crocodile clip but goes under the clip to the scope probe. You can just see this in the top left of the picture. Sorry it’s not the best picture.

      The green lead is actually connected to NRST – if you follow the connection it goes to the NRST connection on the ST-Link/V2.


  27. sravanakumar says:

    sir which IDE you are using for STM 32 processor

    • Mark says:

      Until last year I was using he CooCox IDE ( This is a free development environment based upon Eclipse and GCC. It’s actually fairly good.

      My IDE of choice is Visual Studio and there is a reasonably priced add-on for the Community Edition of Visual Studio that can compile for a number of microcontrollers including the STM32. The add-on is VisualGDB ( and the next time I do any development with the STM32 I’ll be using this combination, Visual Studio + VisualGDB.

      Hope this helps,
      Twitter: @nevynuk

  28. costel stratulat says:

    Hello Mr Mark Stevens ‎. I really need your help and i will greatly appreciate it if you can spare some time to help me out . I am a totaly newbie in prgramming and its imposible for me to write a program for a stm 8s .

    here is my problem: I have a rc bait boat with proprietary software and hardware. The boat propulsion are two brushed dc motors wich are working in forward or reverse mode by using two relays to swap the polarity of the motors . I need to upgrade the motors with brushless type motors , i have also two esc to drive these motors but i dont have any pwm signal to drive the esc. here it comes my problem . the mcu of the board is a atmel , it uses 3volt to gnd to power up the motors and drive forward ( i believe that the mcu signal is used to trigger some p channel mosfets. To go in reverse mode, the mcu trigger the relay to swap polarity of the motors and then it does the same thing , 3volt to gnd to power up the motors to full speed .

    My question : is it posible to use these 3 volts as a reference voltage and the relay trigger signal to create a pwm signal , so i can drive the esc of the brushless motors ?

    Thank you very much for your time .. with all my respects Costel Stratulat .

    • Mark says:

      I’m sorry but I have no experience using motors / ESC etc. and so I am unable to help at this time.

      Good luck with your project.

  29. Keith Fleming says:

    Hi Mark! This site is brilliant. It has helped me get up to speed on the STM8S103 despite the lack of Arduino support for it in their IDE. So I am getting proficient with “bare metal” software development and you have been a great help.

    My question relates to reading an I2C register as a way of clearing a condition, example your I2C-Master example code, in the interrupt service routine:

    if (I2C_SR1_SB) {
    // Master mode, send the address of the peripheral we
    // are talking to. Reading SR1 clears the start condition.
    reg = I2C_SR1;
    // Send the slave address and the read bit.
    I2C_DR = (DEVICE_ADDRESS << 1) | I2C_READ;

    My question is, doesn't the test for the SB bit being set perform the task of reading the register, making the "reg = I2C_SR1" line unnecessary? I'm not suggesting you rewrite the code. It is just my curiosity is "at what point does the CPU recognize that the register has been read". Or perhaps the compiler you are using does something tricky like checking bit 0 of the register and "reg = I2C_SR1" does a full-blown transfer of register contents to one of the CPU's registers. I'm using SDCC (not a high-price IDE). Thanks for any insights!

    • Mark says:

      Sorry for the delay in replying, the day job has been manic recently.

      Looking at the code I think you are right about the read.

      Glad you have found the site useful.


  30. rasoul sepehr says:

    I have a problem in jump to flash address on method.


    #pragma location = 0x9000

    void VoidInLocation9000(void)
    //printf …

    int main()

    //delay_ms 1000

    asm(“JP $9000”);

    while (1)

    pleas help me!.. 🙁

  31. Louis Luyckx says:

    Hello Mr Mark Stevens,

    I have read about your weather station project.
    I want to make also a weather station.
    I’s it a problem to get help when necessary?
    I’m from Belgium. Your name sounds like a Dutch name!



  32. Louis Luyckx says:

    Hello Mark,

    A few days ago I left a message but did not get a reply.
    Maybe something was wrong, so I try again.
    I’m busy with making an arduino project. I want to read out several sensor
    and write these values every 4 hours to the sd-card. So far no problem with reading and writing to the sd-card and adding a time stamp of the writing time.
    Now I want to add a reed switch and count all the pulses between every 4 hours and also write it to the sd-card with the same time and date like I write the other values.
    The problem is that in the main time i must store all the pulses coming from the reed switch between this 4 hours and read them out with same seqeunce i read the other sensors (every 4 hours)
    I was thinking to store the pulse to the eeprom and keep only the latest value in the memory and read that value out when the 4 hours are over.

    Most thanks for your reply

    • Mark says:

      I had a similar problem with the pluviometer on the project. I first started to look at using a 7400 series counter to count the pulses. This would be left running whilst the ESP8266 went to sleep. I would then read the pulses when the ESP8266 woke up. This required a number of lines to read the state of the counter and I simply started to run out of GPIOs.

      The solution I have settled on is to add a second microcontroller to the system. This is very low power and simply counts the pulses. I am then going to communicate with the ESP8266 over I2C. The ESP8266 requests the pulse count from the second micrcontroller when it wants to take a reading. It also has the ability to zero the counter when necessary.

      Hope this helps,

  33. Gee says:

    Hi, I am having trouble sending out a PWM signal on PC4 (STM8S003F3 which is Timer 1 Channel 4). Your example code works for PD4 (Timer 2 channel 1). Though I need it on PC4.

    I made some changes such as renaming TIM2xxx to TIM1xxx.

    Apparently, Timer 1 doesn’t have a prescaler, CCER4, etc.

    How would you even select the channel?

    Thanks for your time

    • Gee says:

      This is what I have in the setupTimer function

      //TIM1_PSCR = 0x00; // Prescaler = 1.
      TIM1_ARRH = 0xc3; // High byte of 50,000.
      TIM1_ARRL = 0x50; // Low byte of 50,000.
      TIM1_CCR4H = 0x30; // High byte of 12,500
      TIM1_CCR4L = 0xd4; // Low byte of 12,500
      TIM1_CCER2_CC4P = 0; // Active high.
      TIM1_CCER2_CC4E = 1; // Enable compare mode for channel 1
      TIM1_CCMR4_OC4M = 6; // PWM Mode 1 – active if counter < CCR1, inactive otherwise.
      TIM1_CR1_CEN = 1; // Finally enable the timer.

    • Gee says:

      Sorry I just checked your “Single Pulse Generation with the STM8S”

      I see you are using the Timer1 Channel 4

      Though I am not sure why there is a big difference between the two timers

  34. Paul M says:

    Hi Mark-

    I found you through the netduino forums. I’m an ME trying to support a product that we built using a Netduino Mini. It looks like they’re no longer made so I’m looking at having them produced using the opensource files. I’m currently trying to run down all the required firmware and not having much success. Do you know anyone in the NetDuino community that could help, or that does consulting?


    Paul M

  35. Emile says:


    Thanks for the site, it got me up-to-speed with STM8 programming real fast! I have an update w.r.t. your blog ‘storing data in eeprom on the STM8s’. You mentioned that you needed a couple of tries before data was stored. I think I found the problem: the reference manual states that you must check that the DUL bit is effectively set. So if you add the following line (after having written the MASS keys and before writing the data itself):

    while (FLASH_IAPSR_DUL == 0) ; // wait until EEPROM is unlocked

    Then all is good. It apparently takes a bit of time before the EEPROM is unlocked. Hope this helps!



    • Mark says:

      Thank you for the advice, I will work the modification into my future projects.

      Glad you found the blog useful, it has been a labour of love.


  36. Johan Smit says:

    Hi Mark,
    In gratitude for all the helpful code you publish, I would like to send you the code I wrote for Interrupt bit bang serial for STM8S103. I looked all over for an example and found none. Therefore I wrote it, and it may be helpful to others.
    How can I send you the tested code please?
    Thank you
    Johan Smit

  37. Mohammad Shoghi says:

    I’m Mohammad from Iran. Thank You for your useful blog Mr.Stevens.
    I have problem about one of your post with “STM8S Timers” name. (with SPL).
    In this post you did select internal clock source with 16MHz frequency that it used directly as input clock of timer 2. the period of 16MHz is 0.0000625 miliSecond !
    that means when we select 4096 prescaler for our timer ; the ISR frequency should be 0.256 ( 4096 * 0.0000625 ) and final frequency ( on GPIO Pin ) should be approximately half miliSecond ( 2 * 0.256 = 0.512 ).
    my calculation is different with your results.
    could you please more explain for me.
    best regards.

  38. Marko says:

    There is a bug in the “SPI and the STM32” tutorial that must be fixed.

    There will be problems if you only send one byte by DMA. Then the DMA2_Stream5_IRQHandler() could be executed before BSY flag is set to one. Then the cip select would be set high before the data is sent.

    This only happened to me when i used SPI1 and SPI2 at the same time.

    To fix this you must add a while statement that waits until SPI SR RXNE is one. Then wait for BSY to be zero.

    And you should also clear the OVR bit in DMA2_Stream5_IRQHandler()

  39. I received word that you are enjoying utilizing Syncfusion’s free product offerings. I wanted to reach out and see if you were interested in becoming a guest blogger for Syncfusion. By providing your story, you not only create exposure for you and your company, but an avenue to showcase your application to the developer community. From this mutual support, we learn more about developers like yourself and how you use our flexible controls to create these outstanding applications.

    Please let me know if you are interested in creating a blog post about your experience with Syncfusion’s products.

  40. Manue says:

    do you think is posible to use your code in a serie of videos in spanish for youtube?

    • Mark says:

      Yes, please feel free to use the code from my web site in your YouTube videos.

      Would you please send me a link to the videos when they are posted. I am interested to see how my work is being used.


  41. Robert Metzner says:

    Hello Mark: I thoroughly enjoyed your writeup of the DS3234, it is by far the most WELL DOCUMENTED code I’ve come across. It’s amazing what trash you can find on GitHub! I was looking for “alarm flag clearing” when I came across your blog. That being said, I am working on an Enteral Feed Pump for Tube Feed Patients and decided to start with the ESP32. I am driving an SPI display with it for the UI. I chose the ESP32 for its wireless connectivity right out of the box, and it isn’t memory constrained as are many Arduino products. I’m successfully using Visual Studio with the Visual Micro port to Arduino. I was a bit disappointed you used “BitBang” to emulate the SPI since it’s bound to be much slower. Best Regard, Bob Metzner

    • Mark says:


      Glad you found the documentation useful. I try to only post working projects or updates to projects that are in flight.

      Regarding the BitBang, this was a quick fix to get the code going. The long term aim was to abstract the code into the clock module, the memory module and a transport provider. The clock and memory modules were going to be abstracted to allow for me to use the same code to be run on a DS3231 and DS3234. the former does not have any memory by default. The transport provider would allow the use of SPI, BitBang or I2C. It’s just that I have not managed to complete the work. It should be a simple case of changing the methods at the top of the file to implement SPI.

      I like the ESP32 as well, as you say, plenty of memory and WiFi built in. Really useful. I see that there are a couple of tutorials out there covering debugging in Eclipse as well.

      All the best with your projects.


  42. Subin says:


    Thank you for taking the effort in writing a blog for the STM8S.

    I am trying to learn to use the STM8S105 Disovery board. I would like to know if I must use the Standard Peripheral Library or should I use Direct Register Manipulation to program? On reading your posts, I saw that the Library has a few bugs.
    Which method do you recommend, keeping in mind that I am a newbie to microcontrollers with a little experience on the Arduino.

    Thank You.

    • Mark says:


      If you are new to Microcontroller development I would look at using the Standard Peripheral Library. This will abstract you from a lot of the detail.


Leave a Reply