Some Useful Tips
When using a new compiler, I evaluate some certain things. For instance, how do I include my own
written library files, interrupt management, what conventions I must follow and what dos and don'ts
must be observed.
Creation & Addition of libraries
At some point in working with any microcontroller, you'll need two basic libraries more than anything
else. These are LCD and delay libraries. LCDs are great tools for quickly projecting or presenting data
apart from debugging a code with a debugger. Similarly, time-wasting delay loops help us slow down
things at our liking. Humans are not as fast as machines. Delays can be avoided in many novel ways
but delays keep things simple and so are necessities in some areas.
The Standard Peripheral Library only provides libraries for hardware peripherals and surely not for
anything else. It is also practically impossible to provide library for all hardware on available on the
planet. Thus, whenever when we will be needing new hardware integrations with STM8s, we will have
to code and tag our libraries with our projects. So how can we do so?
Earlier in this article I discussed about alphanumerical LCDs and delays. If you check the datasheet of
such LCDs, you'll find initialization sequences in some while in others you may also find ready-made
codes. These sequences are needed to be translated in code just like what we do with I2C or SPI-based
devices. Shown below is such an example:
Need help?
Do you have a question about the STM8 and is the answer not in the manual?
Questions and answers