Blogroll
-
Recent Posts
Archives
- May 2022
- April 2022
- March 2022
- February 2022
- January 2022
- December 2021
- November 2021
- September 2021
- August 2021
- July 2021
- June 2021
- May 2021
- March 2021
- February 2021
- January 2021
- December 2020
- November 2020
- October 2020
- September 2020
- July 2020
- June 2020
- April 2020
- March 2020
- February 2020
- January 2020
- December 2019
- November 2019
- October 2019
- September 2019
- August 2019
- July 2019
- June 2019
- May 2019
- February 2019
- January 2019
- December 2018
- November 2018
- October 2018
- September 2018
- August 2018
- July 2018
- June 2018
- May 2018
- April 2018
- March 2018
- February 2018
- January 2018
- December 2017
- November 2017
- October 2017
- September 2017
- August 2017
- July 2017
- June 2017
- May 2017
- April 2017
- March 2017
- February 2017
- January 2017
- December 2016
- November 2016
- October 2016
- September 2016
- August 2016
- July 2016
- June 2016
- May 2016
- April 2016
- March 2016
- February 2016
- January 2016
- December 2015
- November 2015
- October 2015
- September 2015
- August 2015
- July 2015
- June 2015
- May 2015
- April 2015
- March 2015
- February 2015
- January 2015
- December 2014
- November 2014
- October 2014
- September 2014
- August 2014
- July 2014
- June 2014
- May 2014
- April 2014
- March 2014
- February 2014
- January 2014
- December 2013
- November 2013
- October 2013
- September 2013
- August 2013
- July 2013
- June 2013
- May 2013
- April 2013
- March 2013
- February 2013
- January 2013
- December 2012
- November 2012
- October 2012
- September 2012
- August 2012
- July 2012
- June 2012
- May 2012
- April 2012
- March 2012
- February 2012
Categories
Meta
Recent Comments
Monthly Archives: December 2021
My goal is to use #dlang in 2022
For a few years now, I’ve held the view “stop futzing around and just use C/C++ or Python”. Recently, I had been poking around with Zig, and it seemed a nice language. It got me to wondering if I should … Continue reading
Posted in Uncategorized
1 Comment
Raspberry Pi FTW
Microcontrollers are a lot of fun to play around with. I’m looking to tinker around with a clock that I got working on my Raspberry Pi 0. On all due consideration, I’d say that if your project doesn’t need real-time … Continue reading
Posted in Uncategorized
Leave a comment
echo in #odinlang
I heard of Odin recently by way of Zig. I decided to see if I could implement echo in Odin. Here’s my code: Who will win, I wonder: Odin or Zig? Multi-value return statements in Odin look interesting. I might … Continue reading
Posted in Uncategorized
Leave a comment
libopencm3: a limited success
I was interested in getting external interrupts working on my black pill. I found the easiest and most reliable way to get it going was using ST’s CubeIDE and MX utils. It’s probably the best way of getting a piece … Continue reading
Posted in Uncategorized
Leave a comment
Rust is a whale of fail
So I saw an interesting program called r4d, which is a macro processing language modelled on m4. To install it: The first thing cargo does is update its dependency tree, or something. This takes awhile. That’s my first complaint. So … Continue reading
Posted in Uncategorized
Leave a comment
A little look at disassembly of #ziglang
I thought I’d see if I could peek and poke memory addresses for my mcu. Here, for example, is how to set or clear a GPIO pin on my STM32: “pin” should have its parameter declared as comptime. If you … Continue reading
Posted in Uncategorized
Leave a comment
Bitcasting in #ziglang
Here’s a useful feature I found in Zig: you can convert from a struct to a number, and back again. Here’s an example: The output is as one might expect: The code converts from a struct to a u32 and … Continue reading
Posted in Uncategorized
Leave a comment
Dumping HAL config changes on an STM32
Using the HAL is a more reliable way of configuring hardware than hand-coding. I’d prefer to do things a bit more “bare metal” and avoid the use of Cube IDE so that I can convert my projects to use CMSIS. … Continue reading
Posted in Uncategorized
Leave a comment
PWM on STM32F411 using #ziglang
I translatedmy CMSIS code over to Zig. It was tested on a blackpill, and should have no trouble working on an equivalent Nucleo. The following code creates a PWM signal of 500Hz at 50% duty cycle to PB5: Some explanation … Continue reading
Posted in Uncategorized
Leave a comment
PWM on CMSIS (STM32F411)
Getting PWM to work on an STM32F411 is somewhat tricky, as there are a few moving parts to consider. You can cheat a little by using CubeMX to set things up. If you want to do things the “proper” way, … Continue reading
Posted in Uncategorized
Leave a comment