Posts

Showing posts from July, 2012

Building a serial add-on board (part 2)

Image
In Part 1 we discussed why we need a serial add-on board and designed one. Now it's time to actually build one. Of course we will require some tools, materials, and chemicals, I'll describe them along the way. First and foremost, we need a material for PCB. I'll use 1-sided FR-4 epoxy laminate. I've been lucky to acquire an enormous piece (1/2 sqm. or so) in a garage sale. But it should be available at most DIY electronics stores. As I mentioned earlier, we will require a piece with size 40 x 45 mm. Draw the borders and cut it off with a hacksaw. Do not worry, if you can not quite follow the line and your cuts are not very straight. You will be able to trim it to right dimensions using a file. Smooth any sharp edges as well, while you're at it. Note, that dust from sawing and filing FR-4 might be hazardous, so I'm doing this outside. Now it's time to clean it. I'll use a kitchen sponge with a bit of laundry detergent on it. Rub i

Building a serial add-on board (part 1)

Image
Writing code is not everything. No program is good until it can display it's results in some way. With regular programs it is easy - you just print something and it magically appears on screen or somewhere. Bare-metal programming is different. There is no underlying operating system to handle that "magic" and we have to make it happen on our own. And it better be simple, remember, we are practically blind-folded at this point. Trying to send something over network or display on the screen is too complicated, it would never work, since there are too many things to go wrong. There's another simple interface - we could try to blink a LED on RasPi. And then send out our messages using say, Morse code. But that doesn't look too appealing either. Fortunately, RasPi have another simple interface, called UART. Using that we can send anything we want to computer's serial port (or emulated serial port, if computer has no physical ones). But there's a catch. We

Acquired a Raspberry Pi. Now what?

I will not go into lengths to explain what a Raspberry Pi is. If you are reading this, most likely you already know. When it finally arrived, I prepared a SD card with OS image, connected the wires and booted it up. Cool, it works! But now what? Here I probably should explain my background a little. I've been everyday Linux user for years. Incidentally I also run Debian on my desktop, so Raspberry Pi running the same OS, albeit on different architecture does not offer too much to explore. Of course, I could choose a different Linux distro for RasPi, but there are only minor differences between them. Also I pretty much know, how to write code. Programming has been my hobby and day-job for even longer. Obviously I need not to learn how to program. But I'm also interested in custom OS development and microcontroller-based DIY electronics. And Raspberry Pi offers a pretty broad field to explore at this level. Yes, that was the reason I ordered one in the first place.