Simplifying the CORNELIUS memory map
It's funny how ideas work their way out sometimes. Today I spent an hour or two simplifying the memory map for my operating system and language CORNELIUS. I had thought that the way I had laid out the memory was pretty much as simple as it could be for this application, but just yesterday it occurred to me that there could be a better way.
The prompt for the idea came initially from my discovery of Duncan Jauncey's Alternate Universe MUD. I have been enjoying poking about in it and spotting the references to old sci-fi material such as The Hitch-Hikers Guide to the Galaxy, and the Traveller game. I'll write more about this another time.
A few new goodies
It seems like ages ago that I was complaining about not being able to access the UART pins when an add on board is attached to the GPIO header of my Raspberry Pi. I even drew a picture of what I was looking for. I still haven't found anything exactly like that, but I have found something a bit clumsier, but which might work at a pinch.
Apparently they are known as IC Test Hooks. I bought a set of five in different colours from HobbyTronics. It's hard to see in the picture, but they each have two tiny wire hooks which pop out of the end when you squeeze the handle, then spring back in again to grip the pin.
Another presentation to IPRUG
My presentation to IPRUG about the Raspberry Pi a few weeks ago went down well, so when Kerry, the leader of the group, asked if anyone was willing to join in for an evening of five-minute "lightning" talks I thought I'd have another go.
This time I put together a slide deck and some chat about some of the cool 1960s* software and ideas I have been reading about. In many ways the presentation was similar to my blog post from 17 January, but with a slightly different emphasis.
Another big step for ELIUS
One of the odd things about working with bare-metal and operating system level software is how tiny things can seem like huge steps when you know what is going on behind the scenes. In this case the "one small step" is the traditional "hello world", something that ELIUS has not really been able to up to now.
To get to this point required several key improvements.
The first bit was to add the beginnings of hardware emulation to my test system. As you may recall if you have been following along, I am building this code on a more traditional desktop computer so that I can test that it works without having to guess what is going on inside the "black box" of a Raspberry Pi with no other operating system. At some point in the future I hope that the CORNELIUS platform will be solid enough to use for further development, but that seems a long way away at the moment.
Analogue input
Unlike many embedded controller boards, the Raspberry Pi does not have any analogue input. For a lot of uses this is not an issue, but as I progress with my plans to build an ultrasonic recording and processing system (a.k.a "bat detector") I'm beginning to think that I need to add some analogue input to catch the high-frequency audio signals from the microphone.
Initially I thought that this would be relatively easy. There are several analogue input boards available for the Raspberry Pi (here, here, and here, for example) and I know that there are analogue inputs on my Gertboard, and also on the little Arduino I have somewhere.
I feel like I'm becoming a giant!
As I mentioned a few days ago, I am trying to build an ultrasonic "bat detector", with the aim of using a Raspberry Pi to record and transpose the inaudible noises given off by bats as they fly around the night sky. I researched the different types of microphones and eventually ordered a pair of Panasonic WM62A electrets.
They arrived yesterday, and caused me some confusion. I picked up a padded bag and saw who it was from, so I excitedly opened it. I yanked out the folded paper invoice and reached into the bag, to find ... nothing. I even looked inside just to make sure. There were no microphones there. Surely the supplier would not send just the invoice in a padded bag? When I unfolded the invoice, there, nestled in the creases was a small silvery plastic pack, about the size of those silica gel packs you often find, or perhaps the size of the little packs of screws you get with a new hard drive. Inside it were the two tiniest microphones I have ever seen. Just 6mm in diameter. Some microphones really are "micro"!
Rediscovering the delights of C
The last few months have been an interesting journey for me. Not only have I been having loads of fun (and quite a few late nights) with my Raspberry Pi experimentations, but I have also been spending my working days programming in C. It came as a bit of a surprise when I was first approached to do this work, as I my career had taken me out of C into C++ for several years, Java for over a decade, then a bit of Ruby for a while.
Just enough language to define new words
This is a bit of a milestone for me. I have got to the point where I now have enough of the ELIUS language to enable it to begin to define itself. This may seem an odd thing to want to do, so I’ll try and explain in a bit more detail what I am aiming for, why I took made some of the choices I did, and how it currently works.
Programming while tired
I guess it happens to all of us. In theory, I make use of as many techniques as I can to mitigate against suffering from mistakes while I'm programming. I use Test-Driven Development, I make small changes and use frequent check-ins to my source code repository. Every now and then though, I lose the plot and this is what happened this evening. I had been out for the early part of the evening, so it was past 10pm when I sat down to work on the code. I was so keen on getting to the point where I could use ELIUS to define new words in ELIUS that I just hacked away.