Fixing Wifi on the Eee PC 900: Part 2

December 11, 2009

My Eee PC has been humming along nicely for the past couple of months.  Things were going so smoothly that I didn’t have anything to write about.  That is, until now.  I just returned from a trip to San Jose, California.  I was preparing to catch up on my email while I watched the evening news and then it happened.  My Eee PC would no longer connect to my home network.

This problem was a quite different from the WiFi problem I wrote about previously.  In this case, my working configuration suddenly broke.  This is not susposed to happen.  There must be a good explanation but, I must find it first.

The first thing I noticed was that my Eee PC was not showing my Wireless access point on the wireless networks list.  Instead, the only network I could see was an unsecure network called Linksys.  Now it is not unusual for me to be able to see a neighbor’s access point but what was strange was I could not see mine.
I then decided to re-check the configuration file changes I made earlier to make the Eee PC connect in the first place.  The /etc/wpa_supplicant.conf_MINE file I generated appeared to be generic so I couldn’t imagine it was causing the problem.  The other file I made changes to was the /etc/network/interfaces file.  Below the portion of this file that deals with the connection to my wireless network.

iface lan2 inet manual
    down dhclient3 -r -pf /var/run/dhclient.$ -lf /var/run/dhclient.$IFACE.leases $IFACE
    down ifconfig $IFACE down
    up cp /etc/wpa_supplicant.conf_MINE /etc/wpa_supplicant.conf.ath0
    up wpa_cli -p /var/tmp/wpa_supplicant reconfigure
    up ifconfig $IFACE up
    up dhclient3 -cf /etc/dhcp3/dhclient.$LOGICAL.conf -pf /var/run/dhclient.$ -lf /var/run/dhclient.$IFACE.leases $IFACE
    wireless-channel 6
    wireless-essid Denkigai
    wireless-key bd8a577135194ff49b51b0602355b252ffd89827c07f477a659c498d0c1c93eb
    wireless-keymode open
    wireless-mode auto
    wireless-rate auto
    xncs-wireless-encryption wpa

Looking at the wireless configuration, my thought process went something like this:

  • I know the SSID of my wireless router did not change (it is still Denkigai)
  • I know the encryption type didn’t change (is is still WPA2-PSK)
  • I know the wireless key didn’t change (it is too long to type here again)
  • What else could have changed?  Doh, the wireless channel

 I brought up the diagnostic page from my wireless router and sure enough, it was now broadcasting on channel 1.  Light bulb moment!  I then realized that we had a power outage a couple of nights ago.  The router probably picked a new, presumably clear channel when it came up again.  I knew there was a good explanation.  I went ahead and edited the interfaces file and changed the wireless-channel to 1 and sure enough, the Eee PC connected.  I then wondered to myself why I specified the wireless channel at all.  I had no problem connecting to public hot-spots without specifying the channel.  So I did one final experiment and removed the wireless-channel line all together.  I restarted the PC and once again, it connected automatically.  Problem solved!

Moral of the story:  When setting up a wireless internet connection, do not specify a wireless channel unless you have a specific reason to do so.

Could a hard coded wireless channel explain the WiFi Problems on the Road incident?  Perhaps.

The Denki-Guy


GMC-4 now available from The Maker Shed

December 3, 2009

Good news!  There is another source for the Otona no Kagaku kits in the US.  It seems that The Maker Shed, the online store for Make Magazine is the exclusive US distributer of Gakken products which includes Otona no Kagaku.  It appears that The Maker Shed is not picking up all the issues of Otona no Kagaku but they are offering issue 24 which features the 4-bit Microcomputer.  The 4-bit microcomputer kit is being offered for $39.95 which is quite reasonable in my mind considering the current exchange rate.

There is a note in the 4-bit Microcomputer product description that warns that there is no English translation available at this time.  Does this mean a translation is in the works?  Until this translation is available, I am willing to help other GMC-4 owners over the language hurdle.  Just send me a message via a blog comment.

The Denki-Guy

Eee PC: WiFi Problems on the Road

October 16, 2009

I took my Eee PC on its first road trip last weekend.  Things didn’t go exactly as expected; Eee PC wise that is.  For those of you who are not regular readers of my blog, I would like to point out that this discussion pertains to the Linux version of the Eee PC.

Like most NetBook owners, one of the things that attracted me to the Eee PC was the portability.  I was looking forward to traveling with a computer that was no heavier or larger than a hardback novel.  I already knew that my hotel, favorite coffee shop and favorite book store at my destination had free WiFi.  It was time to say goodbye to that back ache I always developed when I traveled with my older laptop computer.

The first hint of trouble came even before I started my trip.  While I was waiting around at the Seattle airport, I decided to check my emails.  Strangely enough, the Eee PC could not see any wireless access points.  I didn’t give it much thought at the time as it was time to pack up and board the plane.  A few hours later I had arrived at my destination and checked into my hotel.  I was eager to get on line and check my email as I was off line for nearly eight hours.

I imagine that some of you are thinking, if the Denki-Guy wants to stay connected, why doesn’t he use a smart phone for email?  That is a good question and the answer is simple.  The Denki-Guy is cheap.  Back when I used my phone more, monthly bills in excess of $200 were not unusual.  This seemed excessive to me, especially when free WiFi is available at more and more places.  I have seen free WiFi advertised at coffee shops, book stores, car dealers, medical offices, beauty salons and more.  I generally have no problem checking my emails every couple hours or so.

Now back to my story.  Soon after I dropped my bags in my room, I pulled out my Eee PC and booted.  It typically takes about a minute before I see that little balloon that says, “Wireless Networks Detected.”  I waited patiently for two and then three minutes.  Nothing.  I tried to create a new network connection from scratch but when it came time to select a wireless network from the list, no networks could be found.  Expletive deleted!

That evening I tried a number of things to get my wireless connection to work.  I tried rebooting.  I tried cleaning out old connections.  I tried going to other locations within the hotel.  I tried going to a book store with free wireless.  Nothing worked.  Finally, the hotel lent me a gaming adapter that converted WiFi to a wired network connection.  I was finally on line.

My tale of woe is still not over.  The next morning, I awoke my Eee Pc from sleep mode and it seems that the wired connection had failed also.  The log told me that the network stack never received an IP address from DHCP.  More expletives deleted.  I didn’t have time to dwell on the topic though, I had meetings to attend.

Now here comes the strange part.  I arrived back at my hotel some 12 hours later and I was determined to get to the bottom of this problem.  I booted up the Eee PC and I was shocked when I saw the Wireless Networks Detected balloon appear.  I chose a network that had 100% signal strength and within seconds I had a wireless connection.  What is going on?

During the rest of my trip, the WiFi connection on the Eee PC worked fine.  I added connections for the book store, coffee shop and airport access points.  Once and a while, I would get a message that the Eee Pc could not connect to a certain access point but after chosing re-connect in the Networks control, I would get a connection.

I wish I could tell you what is going on but I don’t know for sure.  In theory, this is a computer and it should work the same way every time.  In reality, most modern computer systems act like organic systems; they are so complex that it is extremely difficult to figure out what exactly is going on.  In this case, I suspect a startup race condition (read timing problem).  For some reason, a certain process does not start up which causes problems with all the components with dependencies.

What to do if you no wireless networks are found (but you know an access point is indeed available)

  1. Restart the computer and try again.
  2. Turn the computer off, wait a minute or so and try again.
  3. Turn the computer off, unplug the AC adapter, remove the battery, let the computer cool down 5 minutes or more, reassemble everything and try again.

The next time this happens, I will take some more time to try to figure out which process is not starting up correctly.  If I can pinpoint the problem, I will post a better solution to this problem.

The Denki-Guy

Translation of GMC-4 Manual Pages

October 15, 2009

Recently, I have noticed a significant up-tick in the number of visitors to my posts on Otona no Kagaku Magazine, volume 24.  I hope that this means that more folks outside of Japan are getting their hands on this magazine and more importantly, the 4-bit Microcomputer.

For the benefit of those who are not fluent in Japanese, I have decided to translate the GMC-4 Manual pages contained within the magazine.  I have just finished the first section and published it as a separate page.  You will also find a link to this page to your right under Pages.

I decided to publish the original Japanese and my English translation side by side for the benefit for those studying Japanese.  My teenage daughter tells me that a lot of kids in high school take Japanese so they can read manga in the original Japanese.  I would love to hear about teenagers taking up Japanese to learn about Japanese technology and other cool stuff from companies like Gakken, the publisher of Otona no Kagaku.  I can’t be the only one.

The Denki-Guy

(Okay, I didn’t exactly take up Japanese in high school.  I started studying Japanese at age 23.)

Changing the Computer Name of your Eee PC

October 3, 2009

The Denki-Guy has been using his new Eee PC 900, Linux model for a couple months now.  After a number of configuration changes documented in these pages, I have my little NetBook working nicely.  Yet … there is one thing that was still bugging me.  Using my Windows system, when go to View workgroup computers (from My Network Places), my NetBook is advertised as follows:  “asus-505051062 server (Asus Eee PC) (asus-505051062)”.  I’m not kidding.  Now you know why it has been bugging me.

This long name comes from two places: the Computer Name and the Samba server string.

Computer Name is a generic term for the name used to identify you computer on the network.  In Unix/Linux, host name is used instead of computer name.  The host name of my computer, before I made the change, was “asus-505051062”.  I imagine that  Asus generates the number portion of the name at their factory to give each Eee PC a unique name.  Thank you for the good work Asus but it is now time to select a new host name.  A host name consists of 1 to 15 alphanumeric (A-Z, a-z, 0-9) characters with no spaces or special characters other than hyphen (-).  There is a good article from Microsoft on naming conventions.  It would be good idea to read the “Best practices” section before choosing a name.

The Samba server string is the “asus-505051062 server (Asus Eee PC)” portion of the NetBook advertisement.  You have probably noticed that the host name appears in the server string.  This was done intentionally.  I know this by looking at these lines in the Samba configuration file, smb.conf.

# server string is the equivalent of the NT Description field
   server string = %h server (Asus Eee PC)

Note the %h in the server string.  The percent sign preceeding a single character represents a Samba server variable.  In this particular case %h represents the DNS hostname.  The Server variables are a way to insert machine specific information into the configuration file.  You do not need to include the host name in the server string but you can is you want.  A list of all the server variables can be found in table 6-2 of this document.  I tried to find some information on maximum string length or disallowed characters for the server string but I could not find anything specific.  That said, I think it is best to keep this string brief.

Now that you have all the background, let’s go to work.

Changing the host name (Computer Name)

  1. Press CTRL + ALT + T on the keyboard to bring up a terminal  screen.
  2. Type sudo xedit /etc/hostname  ENTER in the terminal window.  A xedit window will appear.
  3. Delete the old name and enter the new host name you have chosen.  The new host name I chose was “netbook-101"
  4. Click on the xedit Savebutton twice.  Close xedit.
  5. Type exit ENTER in the terminal screen to close the window.

Changing the Samba server string

  1. Press CTRL + ALT + T on the keyboard to bring up a terminal  screen.
  2. Type sudo xedit /etc/samba/smb.conf  ENTER in the terminal window.  A xedit window will appear.
  3. Look for the line that says server string = %h server (Asus Eee PC)
  4. Change the right side of the server string assignment to reflect the new string you chose.  In my case server string = My White Eee PC 900.
  5. Click on the xedit Save button twice.  Close xedit.
  6. Type exit ENTER in the terminal screen to close the window.
  7. Restart the Eee PC.

After your Eee PC reboots, wait a minute or so and then from your Windows PC go to My Network Places -> View workgroup computers.  You should see both the new server string and the machine name on the page.  My Eee PC is now advertised as “My White Eee PC 900 (Netbook-101)”.  Note how Windows did me a favor and capitalized the first letter in Netbook.  I double checked and indeed, the computer name on the Eee PC side is all lower case.

The Denki-Guy

Folder sharing problems on the Eee PC

September 30, 2009

In my previous blog entry on Sharing Folders with Windows XP Computers, I talk about how easy it is to share files over the network between Windows computers and an Eee PC.  Yet, we all know that few things are as simple as they appear.  Sharing files over the network is no exception.  I would like to share some solutions to problems I have encountered while using the File Manager program on my Eee PC 900 running Xandros Linux.

  • The workgroup name does not appear when I double-click on the Windows Network icon.

Highlight the Windows Networkicon and then refresh the view by clicking the refresh icon, pressing F5 or selecting Refresh from the View menu.

  • When I double-click on the workgroup icon, the only computer I can see on the network is the Eee PC.

Sometimes it will take a couple minutes for all the computers to showup in the workgroup view.  This is not an issue with the Eee PC but simply the way Windows works.  I see the same thing immediately after I reboot one of Windows PCs.

  • I have waited many minutes and one of my Windows PCs still doesn’t show up in the workgroup view.

I found that exiting the File Manager and relaunching generally helps.

  • When I double-click on the icon to one of my Windows computers I get a “No route to host” error.

Most likely, the Windows Firewall is not set to allow file sharing.  Go to the Control Panel and open the Windows Firewall control. Click on the Exceptions tab and check the box for File and Printer Sharing and click OK.

  • When I double-click on the icon to one of my Windows computers, I am asked for a user name and password.

Assuming you have not done anything fancy with shared folder permissions, chances are that you have not enabled folder sharing on the Windows PC.  This is different issue from the one with the Firewall.  Microsoft recommends that file sharing be enabled using the Network Setup Wizard which can be launched from the Control Panel page.

  • When I try to open the Shared Documents folder on my Windows PC from my Eee PC, I am asked for a user name and password.

The Shared Documents folder is intended for sharing documents with other users of the same computer, not other users on the network.  If you want to share a folder that also appears in Shared Documents, go to My Computer and navigate to the folder you want to share.  See these instructions from Microsoft on how to share a folder.

Linux Eee PC: Sharing Folders with Windows XP Computers

September 30, 2009

For those of you that are regular readers of this blog, you will know that the Denki-Guy owns an Eee PC 900 running Linux.  The decision by Asus to ship the Xandros distribution of Linux on the Eee PC, was a good one in my opinion.  The cool thing about Xandros Linux is that it is designed to work well on networks with Windows PCs.  This is good because I have a couple of other computers on my network that are running Windows XP.

When you own multiple computers, one problem you will always have is moving files from one computer to another.  In the computer days of yore, we would talk of sharing files via “sneaker-net” which involved copying the shared files to a floppy disk and walking it over the other computers.  Needless to say, this method of file sharing is still valid, except for the floppy disk part.  A USB drive is now the preferred transport medium.

Most of us, I dare say, would rather share files over the network.  Fortunately, the Xandros Linux on the Eee PC ships with the component called Samba which enables file and printer sharing between Linux and Windows.  In fact, Xandros Linux comes with Samba pre-installed and configured.  My Eee PC appeared on my Windows Network but it showed up in the work group “WORKGROUP” where as another computer appeared in the work group “DENKIGAI”.  I wanted all of my computers to show up in the same work group, so I changed the work group of the Eee PC.  You can read my previous blog entry for the details.

I will assume that you already know how to share folders on your Windows machine.  If you happen to have more that one Windows computer, you might try to get folder sharing working first in a Windows only environment.  Here is an article from Microsoft that explains file sharing on Windows XP.

When sharing files over the network, the first thing you need to do is locate the computer on the network.  Using the Eee PC you would launch the file manager by choosing the Work tab from Home screen and clicking on File Manager.  Once the Files Manager launches, click on My Eee PC and then double-click on the Windows Network icon.  The name of your workgroup will appear and double-clicking one more time on your workgroup  icon will reveal the names of the machines on your network.

To open a shared folder on another machine, simply double on the icon for the machine you want to access.  You should be able to see all of the shared folders in the next view.  From here you simply navigate to file you are after and work with it.  If you want to create a local copy of the file, the easiest way is to use the File Manager to open a second view of the folders on your Eee PC and drag and drop the file.  A local copy of the file will be made without affecting the original.

To share out a folder on your Eee PC, use the File Manager and navigate to folder you want to share.  Right click on the folder, select Sharing -> Windows Sharing and then check the box to Share this item and its contents. It doesn’t get much simpler.

So, sharing files between your Eee PC and other Windows computers on your network is extremely easy, that is in theory.  In reality, I ran into a number of bumps along the way.  In my next blog entry, I will pass along some solutions to help you over the bumps.

The Denki-Guy

Joining the EEE PC to a Windows Workgroup

September 21, 2009

If your Eee PC is already running Windows, joining a workgroup is a trivial task and so there is no point in writing a blog entry dedicated to it.  I am writing to describe the task of joining a workgroup from a Linux based PC like my EEE PC 900.

The distribution of Linux chosen by ASUS for their Eee PC line is Xandros which was developed with Windows interoperability in mind.  In fact, Xandros has entered into a collaboration agreement with Microsoft to enhance Windows interoperability.  If this is the case, it should be a pice of cake to join a Windows workgroup wouldn’t you think?  Well it is only if your workgroup is called “WORKGROUP”.

 I imagine that some of you are asking why you would need to join a workgroup in the first place.  The reason is to share files, folders or printers over your home network .  In my case, I wanted my Eee PC to use a printer connected to another workstation running Windows XP.  To do so, the Eee PC had to be in the same workgroup as the workstation hosting the printer.  Being in the same workgroup as the other computers on your network is also handy when sharing files

It turns out that the Eee PC defaults to the Workgroup named, “WORKGROUP”.  Other versions of Windows also have the default workgroup name of WORKGROUP but no all.  For example, Windows XP has the default workgroup name of “MSHOME”.  In my case, I had already set the workgroup name on my home network to “DENKIGAI”.  I spent a lot of time looking for a GUI that allowed me to change the Workgroup but I struck out.  In this case, it seems the best way to change the default Windows workgroup name is to edit the associated conf file by hand.

Windows Network support under Linux is provided by a module called SAMBA.  Again, I used xedit to edit the configuration file.  In the terminal window type:  sudo xedit /etc/samba/smb.conf   The smb.conf file will open in a xedit window.  Look for the line that says: workgroup = WORKGROUP and change it to reflect your workgroup name.  In my case I changed this line to workgroup = DENKIGAI.  Click the save button twice to save the changes, exit and reboot.

When your computer comes up the next time, it will appear in the new workgroup.  To explore your Windows network, select the Work tab on the home page (start page if you prefer) and then click on the File Manager icon.  Expand the Windows Networksection and your workgroup name should appear.  Click on your workgroup name to view the computers on your network.  At this point, your network view is equivalent to that of Network Neighborhood in Windows.

All this is pretty cool don’t you think; Sharing printers and files with other Linux and Windows PCs?  The only problem I have noticed is that my Eee PC cannot always find all the workgroup computers.  I haven’t been able to explore the reasons why.  Could it have something to do with packet loss over my wireless network.  I will run some experiments when I have more time. 

The Denki-Guy

“hello world” from the GMC-4

August 25, 2009

The GMC-4 is the Cracker Jack Prize that comes bundled with Otona no Kagaku Magazine, Volume 24.  I assume that GMC stands for Gakken Micro-Computer and the 4 indicates four bits.  In earlier blog entries I talked about Otona no Kagaku magazine in general and about the contents of Volume 24.  In this entry, we will check out the Gakken 4-bit microcomputer itself.

The GMC-4 like other Otono no Kagaku furoku (prizes) is a kit.  Veteran electronic kit builders will be a bit dissapointed in that there is very little to assemble.  All one needs to do is attach the speaker and circuit board to the base and apply the press-on template for the keypad.  The circuit board comes pre-assembled on a 2.5″ x 4.75″ single sided circuit board.  I imagine that the GMC-4 could have been designed like the long gone Heath Kits where the builder actually soldered components to the circuit board but, the editors at Otona no Kagaku wisely decided to pre-assembled the board.  By choosing the a pre-assembled board approach, the board could be designed using less expensive surface mount technology.  More importantly, the boards can be tested before shipping.  The Denki-Guy’s GMC-4 worked the first time. 

After the kit is assembled, all you need to do is insert fresh alkaline batteries and slide the power switch to on.  It is recommended that you do not use rechargeable batteries as the output voltage it too low.  If the 7-segment LED shows “F” when power is first turned on, the GMC-4 is probably working.  The easiest eay to test is to run one of the build-in sample programs.  Sample program 1, the Electronic Organ needs little explanation.  To start the program, punch in “RESET”-“9”-“RUN”.  To play the organ, simply press a key (1 thru E) on the keypad and a note will be played.

I think I will skip a detailed explanation of the sample programs.  Even if you don’t read Japanese, the operation of most of these programs can be figured out by looking at the illustrations and playing with the program.  If you need any help figuring something out, feel free to leave me a comment asking your question.  The Denki-guy is happy to help.

After playing with the sample programs a bit, many of us are inspired to learn how to write our own programs.  Writing programs for the GMC-4 is both easy and hard at the same time.  It is easy in that there are only 30 machine instructions to learn.  Poking around the web, I discovered that a fellow blogger, Curtis Hoffmann,  has already published English (programming) instructions the GMC-4.  Since the GMC-4 processor is relatively simple, even a beginner should be able to understanding what exactly each instruction does.  The hard part is learning how to string these simple instructions together to perform a useful task.  I will try to help with this part.  As is the tradition, I will write a “hello world” program first.

I will need to take some liberty with the traditional “hello world” program to make it work on the GMC-4 .  The problem is the limited output capabilities.  The only output we have to work with is one 7-segment LED, 7 individual (binary) LEDs and a speaker.  Now, since the GMC-4 has special instruction to produce tones on the speaker, I decided my program should beep out “HELLO WORLD” in international Morse code.

I must admit, I got the idea to send HELLO WORLD in Morse code while reading the programming manual for the FX-MyComR-165, the predecessor to the GMC-4.  The R-165 programming manualis available on the Otona no Kagaku website but only in Japanese.  The programming manual reveals some useful nuggets of information when explaining the computer instructions.  For example, the programming manual indicates the Call Short Sound (CAL SHTS) and Call Long Sound (CAL LONS) instructions are specifically designed for generating Morse code.  Here are the explanations from the manual:

About the CAL SHTS instruction
The execution of this instruction generates a short sound that is passed on port bit R3.  This so called short sound along with other features described below is used when writing a program to generate Morse Code Sounds.  The short Morse sound is made up from a short sound and a short rest.

About the CAL LONS instruction
An instruction to make the long Morse sound.  Use when generating Morse code sounds by arranging sequences with the previously explained CAL SHTS (instruction)

There is another nuget in the R-165 programming manual and that is a listing for a Morse code program (experiment No. 69).  This is a great starting point for the hello world program.   A secondary goal of a “hello world” program is to become familiar with development tools.  In the spirit of this goal, let’s use an assembler to help us generate the machine language code.  I was quite surprised to learn that fans in Japan have made a number of GMC-4 assemblers available.  For our “hello world” program I choose to use a very simple assembler that can be found here. I would like to give credit to the author but, I cannot find an information page.  All I know is the page is hosted on

The simplified "hello world" entered into the assembler

The simplified "hello world" entered into the assembler

One final goal of my “hello world” program will be to keep it simple.  For this reason, I will shorten the morse code message to “h w”.  In (international) Morse Code, “h w” is coded “· · · ·    · — — “.  The dots represent a short Morse sound and the dashes represent the long Morse sound.  If you look at the program listing in the assembler input window (above), you can see the correct sequence of short sounds (CAL SHTS) and long sounds (CAL LONS).  Between the two letters is an instruction of CAL TIMR.  The “Call Timer” instruction is used to create a space between the letters and at the end of the sequence.  Let’s see what the programming manual has to say about the “Call Timer” instruction.

About the CAL TIMR instruction
When this instruction is executed a wait for a fixed time period is generated.  The wait time is decided by the A register and can be calculated:  Wait time = (A register value + 1) x 0.1 seconds.  In (experiment) 26 the A register is set to 5 so (5 + 1) x 0.1 sec = a delay of 0.6 seconds.

 As you can see, the Call Timer instruction is used twice.  The first time it is used is between the Morse Code for H and W.  We now know that Call Timer inserts a delay whose length depends on the value of the A register.  In this program, the TIA instruction is used to place a delay value in A.  At the top of the program you can see A set to 1 and towards the bottom, A is set to 5.  This is used to set the intercharacter and interword spacing respectively.  The final JUMP instruction tells the program to continue from the top.

Okay, now we know how it works, the next step is to teach the program to the microcomputer.  The GMC-4 does not understand the words we wrote; it only understands machine language.  Fortunately, the assembler knows how to translate.  Simply press the ASSEMBLE「アセンブル実行」button to get the machine language.  The assembler will output a chart sort of like the one below ( the actual output is a longer list with only three columns ).  The column headers translate as follows:

アドレス =  Address  = ”Slot” number in main memory

命令 = Assembly Instructions  = Human-readable instructions & data

命令コード = Object Code = Machine-readable data

Assembler output of the "hello world" program

Assembler output of the "hello world" program

The next to last step is to enter the program into the GMC-4 .  Remember that the only thing the GMC-4 understands is Object Code so this is the line of data we will enter.  Fortunately, the data entry process is simple though it can become a bit tedious for long programs.  To enter the “hello world” program, slide the power switch to on and press “RESET”.  Press the button for the first Object Code instruction, “8” in this case and then press “INCR”.  What you have just done is place a value of 8 in Address 0.  The microcomputer is now ready to input a value into address 01.  Punch in the next code, “1” and “INCR” again.  Continue to input the Object Code values, in order, pressing “INCR” after each value.   After you have enterered the final instruction and pressed “INCR”, press “RESET” “1” “RUN” to start the program.  You should hear the GMC-4 beep out Didididit Didahdah, Didididit Didahdah, endlessly.  Remember, you can press “RESET” to stop the program and save your sanity.

For those of you who are purist and want the program to spell out HELLO WORLD instead of HW, it is a simple matter to expand the program.  The Morse Code for “hello world” is “· · · ·    ·    · — · ·    · — · ·    — — —        · — —    — — —    · — ·    · — · ·     — · ·“.   I will leave it as an exercise for the reader to write the actual program.  My version of the program barely fit into the memory of the GMC-4 (only one unused address).  In fact the program spilled over into the data memory area (address 50 – 5F) but seems to be alright as long as the memory addresses are not used in the program.

I hope you were able to get “hello world” working on your GMC-4.  For my next blog entry, I plan to write a program to make the binary LEDs scan back and forth like the eye of KITT, the talking car in the Knight Rider TV series.  As always, feel free to ask questions or make comments in the comments section.

The Denki-Guy

Otona no Kagaku vol. 24, The Age of the Microcomputer

August 21, 2009

In my previous post, I introduced Otona no Kagaku magazine.  In this installment, I would like to talk about the latest issue on “The Age of the Microcomputer.”  Did you know that a Japanese Engineer, Masatoshi Shima 「嶋正利」, was the primary designer of the first microprocessor?  This is one of the many things I learned from this issue of Otono no Kagaku.

Otona no Kagaku is an interesting magazine by itself but what sets it apart is the Furoku 「ふろく」.  The Otona no Kagaku furoku is cool little kit that complements the magazine.  If you look it up in a Japanese-English dictionary, furoku is generally translated as “supplement” like the color advertizements stuffed into your Sunday Newspaper.  Strictly speaking, the Otona no Kagaku furoku is a supplement as it is an extra that comes along with the magazine but to most readers, it is the main event.  The furoku is the reason they buy the magazine.

Otona no Kagaku magazine, volume 24 is a special edition entitled 「マイコンの時代」, “The Age of the Microcomputer” .  The interesting thing is that this title appears only in small type on the outer cover.  What appears most prominently on the cover, other than the name of the magazine, is 「ふろく4ビットマイコン」which announces the furoku is a 4-bit Microcomputer.  This is a big score.  It’s kind of like getting the little working compass in your box of Cracker Jack.  Now in the age of 64-bit, Quad-Core microprocessors, a 4-bit Microcomputer sounds down right primitive and that is the point.

The complexity of today’s technology can really boggle the mind.  The way I have always kept from being overwhelmed is by breaking down a complex technology into it’s fundamental building blocks.  This is one of the most fundamental strategies known to man, divide and conquer.  The publisher of Otona no Kagaku, Gakken, clearly subscribes to this strategy also.  A 4-bit microcomputer is (arguably) the simplest practical digital computer.  Fundamentally, this 4-bit microcomputer operates in much the same manner as it’s more complex offspring.  Taking on the study of a 4-bit Microcomputer does not seem that intimidating yet, once you understand a microcomputer in 4-bits, all you need to do is duplicate the data paths to get to 8, 16, 32, or 64 bits.

Cover of Otono no Kagaku #24 with callouts to English translation

Cover of Otono no Kagaku #24 with callouts to English translation

Enough of the introduction.  Let’s take a look at the content of the Otona no Kagaku special on “The Age of the Microcomputer.”  The best place to start is to look at the cover.  I have added call outs to a scan of the outer cover to direct you to my translation from the original Japanese
  1. Originator of the magazine with the furoku   Adult Edition  “Science and Learning”  Science for Grown-ups magazine,Vol. 24
  2. Special Edition, Understanding the fundamentals of computers and programming
  3. The Age of the Microcomputer
    It all started with the TK-80
    Picture gallery of famous computers
    The man who made the first CPU, Masatoshi Shima
    I produced artificial intelligence in 4 bits by Satoshi Endo
    How can computers calculate using only 1’s and 0’s?
  4. Sample games are included so you can play right away!
  5. You can enjoy an automatic concert by punching in a melody!
  6. Furoku:  The 4-bit Microcomputer
  7. The simplest programmable computer


Inner cover describes the 4-bit Microcomputer

Inner cover describes the 4-bit Microcomputer

 The furoku (4-bit microcomputer that comes with the magazine) is a wonderful reproduction of a Microprocessor Trainer style computer that was so popular in the early days of microcomputers.  On the inside front cover is a more detailed description of the 4-bit microcomputer and it’s capabilities.  As before, follow the call outs to the corresponding translation below:

  1. Experience the origins of the computer with a nostalgic MyCom!
    30 years ago computers were called MyCom which embodies both the My from Micro and the My as in personal (Com comes from computer).  Included is a nostalgic one board microcomputer consisting of a single circuit board with all the necessary parts are already mounted.  Although it only has a hexadecimal key pad for entry and 7 segment and binary LEDs for output, various programs like games can be built for enjoyment on the MyCom board.  Wouldn’t you like to experience the enjoyment of programming a simple, yet elegant 4-bit microcomputer?  (The MyCom board is a functional reproduction of the “Denshi Block FX-microcomputer” first released in 1981.)
  2. 7 segment numeric LED
    For confirming data entry and display of program execution results
  3. Binary LEDs
    A binary number display for things like the address, also used for LED games
  4. Speaker
    Confirmation sound for “peep peep” input and melody sound output
  5. Hexadecimal Keypad
    A hexadecimal number keypad that can input 0 thru F
  6. Reset Switch
    For resetting the stored program
  7. CPU (central processing unit)
    For storing a program, executing instructions, etc. The heart of a computer.
  8. Features of the MyCom board
    You can make your own programs by punching in (machine language) command codes using the hexadecimal keypad.
    Because it is simple, even a novice can easily operate the MyCom and grasp computer fundamentals.
    Punch in the data for the notes and you can enjoy a melody.
    Even without punching in a program, you can play with your MyCom right away using the 7 sample programs.

    1.  Electronic Organ
    2. Automatic Music Performance
    3. Wack-a-Mole 
    4. Tennis Game
    5. Musical Note Matching Game
    6. Timer
    7. Automatic Morse Code Transmitter
  9. Program and retrofit examples
    Move the MyCom board while the binary LEDs are shining and a picture emerges!
    Control the movements of the tea carrying doll by extracting the on and off states of the binary LEDs!

I hope you agree with me that the Otono no Kagaku with the 4-bit microcomputer sounds like a winner.  Have you bought one for yourself yet?  In my next post, I will assemble the “The simplest programmable computer” and start running it through its paces.

The Denki-Guy