Year 2000 and micro controllers

As the new year of 2000 arrived, appearingly eventless save for mass celebration, many individuals felt that the Y2K problem had been grossly overblown. Some feel that the Y2K problem was nothing but a scam, extracting large sums of money for nothing. Was there really a Y2k bug, and if so, then what happened? Why didn't airplanes fall from the sky, banks and financial institutions collapse, and the world fall into darkness as predicted?

The Y2k bug was present and widespread throughout computers around the world. The very reason that it was not immediately apparant in January of 2000, is due to the extensive efforts of hundreds of thousands of programmers working night and day to resolve the problems. The new years eve celebrations around the world could well have been dedicated to these individuals ( many of whom were at their desks as the world celebrated ). Evidence still exist for the bug though, rearing its head in programs that were not corrected for one reason or another. Often, older programs could not be fixed due to lost code or failed companies. In other cases, companies just decided not to have the problems fixed. Fortunately, as described below, the problem was related mostly to mainframe computers, desktops, and PCs.

The following was first posted in September of 1999, in the heat of preparations for the looming Y2K dilema.

With the upcoming rollover to the 3rd millineum, there has been a lot of hooplah regarding the millineum-rollover problem or Y2K. A lot of mis-information about this problem has cause people to place concern where it is not needed.

There have been numerous individuals who have published 'solutions to the problem', either out of pure desire to help or from the desire to get rich from the royalties. These solutions varied from good to rediculous. They were not needed however, as the correct solutions have existed since programmers first started coding. They were not used simply to save money. The problem in the early days of computers was that memory and storage was too expensive, so a 2 byte date was used instead of a 4 byte date. Note: Apple Computer's Macintosh started out using the 4 byte date code

So there is a problem, but in defference to many would be doomsayers, it will rarely affect micro-controllers. Why would I say this?

I have been writing code and developing hardware since the mid 1970's, mostly for microcontrollers and related applications. In the process of my development, I have researched the code of many others and find that MOST microcontrollers DO NOT CARE what the DATE is! Look at your microwave. Is there a place to set the date? Time, yes, date, no. It does not care or know the date. If it does lock up on new years day of 2000, it will be because of something else. More examples will follow.

Now, I hear the doom sayers screaming. All microprocessors have a clock in them. Yes, but, this clock is only for synchronizing. It is not a calendar clock.

So, is there not a year 2000 problem???

Yes, there is. It will show up in many older programs that were written for business that bill based on date. A good example of this is an insurance companies billing program. Each month, you are billed for that months insurance. Once the bills are printed and mailed, the billing system sets the date for the next billing. in the case of billing on Dec, 01, 1999. the next billing date would be Jan. 01, 2000. if the date is represented as a 2 byte date, then the dates would be 12-01-99 and 01-01-00. Since 99 + 1 = 100, the program would want to write 100 into the 2 byte field. Writing this will corrupt the data next this, so most programs are written to correct down to 2 digits by truncating. So, this may be truncated by the program to 00. The bills would print immediately because the current date of 12-01-99 is larger than 01-01-00. The companies entire accounting system would be messed up.

This is only one of many ways that the Y2K bug will affect us. Other Programs that are likely to be affected are:

Check distribution such as Social Security. ( Fixed and certified 12/28/1998 )
Pension checks and any other monthly disbursement.
Banking statements (You can bet a lot of money that they will have theirs fixed.)
Insurance (Most insurance have already fixed theirs.)
Utilities, electric, water, gas billing (They are working hard at it.)
Distribution centers, warehouses (Most are working on it.)

While this list is by no means complete, if the programs fail, they can go back to the old tried and true methods. Do it manually.

For those who claim that there will be massive food shortages because the trucks can not be dispatched, consider this:

Imagine that you are the dispatcher for a produce trucking company. If the computer stops dead and never works again, are you going to stop working. NO! You are going to do your job and get it done right. Your own personal pride would not let you do otherwise.

The doom-sayers seem to think that it is the computers that control us. The reverse is the truth. If you have any doubt, press the power button on the PC that you are using. We humans are in control, the computer is nothing more than a tool.

So, now what about the micro-controller? Will some of them lock up, crash, disrupt the power grid, shut off our water, or create some other form of catastrophy?

For most applications, there is almost no reason whatsoever for a microcontroller to need to know what the date is! One rare usage is for logging or recording data and events that occur. There are a few systems where scheduling is required. These may have problems. Otherwise, with only a few exceptions, most microcontrollers operate based on demand. That is that they will issue a control on or off in response to a level. They will print a piece of paper when a button is pushed. They will turn on a fan when a switch is flipped on. The microwave will start cooking when start is pressed and count down until the alloted time is done and then it will stop. The VCR will start at a specified time and stop at a specified time. Most of them do not even know that years exist.

While the world will not fall apart on NewYearsDay of 2000, we do need to be ready and have the bugs fixed. If you are not involved, be assured that the world is abuzz resolving this problem for you. Do not be herded into buying large stockpiles of food, supplies, and materials. It is a good idea always though to do the following:

Keep a 2-4 week emergency supply of food, water, and health care supplies for each and every member of your family. This is valid for any emergency or catastrophy.

Keep a couple weeks of emergency funds in travelers checks, silver, and gold coin.

Have a designated place of refuge for your family incase of catastrophy.

Always keep a warm place in you heart for those who are less fortunate. i.e. keep some extra on hand to share.

I have received numerous responses to this page and to letters that I have written to magazines. Almost all agree with the statements made above. There have been 3 sad exceptions,however. One was from a company that makes watering and irrigation controllers that are based on date an time as they run on schedules. Another was from a manufacturer of lighting control systems (also schedule based). The last involved satellites, possibly tracking software.

If you are a knowlegable programmer on the subject of micro-controllers and have different information,
Please send your Comments:

Mail to: David Etheredge
Updated 11/24/2001