Comic

July 20, 2009 · Posted in Random Things · Comment 

Occassionally, there is a comic that just stands out above the rest of the comics I read every week. Occassionally, they are just extreme awesomeness. Todays xkcd comic is stunningly simple, yet true, and awesome. It’s been open in my browser all day (and that is something a comic can be proud of here).

They could say the connection is probably lost, but its more fun to do naive time-averaging to give you hope that if you wait around for 1,163 hours, it will finally finish.

Loud

May 31, 2009 · Posted in Blog · Comment 

Yesterday was the second day of Neurotic Deathfest, a 2-day death metal festival in 013 here in Tilburg. I visited yesterday (didn’t go the first day though).

The tickets were not that cheap (~ 35 euros, not counting food and drinks), but considering the number of bands (16) and the duration of the whole thing (I was at 013 for about 8 hours, probably more) it’s good value for money. Even the merchanise - there was lots of that being sold - and the food were reasonably priced.

I mostly stayed near the main stage most of the time, where 6 bands played: Severe Torture, Aborted, Illdisposed, Brutal Truth, Entombed, and finally: Behemoth!

Except for Behemoth, I barely knew any of the bands that played so it was kind of a gamble for me there - but it turned out really well. I didn’t find Brutal Truth that great (their drummer was funny though, he sat there in his underwear and made really weird faces), other than that the stuff I didn’t know was at the very least enjoyable :)

But then came Behemoth - a band which I’ve been wanting to see live for a long time - and it fucking kicked ass.

The songs they played included Slaves Shall Serve, At the Left Hand ov God, Prometheon, Demigod, From the Pagan Vastlands, Chant for E schaton 2000, Christians to the Lions, Antichristian Phenomenon, Decade of Therion, Slaying the Prophets ov Isa, and probably some others I forgot to mention. In other words, it REALLY kicked ass :D

What’s more, in the end I was in reasonably good shape considering the circumstances: I could still hear pretty much normal, my head was still attached to my neck, and my voice was still where it’s supposed to be. Pretty good evening :)

I’ll see if I can get my hands on some pictures, and assuming I do, I’ll post the link here.

Unfortunately it doesn’t look like there’ll be a whole lot of stuff worth going to in 013 for a while… but two things I am considering to go to would be October 27th in Zwolle (Cannibal Corpse, Dying Fetus, Evocation, Obscura) and November 3rd in Enschede (Behemoth, Devildriver, Scar Symmetry, Arsis). But we shall see :)

Danger

May 15, 2009 · Posted in Uncategorized · Comment 

I’m playing around with the server configuration right now. If something appears to be broken/slow, don’t panic, it’ll (probably) be fixed soon :)

French

May 12, 2009 · Posted in Blog · Comment 

This tweakers.net article tells about the French government having passed a law allowing them to cut people who download copyrighted content off from the Internet. This just proves again that the French are just plain weird.

Especially the clause stating that even when cut off those people will still have to pay their monthly fees to the internet provider is just ridiculous. As is the idea that the person who pays for the connection is responsible for what is done over it. Very few connections are used by only one person nowadays, and many of them are on insecure wireless networks.

And no, I do not think that not doing anything about the problem can be justified (and neither can the ridiculous salaries some people from music labels (etcetera) receive). People worked hard to create something, they expect to be paid for that, and they should be. But a ridiculous approach like this is not the way to go :(

(For instance, just try making stuff less expensive… I have no objection against buying software and I regularly buy software if I think it is worth buying, but only so long as the price of the software is justified. Cost of development is no excuse, a lower price will lead to more sales and therefore provide at least as much income.)

A democratic government should represent the people. If it does, any decision the government makes can logically never be a controversial one, since the political ideas of the government and the people are the same. But that is clearly not what’s happening here. Apparantly the French government is no longer representing the people, and should step down right away because of that.

A similar issue I read about recently was a proposal to censor child porn websites. While in principle I have nothing against removing child porn from the Internet, it’s the censor - based on a non-disclosed list of blocked websites - that I don’t like. It is merely the first step towards blocking other content as well. The Internet is a free, open source of information and should always remain so :)

(And of course, the Chinese government could learn a lot from that… they say it’s to protect their citizens, but if everything on the internet is so damn bad for the Chinese, why don’t we just cut off all Internet connections with China? Then they no longer have any bad content to worry about, and the rest of the world won’t miss it either as most Chinese domains contain viruses/malware, or are written in a language that nobody outside China understands.)

Playing (part 3)

May 10, 2009 · Posted in Blog, Electronics · Comment 

Wheee! Things are starting to take shape on my little PIC project here :P

The code to control a character LCD is progressing nicely… it can now automatically align text on the screen and stuff like that. It’s also handling custom characters quite well. The nice thing with these screens is that you can display most ASCII characters on them, but also a number of customized characters (which are displayed by using the ASCII values that are normally non-printable characters, eg 0×00, 0×01, 0×02, etcetera).

Obviously, since I’m working in C the 0×00 one can be a bit of a problem at times, because in C it’s also the string termination character (but I can still send a 0×00 manually to the screen… so no big deal).

Also, in addition to powering the LCD, I also have a flashing LED once again! Only this time, it’s flashing at a pretty accurate 1 second interval, and is doing so using timers and interrupts. Once every 50 000 microseconds, an interrupt tells a variable to go up by one; once it reaches 25, we know that a second has passed :)

(If you’re wondering what the hell an interrupt is: when certain events happen, such as a timer reaching its maximum value or the state of a pin changing, that may generate an interrupt, at which point the processor jumps to a certain location in the program to handle it. Basically it’s calling the processor’s attention away from whatever it’s doing to handle something that is urgent and which probably should be handled right now. Afterwards it’ll get back to what it was doing before the interrupt happened. It’s like you’re walking in the grocery store and your phone rings: you stop to pick it up, and when you’re done you continue shopping. It’s the same principle really (you’re the processor, and your phone just generated an interrupt to get your attention to the fact that someone’s calling you). Your PC also does this, but you don’t notice it normally.)

That may seem a bit elaborate, and well, erm, it is elaborate, really. It takes a good amount of code, as well as a bunch of calculations to make sure that the timer runs properly. But I’m learning the PIC to tell what time it is, and I’m just using the flashing LED to make it indicate to me that a second has passed. For some reason that remains unexplained sprintf() doesn’t seem to be working (and it’s a bigass function too… you’ll probably never notice it on a PC, but on a PIC the size of it is significant), so it’s going to be difficult making it actually show the time. But I’ll find a way :)

Playing (part 2)

May 7, 2009 · Posted in Blog, Electronics · Comment 

As I mentioned in my post ‘Playing’, debugging PIC software is quite often not nearly as easy as debugging PC based software. My (current :P) lack of experience with both PICs and C didn’t help a lot either. Though I have managed quite easily to pass the ‘hello world’ equivalent of blinking a LED on and off, the next step - actually displaying ‘Hello World!’ on an LCD - was less easy.

I had the basic code for writing instructions, and the actual instructions, to the LCD correct. It’s a standard 16×2 character LCD with a HD44780-compatible controller (you can control one of those using the parallel port on a PC actually). I have a great little simulation tool which has a module to simulate the display, but of course I couldn’t take the easy path for my actual hardware implementation.

My actual hardware implementation was a bit more tricky, because I wasn’t connecting the LCD directly to the PIC as the simulator assumes. I’m using a shift register for the data lines, which greatly reduces the number of pins needed on the PIC, which is good news because it doesn’t have a whole lot of I/O pins. I had a couple things wrong in sending data out of the shift register. (Basically, a shift register is a simple chip that accepts a serial input (2 lines) and translates that to a parallel output (8 lines).) It may have included sending the bits in the wrong order.

Obviously, because the instructions that did arrive at the LCD arrived in reverse order, they didn’t mean a whole lot and the most interesting thing I was able to do was blink the backlight on and off.

But a bunch of LEDs and some added delays allowed me to see exactly what was going on, and now finally, I have a display that shows ‘Hello World!’ :D

I’ll take a picture later.

(And, further debugging should be relatively easy, because I now have a way to let the PIC tell me what it’s doing :) ).

And another thing… There’s a new menu item on the top, ‘PIC programming’. I’m writing a load of PIC-related stuff which could possibly be interesting to someone. Partially because even at this point, where there isn’t much actual content in it, it’s already gotten me up at least 5 ranks on WhatPulse (I’m 803rd of the world as I type this ^^). For the moment it remains inaccessible to anyone but me, but some day… :)

Fucking terrible

May 3, 2009 · Posted in Blog · Comment 

I am NEVER touching anything from Western Digital again.

Well, except maybe for the purpose of destroying it.

I have two of their wretched pieces of shit that they dare to call a hard drive, both roughly a year old. One has completely failed about a month ago and the other one seems close to doing exactly the same. I managed to rescue nearly all data from the first disk, and I’m evacuating the second one right now (to whatever spare disk space I can find; those two disks made up the bulk of my storage space).

Using these pathetic excuses for a piece of hardware is utterly impossible without getting a very strong urge to throw them out a window from the top floor of the highest building you can find.

Die, WD. Die the most slow and painful death you could possibly imagine. Then come back from the grave and die the same death again. Repeat until the end of time.

Theme

April 26, 2009 · Posted in Blog · 1 Comment 

I’ve been playing around with the theme of the site a bit. I felt that the previous theme, while not looking bad at all, was too difficult to read (and too difficult to make stuff appear how I want it to appear). Also, since it was intended for a much older version of the blogging software, things didn’t really work 100% anymore. I’m almost satisfied with this one now, and will probably stick to it :)

Also, don’t forget the post(s) below this one!

Edit (27-04): I’ve tweaked the template a bit further and upgraded the software as well. I’m going to stick with how it is for now :)

Playing

April 26, 2009 · Posted in Electronics · Comment 

Lately I have, largely out of a lack of better things to spend time on, been playing around with PICs a bit. Since you are probably asking questions such as ‘what the hell is a PIC?’, or ‘why does it sound like a Dutch word for penis?’, here’s a short explanation. A PIC is a small chip that is essentially a tiny computer. It has a CPU, memory to store a program in, RAM, and usually a number of peripherals like an UART (a module to communicate on an RS-232 line), USB, timers, EEPROM memory for more long-term storage of data (such as configuration), and so on. They vary from the extremely small PIC10F200, which has only 4 pins that can be used for I/O (say, blinking a LED) to large 32-bit chips that run at 80 MHz or more and have more than 100 pins. The most popular series however are the PIC16, and more recently, the PIC18 series.

As for why it sounds like a Dutch word for penis, I have no idea. PIC could stand for Programmable Integrated Circuit, Peripheral Interface Controller, or a whole lot of similar acronyms (but according to Microchip, it doesn’t really mean anything).

Developing stuff on a PIC is a whole lot different than normally developing software. For starters, you’re not just developing software, but the hardware as well. This means that at least a basic knowledge of electronics is invaluable, and with that comes things like knowing which parts or ICs may be useful for your project and probably at some point you’ll want to be able of designing your own printed circuit board (and making those/having them made for you). Second, it’s great to have software on your PC, but you’d probably rather have the software on the PIC - so you need a programmer. A programmer is a device that does exactly that - it ‘uploads’ software to the PIC. There are lots of programmers on the market, but what I’ve been using so far is the Wisp648 sold by voti.nl, combined with Bumblebee as PC-side software.

The fun part however is the actual programming for the PIC. Microchip offers some free development tools (MPLAB), but I never liked that, and you’re going to be stuck to using assembly. Writing a program in assembly isn’t as bad as it sounds - especially if you have programming experience and the program remains small - but on a larger chip, say, a PIC18F4550, assembly quickly becomes a huge, unmanagable mess. That is when you will realize that a higher programming language would be great, and for this type of thing, C is probably the best choice. There are a number of C compilers for PICs on the market, but most are staggeringly expensive, and come with a lot of proprietary stuff, so you’ll be stuck with that particular package for the remainder of your natural life. There is, however, a great alternative: SDCC, the Small Device C Compiler. It supports all the most common PIC16/PIC18 devices, but there’s a great lack of documentation and source code, so you’ll have to figure out a lot on your own.

Not that figuring out stuff on your own is uncommon: developing hardware (and software) can be pretty much a trial-and-error process.

Installing SDCC is pretty simple, both for Linux and Windows (yes, it works on more than one platform! hooray!). To work, SDCC will also need the gputils package, which is again pretty straight forward to install. I do strongly suggest that you enable the option to include the binaries in the PATH variable in Windows, it makes life easier. After installation, you’ll probably be thinking ‘okay, what next?’ and that’s were it gets funny.

Since you’re doing stuff for an embedded device, this version of C is not something you can really compare to what you use to write software for your PC. Sure, the syntax is identical, and most of the standard C libraries are implemented (printf, math, stdio, …) but that’s about it. Half of the code you write will be directly accessing registers on the PIC (since they control all functions of the device). Half of the time you’ll be looking up stuff in the datasheet (which is usually over 400 pages) and the other half you’ll be wondering how the heck you are going to debug your code - after all it’s running on a small, isolated chip and getting anything at all on your computer screen isn’t quite as easy as with ‘regular’ software. Then there’s the limitations of the device - you probably have a lot of functionality you’d like to include, and only so much I/O pints to work with, and only a limited amount of code memory and RAM. Especially when using C, it’s easy to run out of any of those. Also, everything you’re doing is quite low-level code - you’re directly telling the chip which pins are doing what, handling interrupts, and so on - no fancy multithreading or whatever.

For debugging/testing purposes, I’ve also been playing with this tool. It simulates a PIC processor on your PC and behaves (almost) identical to it. You can see what each register and memory locations (or ‘general-purpose register’) is doing as your program runs, how much time everything is taking, and so on. Of course you can never rely 100% on a simulation (after all, on the PIC there are loads of variables that the simulation tool does not include) but it is extremely useful. Unfortunately it’s not a free tool, but the basic home-use version is only € 29 and it seems to be the best PIC simulator I’ve seen so far (and also by far the most user-friendly, which is great because I want to be developing the software, not spending 3 weeks learning to use the simulation tool).

Altogether there’s an amazingly steep learning curve, but that only makes the satisfaction all the greater when you’ve got your first ‘blink a LED’ (the PIC equivalent of  ‘hello world’) working. And, of course, there’s a huge number of useful things you can do.

Note: as said before, there is an amazing lack of documentation and source code for this kind of stuff. Also for the electronics part: my father works with electronics, so I had already picked up a thing or two, but if you have zero knowledge on this kind of thing, you’re mostly on your own. Depending on how much time I have and whether I feel like it, I might be writing some tutorials and sample code/libraries for use with SDCC, which will probably show up in the menu bar on the right (but when something goes online, it’ll be posted here too, of course :)).

Towels

April 17, 2009 · Posted in Blog · Comment 

Omg! Two posts in a very short time!

I would just like to make you aware of the fact that, at the time of writing, there are 38 days left until Towel Day (which will be on May 25th). Towel Day is a tribute to, and memorial for, Douglas Adams, the author of (amongst others) the Hitchiker’s Guide to the Galaxy, which, if you handn’t noticed yet, is one of the more brilliant five-part trilogies this world has to offer.

If you hadn’t, I strongly encourage you to read it ;)

(Also, I recently watched the original 1981 TV series, which unfortunately is only 6 episodes. As you can expect from a TV programme from that time, the quality isn’t really what people are used to nowadays, and the books are infinitely much better, but if you liked the books (in particular the first two, because the series more or less covers those) it’s worth checking out.)

« Previous PageNext Page »