Category: Work

Learning Mathematics online

Posted by March 16, 2012

If you are looking for a place on the net that will help you refresh your knowledge in mathematics, you should check out KhanAcademy.org.

Simply by accident I found this site that is not only a wonderful resource for learning math (for free) by doing exercises online but also contains loads of video lessons covering physics, history, art and much more. My first contact was a video lesson I found on youtube on properties of frequencies. The videos provided by Khan all follow the same beautiful style. Black screen, color pencils and the voice of Salman Khan, the guy behind Khan Academy. You should give one of his videos a try. I was simply impressed by his clarity.

I have been using the service for more than two months now and I’m still surprised about how well things are explained (especially when it comes to topics like quadratic equations and similar).

PPD file for Lexmark E330


During last week my new (refurbished) Lexmark E330 monochrome laser printer arrived (for 20€!!! – got it from some reseller at amazon). Before I chose the printer I took care of making sure it supports PCL (of which I thought will raise the chances of having proper support for CUPS and hence Linux). After printing a first test page with the “Generic PCL Laser Printer” driver I started looking for a “real” E330 PCL driver (no, CUPS does not come with a PPD for the E330). So I checked the Lexmark page and was surprised they also had other drivers than for Windows. Anyway I downloaded the Windows driver (since I was looking for the PPD which is usually included in some way or another in those setup.exe files those companies usually supply in order to set up their printers under Windows). I think I downloaded like five or more files but they where not very helpful. Day later, almost sure to be stuck with the default PCL driver I had another look at the CUPS page where I downloaded a PPD file for a E323 (which is supported) only to figure out if it might give me some clue for what strings to search for in order to find the correct file. I ended up looking for “PPD File for Lexmark E330” … and found exactly 1 match – this page. Looks just like a PPD file for the E330. Took me a run of “copy&past into new file, add new printer, select PPD file, print test page” to be very happy with my new laser. Now the test page looks just as you would expect it to be.

external memory board


Just before writing my last post, I started building another board in order to supply my ATmega128 with 64Kbytes of external memory (in fact the so called “XMEM” feature was one of the reasons I bought that chip).

The board is designed for a 28 pin S-RAM IC (Hitachi HM6264) that can be connected to a micro controller supporting external memory (like the ATmega128 or ATmega162) using three 10 pin headers. The first header is used for the multiplexed lower address/IO bits (port A on micro controller), the second for dedicated upper address bits (port C) and the last for read/write strobe and address latch enable (port G). All headers share two common last pins: GND (9) and VCC (10). The only thing required except for the S-RAM itself, some pin headers and a 100uF ceramic capacitor is a octal latch IC (74AHC573) that will allow for multiplexing the shared lower address/IO lines.

NOTE

After looking up the “Address Latch Requirements” section in the ATmega128 datasheet turns out that when the micro controller is operated above 8MHz (mine has a 16MHz crystal) the 74HC573 (the IC I have) does not meet requirements but a 74AHC573 would do. I guess I will put in a 8MHz crystal until I can get hold of a 74AHC573.

 

 

 

 

Download

base board for Olimex ATmega128 header board


A couple of months ago I ordered a ATmega128 header board (AVR-H128) from Olimex. In order to make use of such a header board you need to mount it somewhere. For this purpose I created a sort of header board for the header board. It is very minimal, consisting of mechanical components only except for a LED and a resistor. The reason for that is that the header board on which the ATmega128 itself is placed already contains a +5V voltage regulator (LM78L05) and reset circuit (ZM33064). Using my board its very convenient connecting things to the pins of the micro controller. All ports (A, B, C, D, E, F and G) have a separate 10 (2×5) pin header where the last two pins of each header is connected to GND (9) and VCC (10).

The layout of the board was created with the intention in mind to be able to assemble it in a through-hole fashion. Needless to say that the layout can also be used to etch or mill the board.

There are still things that can be enhanced like adding a connector for the reference voltage of the ADC (AREF).

Download

Schematics and layout have been created using Eagle 5.11 with a non-commercial license. The outline of the board is 100x160mm, so for you folks that use the Eagle freeware you will not be able to modify the boards layout (since Eagle as freeware only allows for boards with a outline of 100x80mm).

Reading “Test-Driven Development for Embedded C”

Posted by May 8, 2011

jgadeThursday this week I received my copy of “Test-Driven Development for Embedded C” by James W. Grenning. This was just the book I have been looking for months. I had the problem of developing a micro controller firmware in C but without tests. The reasons I had not started the project in a “test first” fashion were too many. Questions like “how do I test code that needs the hardware to run” as well as the limitations of only using free and open source software were and still are barriers I hope this book will help me overcome.