humour

We can do memes in Queensland too

At the last federal election, we started seeing this meme floating about the Internet…

“Quexit” meme, (source: ABC)

Of course, we in Queensland can do memes too…

“Vexit” anyone?

That said, one hopes Victoria can get over their COVID-19 issues and come join the rest of us. This isn’t the (Dis)United States of America, this is Australia, we’re one country, and it’s our problem collectively to sort out, so let’s just put our differences aside and get on with it!

Corona Baby

I’ve had this stuck in my head all day…one sorta has to pronounce “Corona” as “Crona” to make this work… Apologies to John Carter and The First Class…

Do you remember back in olden day, (wo-oh-oh)
when everybody lived a care-free way (wo-oh-oh)
whatever happened to the boy next door,
now sneezing, hiding behind the bathroom wall!

Remember dancing at the high school hop
The dress I ruined with the soda pop?
Quarantine didn’t mean a thing
Hundreds of people getting in the swing!

Corona baby, Corona baby, give me your hand
let me share what I can remember
Life as before we all got caught
in the lock-down.
Corona baby, Corona baby, you can’t understand
why society was so quick to dismember.
Days in the sun, to lyin’ on our bum every day!

Groom of the Stool

So we’re all working from home at the moment with COVID-19 wreaking havoc… and of course the toilet humour has been flowing like a fountain…

Our workplace’s #random channel on Slack…

Sounds like a great start-up… of course the idea has only been around about 400 years. 🙂 Sometimes truth is stranger than fiction.

How did I get to be an Engineer?

Sometimes I wonder.  Take this evening for example.

I recently purchased some microcontrollers to evaluate for a project, some Atmel ATTiny85s, because they have a rather nice PLL function which means they can do VHF-speed PWM, and some NXP LPC810s, because they happen to be the only DIP-package ARM chip on the market I know of.

The project I’m looking at is a re-work of my bicycle horn… the ATMega32U4 works well, but the LeoStick boards are expensive compared to a bare DIP MCU, and the wiring inside the original prototype is a mess.  I also never got USB working on them, so there’s no point in a USB-capable MCU.

I initially got ATMega1284s owing to the flash storage, but these being 40-pin DIPs, they’re bigger than anticipated, and the fact they’ve got dual USARTs, lots of GPIOs and plenty of storage space, I figured I’d put them aside for another project.

What to use?  Well I have some AT89C2051s from way back (but no programmer for them), some ATTiny24As which I bought for my solar cluster project, an ATMega8L from another project, a LeoStick (Arduino Leonardo clone).  The LeoStick I’m in the process of turning into a debugWire debugger so that I can figure out what the ADCs are doing in my cluster’s power controller (ATTiny24A).

I started building a programmer for the ‘2051s using my ATMega8L last weekend.  The MAX232 IC I grabbed for serial I/O was giving me jibberish, and today I confirmed it was misbehaving.  The board in general is misbehaving in that after flashing the MCU, it seems to stay in reset, so I’ve got more work to do.  If I got that going, I was thinking I could have PCM recordings in an I²C EEPROM and use port 1 on the ‘2051 with an R2R ladder DAC to play sound.  (These chips do not feature PWM.)

Thinking this morning, I thought the LPC810 might be worth a shot.  It only has 4kB of flash, half that of the ATTiny85, and doesn’t have as impressive PWM capabilities, but is good enough.  I really need about 16kB to store the waveforms in flash.  I do have some I²C EEPROMs, mostly <2kB ones that are sourced off old motherboards, but also a handful of 32kB ones that I had just bought especially for this… but then left behind on my desk at work.

I considered audio compression, and experimenting with ADPCM-style techniques, came to the conclusion that I didn’t like the reduced audio quality.  It really sounded harsh.  (Okay, I realise 4-bits per sample is never going to win over the audiophiles!)

Maybe instead of PCM, I could do a crude polyphonic synthesizer?  My horn effect is in fact synthesized using a Python script: the same can be done in C, and the chip probably has the CPU grunt to do it.  It’d save the flash space as I’d be basically doing “poor man’s MIDI” on the thing.  Similar has been done before on lesser hardware.

I did some rough design of data structures.  I figured out a data structure that would allow me to store the state of a “voice” in 8 bytes, and could describe note and timing events in 8-byte blocks.  So in a 2kB EEPROM, I’d store 256 notes, and could easily accommodate 8 or 16 voices in RAM, provided the CPU could keep up at 30MHz.

So, I pull a chip out, slap it in my breadboard, and start hooking it up to power, and to my shiny new USB-TTL serial cable.  Fire up lpc21isp and, nothing, no response from the chip.  Huh?  Check wiring, probe around, still nothing.  Tried different baud rates, etc.  No dice.

This stubborn chip was not going to talk to lpc21isp.  Okay, let’s see if it’ll do SWD.  I dig out my STLink/V2 and hook that up.

OpenOCD reports no response from the device.

Great, maybe a dud chip.  After a good hour or so of fruitless poking and prodding, I pull it out of the breadboard and go to get another from the tube it came from when I notice “Atmel” written on the tube.

I look closer at the chip: it was an ATTiny85!  Different pin-out, different ISP procedure, and even if the .hex file had uploaded, it almost certainly would not have executed.

Swap the chip for an actual LPC810, and OpenOCD reports:

Open On-Chip Debugger 0.10.0-dev-00120-g7a8915f (2015-11-25-18:49)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select '.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 10 kHz
adapter_nsrst_delay: 200
Info : Unable to match requested speed 10 kHz, using 5 kHz
Info : Unable to match requested speed 10 kHz, using 5 kHz
Info : clock speed 5 kHz
Info : STLINK v2 JTAG v23 API v2 SWIM v4 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 2.979527
Warn : UNEXPECTED idcode: 0x0bc11477
Error: expected 1 of 1: 0x0bb11477
in procedure 'init'
in procedure 'ocd_bouncer'

I haven’t figured out the cause of this yet, whether the ST programmer doesn’t like talking to a competitor’s part. It’d be nice to get SWD going since single-stepping code and peering into memory really spoils a developer like myself. I try lpc21isp again.

Success!  I see a LED blinking, consistent with the demo .hex file I loaded.  Of course now the next step is to try building my own, but at least I can load code onto the device now.

Song-book for the spy agencies

Seems spying on citizens is the new black these days, most government “intelligence” agencies are at it in one form or another. Then the big software companies feel left out, so they join in the fun as well, funneling as much telemetry into their walled garden as possible. (Yes, I’m looking at you, Microsoft.)

This is something I came up with this morning. It’s incomplete, but maybe I can finish it off at some point. I wonder if Cortana has a singing voice?

Partial lyrics for the ASIO/GCHQ/NSA song book

Microsoft gone mental as anything?

Some time back I actually got to look at Windows 8 first hand.  What intrigues me about this, is it seems to be more a knee-jerk reaction of the rise of the tablet, and less a careful considered re-work of a user interface.

In fact, what I hear on the grape vine, they don’t seem to have any real road map forward.  This has scared the likes of Rockwell Automation, who have started baking their SCADA systems into their hardware to remove their dependence on the OS.

All this to chase the tablet and smart phone market.

It makes me wonder what their road map actually is.  Perhaps they’ve taken a leaf out of Mental as Anything’s song book?  Sure looks that way…

New Windows released last night
You could call it a blight
It’s such a shame, We never thought it was
Gonna be so bad!  They wished for something good.

They’ve had enough of that
at other times in days gone by.
Changed so much I know…
Mmm just enough, enough to make you cry.

If you leave me, can I come too?
We can always stay
But if you leave me, can I come too?
And if you go, can I come too?

We let it happen again!
‘Cause that they couldn’t take.
Ooh once was quite enough
It’s easy to forgive, harder to forget

If you leave me, can I come too?
We can always stay
But if you leave me, can I come too?
And if you go, can I come too?

(Original lyrics credit: Chuck Krumel, Jeff Raymond, James Stewart)