Thursday, April 30, 2009

Moving bits ...

Finally I got something working! Not much to brag about, but it is a step further than just making the LED blink! :) So instead of having an LED blinking, I had a typical 7-segment LED display blinking. That is, first I had it blinking, which is important by itself of course, so that I know that everything is hooked up right (which of course it was not in the beginning) and that I can communicate with the 'device' through my PICKIT2 programmer. When all that was in order, it was time to try more complex things, like a 7-segment LED chaser (oh, what fun!), and then the over impressive creation of a 7-segment count down device! Well, okay, it is not very exciting to look at, but it is fun (honestly) to be able to do the programming required in assembly and then put together enough bits and parts on a solderless breadboard also to make it come alive. The solderless part was of course working already after the blinking test was done, so the next challenge was the programming, which really needs some hands on experience to make sense. But when you get the hang of it, it really is kind of fun. Assembly is an extremely low level way of programming, making it very compact and structured. The most difficult thing to overcome with assembly language, in my opinion, is how to handle memory. I believe this is not as big an issue in, say, C or BASIC. Nevertheless, in assembly you have to controll it in a very strict manner. And I do not quite have to hang of that yet, but I am getting there. I am sure it is not all that difficult, the problem lays more in the fact that it seems to be more than one way to do it, thus you get a good mix whenever you try to read different tutorials and books about it. Also, many tutorials tend to skip the issue all together, because it 'confuses the reader' or something like that. Nevertheless they use it in their own code but do not explain it, which only makes it even more confusing and hard to find out by your self. Again, I will strongly suggest using the tutorials from gooligum.com as a beginners guide, not because they are simple and easy to understand, but because they are thorough and very logically structured. They are not easy to understand after just one reading, but by reading them over and over again, their quality show through.

My next goal is either to manage to control a DC-motor through the PIC, or have an LCD-display work. For that, I probably need some more equipment. I ordered some vital things from electrokit.com around mid-January, and it still have not arrived (last day of April). Needless to say I do not recommend that store to anyone.

It feels strange to have read so much, and have produced so little. But I guess that is how it is, especially when one learns something totally new, and also as a self study. Some of the things that has baffled me that took me days (or weeks) to understand, could probably be explained to me in 5 minutes by someone experienced. Or maybe not ... :)



Blink!



Chaser!



Countdown!

No comments:

Post a Comment