MythTV and the Freeview Retune
by Mike on Sep.30, 2009, under Home Stuff, Linux
Spent a couple of hours trying to get MythTV back up and running tonight after the Freeview retune. A simple “Minimal changes” retune left a number of channels with broken duplicates and several more in a state that seemed to be able to crash the front-end. After determining that deleting all channels and starting again was going to a) be easier, and b) not trash all the recording schedules, I decided to go down that route. This was more promising, but many of the channels now had junk LCNs (channel number), and the EPG was completely screwed up. It seems that there is cached channel data left in the database which gets in the way when mythtv-setup rebuilds the line-up. The following worked for me (this is on the 0.21 packages in Ubuntu 8.04.3; 0.22 might not be an issue):
- Run mythtv-setup
- Go to the Channel Editor
- Delete all channels (only on DVB-T/Freeview if you use e.g. Freesat as well)
- Quit mythtv-setup, ignoring any warnings about cards starting on non-existent channels
- Run mythfilldatabase
- Run mythtv-setup again
- Go to Channel Editor
- Do a full rescan using your preferred method (I imported channels.conf from an earlier run of scan)
- Quit mythtv-setup
- Run mythfilldatabase once more
Now the channel line-up was back to normal and the EPG filled in correctly, but there were a couple of recording schedules on E4 that had jumped to E4+1. This was easily fixed with a SQL one-liner (back up the database first!):
UPDATE record SET chanid=”2028″ WHERE chanid=”2029″;
Mono STN display on an AVR32 AP7000
by Mike on Feb.06, 2009, under AVR32, Embedded, Home Stuff

AVR32 NGW100 Driving an STN LCD Module
I’ve had a few controllerless QVGA (320×240) mono LCD modules lying around for a while looking for some use. These are fairly easy to get going with a low-end microcontroller using an external controller IC like the SED1335, but that’s another story. I’d been thinking about doing some sort of integrated home automation project, and since this would need a user interface and I happened to have an NGW100 going spare, getting one of these displays to run on the AP7000’s integrated LCD controller seemed like a nice idea.
The NGW100 only has a 16-bit interface to its already relatively slow DRAM, so driving a high-res colour LCD from it leads to a fairly obvious slowdown. For this application a mono display would be adequate, and easier to drive, requiring only a 4-bit data bus, the 3 clocks and a GPIO to power up the drivers. The LCDC has no problem driving an STN panel, although I had to deviate from the datasheet in one area to get it to work – more on that later.
Hello world!
by Mike on Feb.03, 2009, under Uncategorised
Hi. The plan is to use this blog to capture some of the aspects of things I’ve been working on that I think might be useful to others. The sort of stuff you are likely to find will be in the fields of electronic hardware design and software engineering, so mainly embedded systems, but also a bit of RF and analogue design when the need arises. Embedded Linux on ARM9 and AVR32 platforms is likely to feature in the near future!