06/25/2018 at 05:46 •
The STM8S external interrupt configuration is very limited (one interrupt vector per port A through E). As long as just one GPIO triggers the interrupt one knows implicitly what caused it. When more than one input is used it's not so easy.
The STM8L applies this scheme only to the ports B and D. A second set of interrupt vectors capture interrupts triggered by port inputs Px0 through Px7 for ports A through E (plus port F in the case of PF0). It's thus possible to get two interrupts for the same port B or port D change, or (which is more useful) to have two different interrupts for, say, PB2 and PC2.
The STM8L family has more options than in the STM8S family but still one has to be very careful when designing a circuit.
06/14/2018 at 04:14 •
About 3 weeks after transmitting the KiCad gerber files 3 PCBs arrived from the USA. To my surprise the finish is ENIG (gold) not HASL or similar, which looks great. This makes the price of my small prototyping batch even more surprising!
The soldering mask of the KiCad TSSOP footprint, and very accurate rendering, made soldering the µC easier than thought, certainly easier than any cheap "TSSOP20 DIL adapter PCB" I soldered so far.
Of course I made a mistake with the PCB, but it's a minor one: the drills for the CR2032 battery holder are a bit too small. Half a minute with a nailfile made the pins fit in. No problem, but I'll update the PCBs. Otherwise the components all sit at the right spot.
In the meantime, the nRF24 code has been refactored and made ready for using STM8L051 instead of STM8S103 (or for any other STM8 eForth target). Hopefully I'll get to implementing the Ping application soon :-)
05/19/2018 at 07:55 •
This HaD project begins with my latest STM8 eForth log.
Richard's nRF24L01 library for STM8 eForth was a very good starting point for experimenting with the most prolific of all transceiver devices (in the meantime I learned that genuine nRF24L01+ chips are rare, and the best one can hope for is the "quite OK" SI24R1. For simplicity I'll refer to it as nRF24L01, and I also try to get a set of radio modules with genuine chips to test compatibility.
The cool thing about using STM8 eForth is that it's far more than a programming language on a nimble µC: it's also an operating system and a programming environment. I'd like to explore how to install features, "software apps", over the air.
For obvious reasons, a wireless sensor should consume very little energy, and selecting a µC with an RTC and very low energy needs in halt state is an important requirement. I'll start with cheap CR2032 coin cells, but other power supplies will be considered (e.g. a "solar garden light" style power supply with a single NiMH cell). I designed a STM8L051F3P6 breakout board that will be the foundation for my first experiments. As a PCB design tool I use KiCad 5.0.0.rc2, and the first set of PCBs I ordered it from @oshpark.
While I wait for the PCBs to arrive, I'll be working with an STM8L051F3P6 breakout I made some time ago, and I'll try to design a first sensor PCB with a humidity/temperature sensor.
@Wassim uses a BME280 chip in his Home Smart Mesh project. The page Humitidy Sensor Shootout offers a great overview, and the Bosch chip appears to be one of the best. It also offers a barometric pressure sensor, let's see what can do be done with it.