So... a lot's happened.

I had to bail on the advent of code because it became clear to me that my day job wasn't happy with me. It turns out that was justified because as on the 17th, I was let go.

So now I have a bunch of free time on my hands; I've got some preliminary feelers out for something next year, but in the meantime I think it's best to take this time to hack on a bunch of projects (and also to take time to rest and take care of myself).

A plan is formed

First, I wanted to set some goals. These are:

  1. Learn enough about FPGAs to get a foothold into working with them.
  2. Learn enough React to be able to build front ends for things.
  3. Learn enough Android programming to be able to build mobile apps for things.

Here's my focuses:

  • Week 1 (01-07JAN): React with the goal of a working web client for whereami.
  • Week 2 (08-14JAN): Android with the goal of a working Android client for whereami.
  • Week 3 (15-21JAN): Hack on Forth
  • Week 4 (22-38JAN): Hack on Forth

The last two weeks (and any further time) aren't set in stone so that I have time to adapt to the things I want to do. In addition to this plan, I'm trying to set a strong habit of waking up early, exercising, and generally being healthy. There's also a couple of books I want to get through this month too:

  • Computer Systems: A Programmer's Perspective
  • The Architecture of Symbolic Computers

I obviously won't get through all of them but I sure as hell can try to get as far as I can, so that's what I'm going to do.

On hardware stuff

First off, my plan. I'd like to incorporate more hardware stuff - beginning with the TinyFPGA, iCEStick, Blue Pill, and various other boards lying about. I've written a touch of Verilog now, and I don't mind it. I've also gotten platformIO and CMSIS working with the blue pill, so that's a benefit.

I picked up a TinyFPGA BX a while ago, and hadn't gotten around to doing anything with it. Well, I wrote a little Verilog: a beacon, connecting the button directly to the LED, and toggling the LED with the button. I ran into the common problem of bouncy buttons, but what I found that worked as a quick hack was to trigger the toggle on the negative edge of the button. In Verilog, this is

    // The negative edge is when the signal transitions from 1 to 0.
    always @(negedge PIN_6) state <= !state;

There's a similar posedge in Verilog, too, that works on the transition from 0 to 1. I've been working on designing a board called TinyAdder. It uses four slide switches to input numbers with a pair of pushbuttons to calculate and clear, and outputs to a pair of 7-segment LCDs. I'm kind of excited to hack on it; it feels good to get back to hardware. That being said, I'm also finding out again about how hardware can be tough to get right. I'm on revision 3 of the board; I caught a mistake in rev1 before it was sent to the fab, but I didn't catch the mistake in rev2 in time.

Basically, rev2 happened when I realised that the LCDs were missing resistors; I had been looking at a tutorial that used a shift register; the shift register apparently had an internal current limiter so I assumed the LCDs didn't need them. This was wrong. Fortunately I was able to cancel the rev1 order before it went out.

Then, rev3 happened after breadboarding the push button (it took me a while to dig up some of the hardware I needed - I'm still waiting on some 7-segment displays to show up); I realised I'd messed up the schematic (and accordingly, the board) by wiring both ends of the push buttons to Vcc, which... isn't very useful at all. I fixed it, but not before the rev2 was sent to the fab.

A lot of these mistakes are just because I haven't been doing schematics or working on these things in a while. It's embarassing, and I could catch it by being more observant, but in this case I'm opting for a faster tempo. Also, I don't have all the parts - so there's a bit of impatience involved, too.

On notes

I've been using Vim a lot more lately - mostly for used with C/C++ and Verilog. I've also been keeping plaintext dev notes on my laptop (using syncthing to push them up to my dev vps). It's kind of helpful, and I got to use SQLite's full-text search tooling for the first time.

On Forth

Yeah. I've got the itch again. I still think it would be clutch to get my own Forth built and running on the blue pill. I would also like to have a carrier board with μSD and an RTC for it, too. On that note, I do have a Feather M0 (with a LoRa radio, too) with a carrier board that has both of those on it. It's more expensive than the blue pills (so much more), which means I can't use them as cores for future projects so easily, but it could be a cool base. And it would buy me time to design the carrier board I want. The only problem is that the board doesn't support the CMSIS framework (or any framework besides Arduino) and I don't really want to write an Arduino Forth. So... back to the drawing board. I really need to have a carrier with RTC and μSD, and some way of hooking into the GPIO pins.

Okay this is getting long enough. Time to go do something useful...