Tuesday, December 21, 2010

Who then is God?

My previous discussions regarding my worldview were not exhaustive by any means.  In fact they really only answered one question, that being what is the nature of Man.   But there are just too many questions that are not answered by an understanding of Man for this to be enough.

The atheist is then faced then with a problem.  In a naturalistic worldview, the physical world is all that there is and the scientific method is the sole means of understanding truth.  How then can they answer the questions of origin, meaning, and destiny?  They can’t.  What a pity.

And for this reason, a worldview built around the existence of a deity, has not only always been with us, but will continue to remain the populist belief of nations everywhere.

So who then is God and what can we know about him?  I could try my hand at giving an answer, but it has been done before and with better diction that I could muster.  Here is the answer, as giving by the Westminster Catechism. 

What is God? 

Answer: God is a Spirit, in and of himself infinite in being, glory, blessedness, and perfection; all-sufficient, eternal, unchangeable, incomprehensible, everywhere present, almighty, knowing all things, most wise, most holy, most just, most merciful and gracious, long-suffering, and abundant in goodness and truth.

Are there more Gods than one?

Answer: There is but one only, the living and true God.

How many persons are there in the Godhead?

Answer: There are three persons in the Godhead, the Father, the Son, and the Holy Ghost; and these three are one true, eternal God, the same in substance, equal in power and glory; although distinguished by their personal properties.

That in essence is the Christian understanding of the nature of God.  Do I understand how God is one, yet be composed of three persons?  No I do not.  But I believe it.  

Especially at this time of year when we celebrate the birth of Jesus, this view of the Godhead is essential for the proper understanding of what took place in a stable, in Bethlehem, so long ago.

So I will rejoice this Christmas, for Christ the Saviour is born!

Tuesday, November 30, 2010

Renewing my mind

And do not be conformed to this world, but be transformed by the renewing of your mind … Romans 12:2

I mentioned a while ago that my Pastor has chosen this verse and specifically the idea of transformation to be the key theme for this ministry year (Sept. to Sept.).  

To say that this theme resonated with me would not tell the whole story for when I starting this blog at the beginning of August, I felt at the time that I needed to undertake some spiritual disciplines in order to deepen my understanding of, my appreciation for, and my devotion to my faith.

Using some of the ideas found in holy scripture, I liken this undertaking to “retuning to my first love”, to “restoring the joy of my salvation”, and to the process of “working out my salvation with fear and trembling.”

Paul the apostle writes in his letters that the Christian life can be likened to a race that is meant to be run.  Now running has never been a strength of mine, give me a bicycle and I can ride for hours, but lace up some running shoes and I am panting by the first corner.  So I have to ask myself from a spiritual perspective how well am I running? 

The honest truth is that I stopped running a long time ago.  Don’t misunderstand me, I don’t mean to imply that I have abandoned the race, only that I stopped running at the first sign of cramps and I have been content to walk most of the way.  Oh every now and then I get encouraged to sprint a short distance, but inevitably I end up walking again.

The bible says “they that wait upon the Lord, renew their strength.”  Well to be frank it is a lot easier to just stop running when I am tired than it is to wait upon the Lord for strength.

So here I am today almost 4 months into the journey and what progress have I made?  To be honest I am probably moving at a swift walk.  If you have ever watched Olympic speed walking, you can envision how I see myself.  I am moving faster than I was four months ago, but my gait doesn’t look or feel natural and I am certainly not running with intensity.

Practically speaking I have regained consistency with respect to the reading of my bible.  On the prayer front however I only average one or two mornings a week of extended prayer.  This is an area I need to address.  I started out strong, praying 3-4 days a week back in August / Sept but then it slowly  got pushed aside for the pleasure of extra sleep.

I want to mention something else that I have done specific to the idea of renewing my mind.  A couple of weeks ago I attended with my dad a training day for “The Truth Project”  I was thoroughly impressed with this series of teachings designed specifically for the purpose of re-establishing a Christian worldview “within” the church. 

Turns out that most Christians don’t actually have have a Christian worldview.  They may understand who Jesus is and what he has done for them, but they don’t have a clue how to distinguish between the truth claims of the bible and the cultural norms that society views as sacred.  This is what a worldview is; it is a filter through which a person makes sense of the world around them.

I made reference to at least the core beliefs of my world view in a previous posting when I said the following:

1.  My nature is bent towards evil.

2.  I am hopeless to change.

3.  The human race is bent towards evil.

4.  We are hopeless to change.

Well if this is a filter through which I view the world, what ramifications does this have on the way I interpret cultural messages.  Let me give you an example.

I constantly hear that whether it is through the power of positive thinking or through mind over matter or though the latest trend that Oprah has hitched her wagon to that it is within me to achieve anything I desire.  That true happiness and peace can be achieved if only I am true to myself and I don’t let others hold me back.

Well my worldview tells me that this is a lie.

The problem with this is that it turns out my true self is not very nice.  Turns out that my true self is in conflict with God and my true self is not inclined to do the morally right thing if it is not in my best interest.  It is interesting how the world actually knows this very well and that is why self-love is almost seen as the pinnacle of human achievement.  Maslow used the term self-actualization, same thing.

My worldview tells me that only God can change my heart and give true happiness and peace.  It tells me that my old nature and its desires are detestable and that through Christ I now have a new nature with new desires which are no longer bent towards evil.

See how important a worldview is with respect to making sense of life.

So back to the task at hand, renewing my mind.  Since the training day I have been working my way through the 12 lessons.  I have made it through the first four and my desire is to begin a small group study in the new year to take other Christians through the material. 

Anyway one day at a time.

Thursday, November 11, 2010

A word of thanks

What would be worth dying for? 

Would I die for my faith?  What about my family?  Perhaps the freedoms that I enjoy and most days of the year take for granted?

I ask the question because today is Remembrance day, and on this day it does my soul good to ponder it.

No one likes to think about death, certainly not me; but if I can’t answer this question today then I am not really living the other 364 days of the year.  More specifically if there is not something that I am willing to die for, then to what end am I living?

It is really as basic as that.  Life boils down to these kind of questions that have no scientific answers.  Yet an answer is still needed and until I find it I will not know lasting peace or security.

Thankfully I know the answer.  I would be willing to die for my faith.  I would be willing to die for my family.  I would be willing to die for the freedoms I enjoy.  And today, on Remembrance day I take a moment to think about the dedicated men and women of the Canadian Forces who discovered and are continuing to discover that some things are worth dying for. 

To them I simply say thank you.

But I know that words are not enough.  As the poet said:

Take up our quarrel with the foe:
To you from failing hands we throw
The torch; be yours to hold it high.
If ye break faith with us who die
We shall not sleep, though poppies grow
In Flanders fields.

So on this day I pledge to not break faith with those who have died fighting for my freedom.  I also pledge to not treat with distain those hard won freedoms.  And furthermore I pledge to not acquiesce to the demands of those who would seek to limit those freedoms in the name of political correctness. 

Vive la Canada libre!

Monday, November 08, 2010

My struggle

Like I said in my previous post actually living in obedience to God’s word is easier said than done.  If you have never read Romans chapter 7, make sure you do.  In this chapter Paul expresses the inner turmoil that each Christian faces.  He writes:

I have discovered this principle of life—that when I want to do what is right, I inevitably do what is wrong.  I love God’s law with all my heart.  But there is another power within me that is at war with my mind. This power makes me a slave to the sin that is still within me.  Oh, what a miserable person I am! Who will free me from this life that is dominated by sin and death?  Thank God! The answer is in Jesus Christ our Lord.

Boy could I agree with that sentiment.  It is amazing how strong the desires of the flesh are.  In my spirit there is a desire to follow Christ with all of my heart, all of my soul, and all of my mind, but the flesh continues to mock me.  It taunts me by producing laziness instead of self-discipline, gluttony instead of restraint and impatience instead of perseverance.

Yet when I take time to ponder it in some measure I am thankful for this battle; for it confirms to me that I have God’s spirit abiding within me.

Furthermore if I loose a battle, I have hope in the continual work of God’s grace to pick me up, dust me off  and set me back on the straight and narrow.

Furthermore still I am confident that my faith in the future grace of God will ultimately guarantee my victory in this war!

Monday, November 01, 2010

The Favour of God

As a young child if there was one person that I desperately wanted to please it was my father.  Even today knowing that I have my father's favour gives me a high level of self-confidence that I otherwise wouldn't have.

When it comes to my heavenly Father, I won't deny that the same need exists within me.  I desperately need my heavenly Father to be pleased with me.

So what must I do to earn the favour of God?

Notice I didn't say love, I said favour.  Again just like my earthly father there is absolutely nothing I can do to earn the love of my heavenly Father.  It is unconditional and freely given.  How amazing is that!  Independent of my love towards Him, God loves me with a never ending love.

Now back to the question at hand.  How do I gain the favour of God?  What do I need to do to have God take pleasure in me?

It really is quite simple in principle, though as with most things in life, easier said than done.  I have my heavenly Father's favour when I live in obedience to his Word.  Consequently I loose his favour when I live in disobedience.

Let me diagram it for you as far as I understand it.

Favour from God is a result of obedience to God's Word, which is a result of faith in God's Word, which is a result of hearing God's Word

So through hearing God’s Word I came to faith in Jesus.

Now by obeying God’s Word I can receive God's favour on my life.

Saturday, October 23, 2010

And that’s a wrap

After spending the entire day Thursday implementing the scuba computer, we found out Friday morning that the use of a real-time operating system (RTOS) to implement it was overkill.

I shouldn’t really be surprised; at my work I have worked on projects of much greater complexity without needing an RTOS.  The reality is, is that there is a continuum between hard real-time and soft real-time, along which most embedded systems fall, and using an RTOS may bring more disadvantages than advantages. 

Specifically when you have a priority scheme allowing a high priority task to snatch the processor away from a lower priority task it leads to a number of complicated problems regarding sharing the processor’s resources.  If a low priority task is using the serial port for example, and a high priority task takes over and wants to use the serial port, it could lead to corruption of the serial port data.  Tasks need to play nice and share the processors peripherals in a manor that won’t lead to corruption, while at the same time ensuring that the high priority tasks meet their time constraints. 

Now these problems have all been addressed in the design of modern RTOS’s but these solutions are not free, they require processor time, resulting in a lot of overhead that simply isn’t required if an RTOS is not used.

So Friday’s lecture was about RTOS alternatives, and it turns out that there are quite a few.  Specifically we talked about the following:

  1. Big loop + interrupt systems
  2. Cyclic executive systems
  3. Co-routine systems
  4. Proto-thread systems
  5. Function Queue systems
  6. State-machine systems

I don’t have time to touch on them here but from my perspective I have used 1, 5 and 6 to some extent.

State-machine programming is the topic that I want to discuss today, because more than all of the others it really is an entirely different programming paradigm.

What I mean by a paradigm is both the style of programming used, and subsequently the thought processes used to break down a problem.

There are many different programming paradigms, the most common being:  procedural, functional, parallel, and object-oriented.

Traditional embedded programming is entirely procedural with some parallel programming concept thrown in when using an RTOS.

State-machine programming is something a little different.  In has a correlation with the desktop world where it goes by the name of event-driven programming.  For example in Windows if you are writing an application you might draw a nice little button using the graphical tools Windows supplies and then you program the code to handle all the possible events that might happen to that button.  Specifically you would tell the computer what to do if a user clicked on the button.

In the embedded world you can design a system in a somewhat similar way.  Using our scuba computer as an example we could define some states that our system might be in.  They might be:

  • At the surface with no oxygen
  • At the surface with oxygen
  • Decending  with sufficient oxygen to reach the surface
  • Ascending with sufficient oxygen to reach the surface
  • Decending  without sufficient oxygen to reach the surface
  • Ascending without sufficient oxygen to reach the surface
  • Below the surface at a depth of greater than 40m
  • Ascending faster than 15m per minute

These are the system states.  We then also would define the possible events that could occur.  Some may be:

  • Oxygen is added.
  • Oxygen is depleted
  • Ascending
  • Descending

We then program the system to change state depending on each event that might occur.  For example if we are in the “at the surface with no oxygen” state and then oxygen is added, our new state would be at the surface with oxygen.  If instead the “descending” event occurred without adding oxygen, our state would be “descending without sufficing oxygen to reach the surface”.  Also not all events would be handled by each state.  If we are at the surface we would simply ignore the ascending event.  Also some events might just keep us in the current state.  If we are descending, a descending event wouldn’t change our state unless at the same time we ran low on oxygen or we exceeded the maximum depth.

It might not be immediately obvious to the non-programmer, but this way of thinking about a system is very different from the usual procedural way of thinking, when we instruct the computer to first do one then then do another.  Now the program literally does nothing until an event triggers it to do something.  Then with each event we might do something as we leave a state, do something as we transition between states and then maybe do something upon entering a new state.  Once this was done we then sit and spin in the new state doing nothing but waiting for the next event.  To my mind this is a fascinating way to look at a whole set of problems that I face day in and day out as an embedded programmer.

I wasn’t unfamiliar with these techniques before the course, but certainly now having had them refreshed I feed much more capable as an embedded programmer and ready to tackle the next problem that my employer sends my way.

Thursday, October 21, 2010

Coming up for air

Well that was fun.

Today we had no lecture, instead the entire day was devoted to a team project.  Specifically we designed and implemented the software for a scuba diving computer.  Something that would look like this.

dive computer

Our hardware actually looked like this, but the functionality was much the same.


We worked in teams of 4 to develop the software required to do the following.

1 - Show ascent-rate, depth, oxygen remaining, elapsed dive time and time to surface on the display.

2 - Sound one of three alarms.

  • High priority alarm if there is not enough oxygen in the tanks to reach the surface.
  • Medium priority alarm if the rate of ascent is greater than 15 meters per minute (prevents getting the bends).
  • Low priority alarm if your depth is greater than 40 meters.

3 – Toggle the display between showing the elapsed time, and the time to surface every 2 seconds.

This is why I love being an engineer; you get to build really cool things.  As an aside our team was the only one to finish the project.  We finished it 5 minutes before the deadline.  Whew…

To complete the project our design used 8 tasks.

  • LED driver task
  • Pushbutton driver task
  • Speaker driver task
  • Analog to digital converter driver task
  • Calculation task
  • Display task
  • Alarm task
  • Watchdog monitoring task

As a point of interest I have included below some of the code that I worked on today which did the calculations for the displayed values.  Probably not the most elegant code since we were under a time constraint, but it shows the proper use of several forms of inter-task communication.  Enjoy.

void AppTaskCalc(void * pdata)
   INT16S         rate_of_ascent_in_mpm = 0;
   INT16U         elapsed_time_in_s = 0;
   INT32S         depth_in_mm = 0;
   INT32S         air_supply_in_cl = 0;
   OS_FLAGS       flags;
   INT8U          err;
   INT16U         sample;
   INT16U         tick_counter = 0;
   INT16U         air_to_surface_in_cl;
   INT32U         alarm_curr = GF_ALARM_OFF;
   INT8U          at_surface = 1;

   static display_data_t display_data = {0,0,0,0,0}; 

      flags = OSFlagPend(gh_sys_flags, GF_TIME_CALC |
              OS_FLAG_CONSUME, 0, &err);
      assert(OS_NO_ERR == err);   
      if (flags & GF_TIME_CALC)
         // Pend on the A2D mailbox
         sample = (*(INT16U *) OSMboxPend(ghMboxAdc,
                                          10, &err));
         assert(OS_NO_ERR == err || OS_TIMEOUT == err);
         // Calculate the rate of ascent
         rate_of_ascent_in_mpm = sample - 511;
         rate_of_ascent_in_mpm /= 13;
         depth_in_mm -= depth_change_in_mm(
         if(depth_in_mm <= 0)
            depth_in_mm = 0;
            at_surface = 1;

         // Calculate the elapsed time if depth is not 0
         if (depth_in_mm != 0)
            if (at_surface == 1)
               at_surface = 0;
               elapsed_time_in_s = 0;
            if(tick_counter & 0x01)
               // Every other .5s tick increment
               //   the elapsed time

         if(at_surface == 0)
            air_supply_in_cl -= gas_rate_in_cl(
                                   depth_in_mm / 1000);
            if(air_supply_in_cl < 0)
               air_supply_in_cl = 0;
         air_to_surface_in_cl = gas_to_surface_in_l(
                                   depth_in_mm / 1000);
         // Update display_data struct
         if(at_surface == 1)
            display_data.rate_of_ascent_in_mpm = 0;
            display_data.rate_of_ascent_in_mpm =
         display_data.depth_in_m = depth_in_mm / 1000;
         display_data.air_supply_in_cl = air_supply_in_cl;
         display_data.elapsed_time_in_s = elapsed_time_in_s;
         // Maximum ascent rate is 0.25m / s
         display_data.time_to_surface_in_s =
                          display_data.depth_in_m * 4;

         err = OSMboxPost(ghMboxCalc, &display_data);
         assert(OS_NO_ERR == err);
         OSFlagPost(gh_sys_flags, GF_MBOX_DISP,
                                        OS_FLAG_SET, &err);
         assert(OS_NO_ERR == err);
         // Set current alarm state.
         if(at_surface == 1)
            alarm_curr = GF_ALARM_OFF;
         else if (air_supply_in_cl < air_to_surface_in_cl)
            alarm_curr = GF_ALARM_HI;
         else if (15 < rate_of_ascent_in_mpm)
            alarm_curr = GF_ALARM_MID;
         else if (40 < (depth_in_mm / 1000))
            alarm_curr = GF_ALARM_LOW;
            alarm_curr = GF_ALARM_OFF;

         // Signal change of speaker priority to the alarm
         OSFlagPost(gh_sys_flags, alarm_curr,
                                      OS_FLAG_SET, &err);
         assert(OS_NO_ERR == err);
      if (flags & GF_BUTTON_AIR)
         // Increment the air count at 5L per semaphore
            // Wait for a signal from the button driver
            OSSemPend(ghSemB1, 10, &err);
            assert(OS_NO_ERR == err || OS_TIMEOUT == err);
            if ((OS_NO_ERR == err) && (at_surface == 1))
               if (air_supply_in_cl <= 199500)
                  air_supply_in_cl += 500;
               else if (air_supply_in_cl < 200000)
                  air_supply_in_cl = 200000;
         }while (OS_NO_ERR == err);
      // tell watchdog we are alive
      OSFlagPost(gh_sys_flags, GF_ALIVE_CALC,
                                       OS_FLAG_SET, &err);
      assert(OS_NO_ERR == err);     

Wednesday, October 20, 2010

Rate Monotonic Analysis

Say what?

Yes that is right, this mornings lecture covered the fascinating subject of rate monotonic analysis.

I say that somewhat in jest, but it actually was a fascinating subject.

Here is the problem.

Given a given set of tasks that an RTOS wants to schedule, what is the appropriate priority level for each task?  Further more can we guarantee that all time constraints can be met?

Now I didn’t talk about task priorities in yesterday’s post, but in a true RTOS, tasks which are deemed to have a higher priority will always get access to the resources of the processor over any lower priority task.  This is necessary if we are to meet the real time constraints of an embedded system.

Going back to the problem statement though, if we have a dozen tasks or more, each of which has a real time constraint, how do we decide which priority to give to each task, and can we always be sure that the time constraints will be met.  Well rate monotonic analysis can provide the answer for us.

In order to do this analysis we need to know 3 main things about the embedded system.

  1. How many tasks are there.
  2. What is each task’s time constraint; how often must it get access to the processor
  3. What is each task’s worst case time for how long it needs access to the processor

Once we have this information we can simply follow the following steps.

  1. Assign task priorities based on each task’s time constraint.  The task which has the shortest time constraint has the highest priority.  That was easy.
  2. Multiply each time constraint by its worst case execution time to get the CPU utilization for that each task.  This is actually quite hard to calculate.
  3. Add up all the utilizations to determine the total processor utilization.

Now if the answer to 3 is greater than 100% we know that it is impossible to schedule the events so that all the tasks time constraints can be met.  It is time to buy a faster processor, or improve the code to speed up the tasks.

The question now becomes if the overall processor utilization is less than 100% do we guarantee all time constraints can be met?

The answer is no.  In order to guarantee all time constraints are met the maximum processor utilization turns out to be the equation:  n * (2^(1/n) – 1), where n is the number of tasks.

For one task we can obviously have 100% processor utilization.  For two tasks this drops to 82.8% processor utilization.  For three tasks it is 77.9% .  And for n as it grows the limit approaches 69.3% processor utilization.

This turns out to be very nice for the designer.  Regardless of how many tasks there are, and as long as priorities are assigned in order of time constraint, and as long as our processor utilization is less than 69% we are guaranteed that all time constraints can be met.

See didn’t I tell you.  Pretty cool stuff.

Tuesday, October 19, 2010


At the best of times, I am not much of a multi-tasker.  Let me concentrate on finishing one task well and I will be happy.  Give me six things to do at once and inevitably I will forget something.  Just thought that you should know that.

Today’s lesson was on programming in a multi-tasking environment.  Specifically within the framework of a real time operating system, or RTOS for short.

Windows is probably the operating system that most people are familiar with.  At its heart, the main thing that Windows does is co-ordinate the execution of all of the different programs (or tasks more correctly) that I might want to run. 

If I have my e-mail program running, and then I open my internet browser along with my media player, the operating system needs to ensure that each program is permitted access to the limited resources of the processor. 

Since generally there is only one processor and this processor can only do one thing at a time the operating system needs to decide how best to divide up the processors time.

Though it may look like each program is running at the same time, in reality this is an illusion.  The operating system actually divides time into slices and allows each program to run for the duration of a time slice, before switching to a different program.  The programs appear to be running concurrently because this time slice is so small that within a given second every program gets a chance to run many times.  Now this is an over simplification but I think you get the idea.

In the desktop software world you are probably aware of a few operating systems, Windows, Mac OSX, and Linux are far and away the most popular.  In the world of embedded programming things get more complicated.  Depending on the complexity of the embedded system a developer may or may not need an operating system.  Your smoke detector probably doesn’t use an operating system, but most assuredly your TVs and DVD players do.

When is an operating system required?  Well it is not a cut an dry question but certainly as the complexity of the device increases and the number of things it is required to do increases an operating system starts to become a necessity.

So is my DVD player running Windows?  Uh, … no.

Most embedded devices have an additional requirement that desktop computers generally do not have.  A real-time constraint.  Specifically when I want to do something, it needs to be done absolutely within a certain period of time.

Have you ever tried to do something in Windows and waited many seconds for it to respond to your command?  You sit there twiddleing your thumbs while Windows is busy doing something else in the background.  You have to wait for Windows to finish doing what it wants to do before you get any joy.

Now think about this.  How would you like it if the ABS braking system in your car were like that.  You press the brakes and your car decides that it is doing something more important at the time being and that it would get back to you when it was good an ready.

I think you can imagine the consequences.

In the embedded world very often there are hard time constraints for the system to perform a function.  In our example the user presses the brakes, so the ABS system had better be monitoring for wheel lock-ups hundreds if not thousands of times each and every second without fail.

As an aside this is another unique characteristic of embedded systems.  They have to be much more reliable then your typical desktop computer.  Have you have ever heard of a TV having a blue screen of death?  When was that last time you had to reboot your smoke detector?  Embedded systems need to work day in and day out for years on end without ever crashing.

So since embedded systems often have real time constraints, they usually can’t rely on the same operating system that is running your computer.  This is where a real time operating system comes in.

I mentioned the big 3 desktop operating systems, so what are the equivalent big 3 RTOSs for embedded systems?  Well it really isn’t that easy.  Since each and every embedded device has such differing requirements there are many different operating systems available.  Far too many to list here, and even if I did you probably would not have heard of them.  Also in many cases embedded programmers will write their own operating system, a feat unheard of in the desktop world, but quite doable by a single programmer on a small embedded device.

Now all that to get to this.  In today’s lecture we covered the following topics using the uc/OS-II operating system:  task creation, assigning task priorities, understanding how task switching works and guarding against race conditions between tasks.  I won’t go into the details but needless to say today was another interesting day at the embedded software boot camp.

Monday, October 18, 2010

And now for something a little different.

Today’s post finds me just outside of Baltimore Maryland.  I am blessed to be attending a course that is directly applicable to what I do each and every day at work.  It is the Embedded Software Boot Camp, and so far it is looking like it will meet and exceed my expectations. 

I have been on training before, but it has always been either soft-skills development (the 7 habits of highly effective people), or application specific development (ECAD software training).  Since my time as a student at the University of Waterloo, I haven't been on a course that was specifically to refresh and advance my technical skills.  Today that has changed and I thank my employer for giving me the opportunity to attend this week of  training.

Over the last few months my ramblings have been pretty much one dimensional for the reason that my faith is and will always be the most important aspect in my life.  I don’t intend to stop writing about it, but I am a multi-dimensional being and I want to augment those discussions with some thoughts regarding other interests that make me uniquely me.  This week I want to write a bit about what I am being taught at the course.  Those that are technically minded might find this interesting, while those that are not might want to stop reading right about now.

As a point of interest, today I learned that there were approximately 12 billion processors sold in 2009.  Leaving aside what a huge number that is, the interesting statistic is that less then 2% of those actually end up in the PCs and Macs that we have on our desks.  The other 98% of the processors sold end up in embedded devices.   Actually it shouldn’t be that surprising when you take the time to compare the number of computers kicking around your house versus the number of embedded devices.  Let me entertain you with my list.

I have one general purpose computer with a Pentium 4 processor in it.

As for embedded devices, here is a list which I am sure is not exhaustive.  I have a mouse, keyboard, monitor, printer, USB flash drivers x4, external hard drive, internal hard drive, floppy drive, pen tablet, optical drives x3, sound card, graphics card, Ethernet card, router, modem, DSL modem, digital camera x2, external flash, digital video camera, microwave, stove, fridge, stereo, TV, DVD player, receiver, VCR, digital watch, clock radio x3, blackberry, cell phone, iPod x3, eBook reader, car stereo x2, car DVD player, car GPS, multiple automobile subsystems, daughters toys (TAG readers x2, toy computer x2, alphabet pal,  fridge letter toy, at least 3-4 other infant toys that make music and flash lights), smoke detectors x4, CO2 detector, garage door opener, garage door remote x2, TV remote control, DVD remote, receiver remote, VCR remote, digital picture frame, baby monitor base station, baby monitor receivers x2, guitar tuner, etc.

All of these things have one thing in common.  They are all electronic devices containing both a processor and embedded software.

Today in the course we covered 2 main topics.  First we reviewed the intricacies of the C programming language and second we learned how to write software which communicated directly with hardware.

Knowledge of the C programming language is pretty much an absolute requirement for anyone wanting to write embedded software.  This is in contrast to programming for desktop computers which have many languages to choose from.  Another difference with embedded programming is that you don’t write the software on the device you are programming.  When programming a PC, you write the software using the PC.  When writing software for a DVD player however, you can’t write the software on the DVD player, you have to use what is called a cross-compiler.  In other words, you write the program on a PC using a cross-compiler which doesn’t create a executable for the Intel X86 processor, instead it creates a file specific to the processor you are using on your embedded device.  This file can be then programmed into the chip on the embedded device.

The second thing we covered was hardware interfacing.  Specifically how to use the C language to communicate with hardware and control its operation.  The exercise today was to write a device driver for an ARM processor that communicated with a timer.  I present my solution here… 

- STR912F Device Driver

#include <stdint.h>
#include <includes.h>
#include "timer.h"

// Macros
#define BIT0  (1 << 0)
#define BIT1  (1 << 1)
#define BIT2  (1 << 2)
#define BIT3  (1 << 3)
#define BIT4  (1 << 4)
#define BIT5  (1 << 5)
#define BIT6  (1 << 6)
#define BIT7  (1 << 7)
#define BIT8  (1 << 8)
#define BIT9  (1 << 9)
#define BIT10 (1 << 10)
#define BIT11 (1 << 11)
#define BIT12 (1 << 12)
#define BIT13 (1 << 13)
#define BIT14 (1 << 14)
#define BIT15 (1 << 15)

// Type definitions
typedef struct
   uint16_t IC1R;   // Input Capture Register 1
   uint16_t const pad1;
   uint16_t IC2R;   // Input Capture Register
   uint16_t const pad2;
   uint16_t OC1R;   // Output Compare Register 1
   uint16_t const pad3;
   uint16_t OC2R;   // Output Compare Register 2
   uint16_t const pad4;
   uint16_t CNTR;   // Counter Register
   uint16_t const pad5;
   uint16_t CR1;    // Control Register 1
   uint16_t const pad6;
   uint16_t CR2;    // Control R7egister 2
   uint16_t const pad7;
   uint16_t SR;     // Status Register
   uint16_t const pad8;

typedef struct
   uint32_t CLKCNTR;
   uint32_t PLLCONF;
   uint32_t SYSSTATUS;
   uint32_t PWRMNG;
   uint32_t ITCMSK;
   uint32_t PCGR0;
   uint32_t PCGR1;
   uint32_t PRR0;
   uint32_t PRR1;
   uint32_t MGR0;
   uint32_t MGR1;
   uint32_t PECGR0;
   uint32_t PECGR1;
   uint32_t SCR0;
   uint32_t SCR1;
   uint32_t SCR2;
   // Other stuff I don’t care about

// Public Prototypes
void timer_init(void);
void timer_oneshot(uint16_t ms);
int timer_done_yet(void);

// Private Declarations
// Declare a read_only pointer to a volatile Timer structure
//   and set the pointer equal to the address 0x58002000
static TIMER_t volatile * const pTimer =
   (TIMER_t *) 0x58002000;
#define Timer (*pTimer)

// Declare a read_only pointer to a volatile System Control
//   Unit structure and set the pointer equal to the address
static SCU_t volatile * const pSCU = (SCU_t *) 0x5C002000;
#define Scu (*pSCU)

FUNCTION: timer_init

- Initialize timer hardware

- None

- Void
void timer_init(void)
   Timer.CR1 &= (~BIT15);  // Stop the timer
   Timer.CR1 |= BIT0;      // Set the External Clock Enable
   Scu.SCR1 = 48000;       // Set the clock divisor

FUNCTION: timer_oneshot

- Starts the one shot timer

- ms, number of milliseconds to run the timer for

- Void
void timer_oneshot(uint16_t ms)
   uint16_t target;

   Timer.CR1 &= (~BIT15);        // Stop the timer
   Timer.CNTR = 1;               // Reset the counter
   Timer.SR &= (~BIT14);         // Reset the Compare Flag

   /* The PLL Configuration Register sets a master clock
      of 96 MHz.  This 96 MHz clock is divided by 48,000
      using SCU Configuration
Register 1, therefore the
      timer input clock is running at 2 KHz, so the number
      of clock ticks is 2x the desired number of
Also, resetting the counter yields a
      bizarre initial value of 0xFFFC.  We have to adjust
      our target count to compensate for this.

   if(ms > 0x8000)
      // The number of ms requested was too large
      // set to maximum
      target = 0xFFFB;
      target = 2 * ms;

      if(target == 0)
         // Setup the timer to be minimum = 0.5ms
         target = 0xFFFD;
      else if(target == 2)
         // 1 ms delay requested; handle this special case.
         target = 0xFFFE;
         // Set the timer compare value
         target =- 4;  
   Timer.OC1R = target;

   // Start the timer
   Timer.CR1 |= BIT15;          

FUNCTION: timer_done_yet

-  Checks to see if the one-shot timer is still running

- None

- 0 if the timer is still running
- 1 if the timer is done
int timer_done_yet(void)
   // If bit 14 (OCF1) is set we have reached the count
   if(Timer.SR & BIT14) 
      return 1;
      return 0;

Monday, October 11, 2010

Counting My Blessings

1.  I am thankful today for each breath that I breathe.  Every day that I live is a gift from God.

2.  I am thankful today for each step that I take.  My health is a blessing I won’t take for granted.

3.  I am thankful today for the bride of my youth.  She has stood by me for 12 years, and I know that without her by my side, life would not be as blessed or fulfilled.

4,  I am thankful today for my children.  They bring me joy beyond measure.

5.  I am thankful today for my parents.  They are the reason that I am who I am today.

6.  I am thankful today for my extended family.  Though we may not be together all that often, the support of your prayers and the knowledge of your care gives me a confidence to face the world knowing that someone has my back.

7.  I am thankful today for my place of employment.  To be able to work at something that I love; that is a gift too few experience.

8.  I am thankful today for my community of believers.  To know that I am not alone in this life of faith, but that I am supported by so many others enables me to believe for greater things than I would ever believe for alone.

9.  I am thankful today for the daily provisions of my heavenly Father.  My needs have been met, I have never known want.

10.  I am thankful today for Jesus.  He sought me when I was far from him.  He loved me when I was yet in sin.  He bought me by his blood outpoured.  He saved me, and now I’ve made Him Lord.

Thursday, October 07, 2010

Birthday Blessing

My daughters, today you turn four years old and today I thank the Lord for each and every moment that our lives have been entwined.  The joy that I experience each time I see your face or hear your voice comes from the knowledge that God has ordained that you would walk through this life with me as your daddy.

The awesomeness of this responsibility is not lost on me.  I shutter at the fact that I am the primary vessel the Lord has chosen to use to model the character of God in your life.  I shutter but I also know that when I am weak, He is strong, when I stumble, He picks me up, and though I may falter, He never changes.

My prayer for you is the following:  that you would love Jesus and that you would permit the Holy Spirit to direct you towards the purpose that God has for your life.

Together with that prayer, I also bless you this day.

I bless the moments that we spend together, that you may know the love of a father.

I bless the moments that we are apart, that you may be secure in that love.

I bless your relationship with your mother, that you may understand the heart she has towards her children.

I bless your relationship with your sister, that your bond would support you during all of life's difficulties.

I bless your relationship with your extended family, that you would take up the heritage of faith that has been provided for you.

I bless your relationships with authority figures, that you may learn to submit to godly authority.

I bless your relationships with your peers, that you may become wise regarding whom you allow to influence you.

I bless your mind, that your may gain wisdom and knowledge.

I bless your body, that you would continue to be in health.

I bless your spirit, that you would know the path of righteousness.

And I leave you with the blessing of God.

May the Lord bless you and keep you.
May the Lord make his face to shine upon you
  and be gracious to you.
May the Lord lift up his countenance upon you
  and give you peace.

Monday, October 04, 2010

Living in Neverland

When I observe my generation, I can't help but feel frustrated.  When did it become a social norm for men and women to never grow up?

I guess now is the time for me to showcase my "old-fashioned" values. 

There was a season in my life when it was acceptable for me to demonstrate a lack of maturity.  This was called childhood.

Today I am in a season of my life when I should be expected to demonstrate a certain level of maturity and autonomy.  This is called adulthood.

Furthermore, I am also in a season of my life when I am expected to demonstrate a certain  level of responsibility and selflessness.  This is called parenthood.

I can almost hear the voice of some begin to complain that societal expectations are to be  overturned and tossed into the trash bin of history.

I beg to differ.  Especially when I see what they would replace it with.

Instead of maturity, my generation feels that living for today is the pinnacle of human experience.

Instead of responsibility, my generation feels that living free of obligations is liberating.

And instead of selflessness, my generation feels that the only purpose in this life is to live for themselves.

But can I share a truth with you?

Understanding my place within the light of eternity is the source of my happiness.

Living within the confines of responsibility is the source of my liberation.

Sacrificing my needs for the needs of others is the source of my purpose.

These truths transcend time and space.  They have not changed, for the human condition has not  changed.  By running away from them we will only find discontentment and sorrow.  By embracing them we will find contentment and happiness.

Wednesday, September 29, 2010


Wouldn’t it be wonderful to live a life free of inner turmoil.  Free of wrong doing, free of negative consequences and free of shame.  In essence to live a life free of evil.

I am encouraged that my Christian faith provides me with a hope that this utopian dream is not only a possibility but is the promise of God to all who believe. 

As a Christian I have been adopted into God’s family and as a Christian I have been justified in God’s eyes.  These two actions were done by God and God alone, for I was spiritually dead but he made me alive. 

But there is another work that God wants to do in my life and now that I am alive spiritually I can work along side of God to accomplish this task.  It is the work of sanctification.

God has control of my spirit, but he now also wants control of my flesh.  He wants me to become more and more like Jesus with each passing day, and for this he needs my co-operation.

I am under no delusion.  Until that day with I am called home to heaven, I will continue to experience the evil of this world.  That is outside of my control.

As a Christian, what has changed is that the evil of my own nature is now within my control.  Since the spirit of God lives within me I no longer need to be a slave to the passions and the impulses of my evil nature.  I can work with God each day to crucify my old nature and put on my new nature.

God will not forcefully take control of my flesh.  it is up to me to work with the spirit of God to accomplish this work of sanctification.  It is a process that takes a lifetime.

Saturday, September 25, 2010


God takes responsibility for my actions?  What did I mean by that?

First of all as I have said before my nature is bent towards evil and I am hopeless to change.

All is not lost however because as the hymn writer so aptly put it, “Christ has regarded my helpless estate and shed his own blood for my soul.”

It is through the death of Jesus that I am given a new nature.  I am transformed, regenerated, reborn.

This is the message of hope and redemption that Jesus brought to me so many years ago.  I was five, when I first believed.  And this hope and redemption, Jesus brings to all who believe.

But what actually happened when I believed.  The bible says that my spirit was made alive and my evil nature was crucified with Jesus.  The righteousness of Jesus was given to me, and my evil deeds were placed on him.

What an incredible exchange.  So now in addition to being adopted into God’s family, I have also been justified in God’s eyes.  It is just as if I had never done any wrong thing.

So God then has taken the responsibility to account for my actions, when I was unable.

Wednesday, September 22, 2010


I read the following this evening.

Even before he made the world, God loved us and chose us in Christ to be holy and without fault in his eyes.  God decided in advance to adopt us into his own family by bringing us to himself through Jesus Christ. This is what he wanted to do, and it gave him great pleasure.

This text can be found in the first chapter of Ephesians.

What a beautiful sentiment.  God was pleased to adopt me into his family!  In fact he planned it long before I was even born.

This truth has a special meaning to me because three years ago we adopted two beautiful baby girls into our family.  And similarly the planning began long before they were even born.

Adoption, in this context has a very specific meaning.  I have been given legal responsibility to not only care and provide for the needs of my children, but to take responsibility for their actions.

In a Christian context adoption also has a very specific meaning.  God has not only taken responsibility to care and provide for my needs but (and here is the kicker) to take responsibility for my actions.

But to all who believed him and accepted him, he gave the right to become children of God.  John 1:12

Jesus bore our sins in his body on the tree, so that we might die to sins and live for righteousness …  1 Peter 2:24

I am a child of God.  He is my father; and he loves me. 

This much I know.

Sunday, September 19, 2010

So what, revisited

In a previous post, I discussed the hypocrisy of living a private life of faith.  Today the message I received under the teaching of my pastor, complimented this idea.  The text under discussion was from Paul’s letter to the Roman church.  In chapter 12 verse 2, Paul writes,

And do not be conformed to this world, but be transformed by the renewing of your mind … Romans 12:2.

Conformity.  Specifically conformity to the standards and principles of popular culture is something that I daily struggle with. 

Does my life reflect the fact that the spirit of God lives inside of me?  Sure when I am among fellow believers it is easy to walk the talk.  But then when I am among unbelievers so often I find myself at a standstill, sitting in silence, not willing to speak the words of life that so many need to hear.

I could go on deluding myself that my good “moral” life is somehow going to win others to the Christian faith.  I could, but frankly right now I am tired of lying to myself.  No one has ever come to faith by observing my “godly” character and if I am honest with myself I know that no one ever will.

The truth is that I am almost 35 years old and during my time on earth, I have only been directly instrumental in leading one person to faith in Jesus.   One person.  Only one.

Was it my character?  Was it my moral behaviour that drew them.  Hardly, it was simply the fact that I opened my mouth and told them about Jesus.  God had prepared their heart to received the truth of the gospel, but I had to open my mouth and present it to them.

When did this happen?  It shouldn’t come as a surprise that  this happened during the time of my life in grade 13 when I was seeking the Lord in prayer each and every day. 

I want to experience that again.  That is why I am committing myself to daily prayer and bible study.  I want to be ready when the time comes once again to open my mouth.

Wednesday, September 15, 2010


So again the question why?  Why have I chosen to believe the Christian message of redemption and hope?

In order to explain this I first need to begin with a few precepts that to me are self-evident.  In other words, I don’t need to be convinced of their truth, every ounce of my soul, mind and body testify to their truth.  Call this my world-view.

1.  My nature is bent towards evil.

2.  I am hopeless to change.

3.  The human race is bent towards evil.

4.  We are hopeless to change.

Given that what then am I to do?

I could despair.  I could give into my natural tendencies and live a life of depravity, living only for myself.

Or, I could have hope.  Hope in a benevolent God who has put into place a mechanism to change my nature.

I choose hope.

Monday, September 13, 2010

Safe in His arms

I have always enjoyed a good Christian funeral.

Call me strange, but ponder this; the wisest person who ever lived, King Solomon said in Ecclesiastes 7:2.

It is better to go to a house of mourning than to go to a house of feasting, for death is the destiny of every man; the living should take this to heart.

I have been to many funerals but today I attended one which is a model for how I would want my funeral to be held.

There were no prolonged eulogies, no sad epitaphs, no despair.

What there was, was the truth of the Christian message proclaimed loud and clear.

As a Christian, I have the hope of a glorious resurrection.  As a Christian, I have the joy of an eternity with Jesus.  As a Christian I can rejoice that fellow believers who have gone on before me are safe in the arms of Jesus.

I need to ponder these truths from time to time and a Christian funeral grounds me and reminds me about what is truly important.

Do I fear death?  I honestly don’t believe so.  I am ready to meet my maker.  I have placed my trust in Christ and subsequently I can say with the song writer,

No guilt in life, no fear in death,
This is the power of Christ in me;
From life's first cry to final breath.
Jesus commands my destiny.
No power of hell, no scheme of man,
Can ever pluck me from His hand;
Till He returns or calls me home,
Here in the power of Christ I'll stand.

Thursday, September 09, 2010

Out in the light

Up until today I haven't shared this blog with anyone outside of my immediate family.  The reason is that I didn’t want to start something that I wasn’t going to finish.  I didn’t want to invite others to view and comment on my writings unless I was going to commit to posting regularly.

Well today is the one month anniversary of this blog and I now have 14 posts under my belt.  Not a large number to be sure, but enough that hopefully they will be of interest to others out there who may be on the same journey of faith as I am on.

I have another motive for going public however. 

The Bible says in John 3, “But whoever lives by the truth comes into the light, so that it may be seen plainly that what he has done has been done through God.”

I want to live in the light.  I want to live a life that is open and transparent.  I want everyone to know that any good thing that they perceive in me is a direct result of the Spirit of God living inside of me. 

I want to be genuine and I want my life to line up with my beliefs, both for me and my family. 


Wednesday, September 08, 2010

Closeness with God

I said in an earlier post that I would discuss the impact that the music and message of Keith Green has had on my life. 

Well, my earliest memories of Keith come from 1982-1983.  My best friend at the time was the son of the local Anglican minister.  Being the son of the local Pentecostal minister, our parents were well acquainted.  I can’t remember the exact occasion but for some reason my friend’s family gave my parent’s a recording of Keith’s album “Songs for the Shepherd”. 

I have a distinct recollection of listening to the record with my mother one day and of her showing me the liner notes which described the plane crash in June of 1982 which had killed Keith.

From then until 1993 I was acquainted with Keith’s music, however I can’t say that it had much of an impact on my life.

All of that changed around November 1993 when I was in grade 13.  I read his biography “No Compromise”, written by his wife Melody.  This book shook me out of my complacency and put me on a search for a deeper relationship with God.

That same month another pivotal event took place in my life.  I attended a retreat for the children of Pentecostal ministers.  A PK retreat as it was called.  PK being the term used for “preachers kids.”

Together these two events focused my determination to no longer live on the coattails of my parents faith, but to appropriate it as my own.

The most immediate effect was on my prayer life.  From November 1993 through the end of my senior year I awoke daily at 5:30 and spent the next hour in prayer before school.  Also during those months practically the only music I listened to was by Keith Green.  I had both the silver and gold compilation albums which contained every song ever published by Keith and I knew them practically by heart.

It was during this time that I experienced a closeness with God that I have never experienced before or since.

I relate this because I desire to experience that closeness once more.  I want to desire God more than I currently do and I know from my own past that it is possible.

I guess it comes down to priorities.  I say that God is first in my life, but do my actions back it up.  Right now they don’t.  I think about a line in one of Keith’s songs spoken from the perspective of God.

“If you can’t come to me every day, then don’t bother coming at all.”

Strong words yes, but are they any stronger than the very words of Christ?

“Anyone who loves his father or mother more than me is not worthy of me; anyone who loves his son or daughter more than me is not worthy of me.”  Matt 19:37.

My heart’s cry today is the same as that of St. Paul in his letter to the Philippians.

“I want to know Christ, and the power of his resurrection, and the fellowship of sharing in his sufferings, becoming like him in his death, and so, somehow, to attain to the resurrection from the dead.”

Monday, September 06, 2010

A clean slate

I just spent two days reinstalling the operating system for my parent’s computer.  It's a 2GHz Pentium 4 purchased in 2002 and it had become unusable.  Not only was it very slow but it regularly crashed.  This was very vexing to my non-technically minded parents. 

They were all set to throw it out and get a new computer; but before they did I decided to try my hand at restoring it.  I formatted the hard drive, installed the operating system, added drivers, replaced applications and finally restored data.  It is amazing how long these things take, but after two days the computer was as good as new. 

When I think about it this is precisely what God does to us when we come to faith in him. 

We come to him with baggage caused by the installation of bad programs that only gets partially deleted.  We come to him with wounds caused by years of exposure to spam and destructive viruses.  We then allow other processes to run in the background sapping us of valuable resources that could otherwise be directed to a better use.  And we allow the our minds to become fragmented by the endless search for meaning in a meaningless world.

What we need is a clean slate.

And this is what God gives us when we answer the call to a radically new life in Jesus.  He wipes us clean and gives us a new heart, a new mind and a new soul.

Tuesday, August 31, 2010


My daughter reminded me this past Sunday of an important principle.

She was sitting on my lap and I simply said “I love you”.  Having been through this routine countless times before I anticipated a simple “I love you too Dad” in response with perhaps “with all my heart”, tacked on the end for good measure.

She surprised me though when she said, “Dad, I delight in you”.

Wow, did  my heart ever fill with love towards her when I heard those words.  It was incredibly moving to hear that my daughter delights in me. 

I imagine that this is exactly what my heavenly father wants to hear from me every day.  I tell God that I love him time and again, and honestly sometimes it seems that it is simply a rote exercise lacking much emotion.  How often do I truly delight in my God and how often to I tell him.

Not often enough.

Thursday, August 26, 2010

So what

Having stated what my beliefs are, there are two questions that I should then be able to answer. 

One is “why?”  Why do I believe?  I won’t try and answer this one today.

The second is “so what?”  In other words what are the consequences of this belief?  I shall now begin to investigate this question.

Popular culture would have us believe that our religious beliefs should be private; not just in thought but also in observance.  To submit to this cultural norm however would implicate me as a hypocrite for I would be impersonating someone without belief.

Hypocrisy is rampant in popular culture and some day I will reflect on it to a greater extent; but today I just want to highlight that if my religious beliefs uphold hypocrisy as a vice (which they do),  then covering my religious beliefs in a shroud of privacy is not possible without subsequently diminishing those beliefs.

Heaven forbid!  For when I diminish my beliefs, I am diminishing the work of Christ in my life.

Monday, August 23, 2010

What I believe

Great sermon yesterday, taken from Philippians 1:6:  “being confident of this, that he who began a good work in you will carry it on to completion until the day of Christ Jesus.”

I am so thankful that Jesus started a good work in my life when I was just a child.  My day of salvation came when I was only five years old.

Since that day I have never abandoned my faith in Him and I have never seriously questioned the validity of the Christian message. 

What is the Christian message?  I think it is very well summarized in the Apostles creed.

I believe in God, the Father Almighty,
    the Maker of heaven and earth,
    and in Jesus Christ, His only begotten Son, our Lord:

Who was conceived by the Holy Ghost,
    born of the virgin Mary,
    suffered under Pontius Pilate,
    was crucified, dead, and buried;

He descended into hell.

The third day He arose again from the dead;

He ascended into heaven,
    and sits on the right hand of God the Father Almighty;
    from there he shall come to judge the living and the dead.

I believe in the Holy Ghost;
    the holy universal church;
    the communion of saints;
    the forgiveness of sins;
    the resurrection of the body;
    and the life everlasting.


I couldn’t have said it better myself.

Friday, August 20, 2010


Today is the eve of my wedding anniversary.

August 21, 1998 was the day I married the love of my life.  Twelve years have now passed and not once have I regretted my decision.  My life is so much richer having my wife at my side.  I am committed to her completely.

There is a third person in this marriage however.

Both of our wedding rings have the following inscription:  Ecclesiastes 4:12.  Faithful readers of the bible will recognize this verse.  It reads:  “Though one may be overpowered, two can defend themselves.  A cord of three strands is not quickly broken.”

The pastoral charge at our wedding was based on this verse and the comments to us as a newly married couple were this.  Together as a couple you can do so much more than either of you can alone; however in order to have a strong marriage, there needs to be a third cord, and that third cord is the person of Jesus Christ.

Our marriage is a Christian marriage and that makes all the difference.  It means that we have anchored our marriage to Jesus Christ.  Storms may still come, but we will endure the storm.

I love you Margaret.

Wednesday, August 18, 2010

One step forward

The past two days my time spent with God has been from 6:30-6:50 in the morning. Prior to that I was reading the Bible and praying at bed time.

I like to think of myself as a morning person, but I think it more comes as a consequence of not being a night owl.

Ideally I would turn off the lights at 10pm and hop out of bed full of vigor at 6am or earlier. This rarely happens. Often it is 11 when the lights go out and routinely I am being dragged out of bed shortly before 7am when the girls get up.

My commitment for this week is to ensure that I get up by 6:30 each morning and spend time alone with the Lord. Eventually I would like to get it to 6am, but one step at a time.

For me the morning is the best time to have my daily devotions, there are no distractions, and I can renew my mind before heading into the day.

Typically during this time I would one - read a portion of the Bible and two - pray.

Back in May, our adult Sunday School class listened to some teaching from Robert Morris. In one of the lessons, he outlined his time with the Lord as the following: one - wait, two - worship, three pray and four read.

I have found this formula to work well for me. The only danger being that I might fall asleep while waiting. Hasn't happened yet, but my mind sure can wander and keeping my thoughts on Christ isn't always easy. Nevertheless this is the method that I plan to follow for the next few weeks as I get back into the regular habit of devotions.

Monday, August 16, 2010


Why did I call this blog Embedded Christian?

Pretty simple really. I am an embedded systems engineer who is also a Christian.

I will start with the first part of that description. What is an embedded systems engineer?

For those that are interested an embedded system is essentially an electro-mechanical device that is designed to perform a few dedicated functions. This is in contrast to the general purpose computer you may have in your home.

Typically the software required to operate the device is contained on a computer chip inside it, and is thus called firmware (software that resides in hardware). Examples of an embedded system, would be your wrist watch, your stereo, your TV, your telephone, your cable box, your DVD player, your microwave and your car. In fact your car probably has a dozen or more embedded systems, ABS braking system, fuel injection system, traction control system, GPS, etc. etc. etc.

Me, I write firmware that controls a check processing module that sits inside an ATM. The software I write operates motors, actuates solenoids, monitors sensors and communicates with the main computer via a USB connection. Fascinating stuff if you are like me and enjoy making things work.

By rights, I can call myself an embedded systems engineer. I don't have to use the terms embedded systems designer, or developer or programmer. I have the authority based on the Professional Engineers Act of Ontario to call myself an engineer.

Now for the second part of that description. What is a Christian?

For those that are interested a Christian is someone who believes that Jesus is the Son of God. They believe that he was born of the virgin Mary. They believe that he lived a sinless life and that he was crucified. Furthermore they believe that he was resurrected on the third day, that he ascended into heaven and that he will return again. Fascinating stuff if you are like me and enjoy having fellowship with God.

By rights, based on the above confession of faith in accordance with the Word of God, I can also call myself a Christian. One who is embedded in Christ.

Friday, August 13, 2010


June 27 1986 is a day that I won't forget. Why? Because on that date I received my first one year bible.

The reading that day was about Joash the child king of Israel. The date is fixed in my mind, but it can also be easily verified because in the one year bible, each passage is assigned to a different day of the year.

That day my dad had surprised my brother and I by getting us matching one year bibles; it was the living bible version, green cover, with a picture of a sundial on the front. I was reminded of this again, because I have gone back to using a one year bible in order to bring consistancy to my bible reading.

All of that to say, the mind is an amazing thing. My mind in particular seems to easily remember seemingly unimportant events and dates, while at the same time forget what I needed to get at the grocery store.

In May of 1985 I travelled with my mom to England to visit my grandparents. When we entered their apartment building immediately I commented to my mom that the colour of the handrail on the stairs had changed. It was now black but I remembered it as a pale blue colour.

I was 9 at the time and my mom could not recall one way or the other if the colour had changed. My grandparents did confirm however that I was correct. What still amazes me about this experience is that the last time I had seen the railing I was barely 2 years old.

I had a great child-hood and I have many fine memories of growing up. Prehaps that is why I am a nostalgic person. I like to revive memories from my childhood. I enjoy reliving the sights and sounds, the feelings and smells that accompanied those memories.

I recognize though that beeing too nostalgic, can have its downside. If I live in the past it will prevent me from progressing in the present. If I compare every experience to a golden standard from my past I might miss out on making new memories.

Thursday, August 12, 2010

Motivation and Duty

I started off yesterday entitling my entry "Motivation". The direction that I took with that post wasn't what I originally intended, so today I will begin to present my thoughts on motivation.

What motivates me to get out of bed in the morning?

I have never been a person that struggles with depression. Certainly there have been times I would consider my state of mind to have been depressed, but I have never encountered a time in which I would consider my state of being to have been depressed.

In general I am an optimist, I try to be in the words of the apostle, content in all things.

Notwithstanding something motivates me to face the day.

There are the obvious external motivators. The paycheck at the end of the week being a big one. Another being the chorus of little girls asking "is it wake-up time?"

As strong as these and other external pressures are they not the source of my contentment however. For the source I need to examine what internally motivates me.

Today I will examine one of them.

Duty ... an old-fashioned word, one rarely used today outside of the military, yet in all truth still an abiding principle that is one of my sources of motivation. I have a duty to my family, I have a duty to my employer, I have a duty to my Lord.

The world constantly downplays duty. It is assumed that to be more genuine an action has to be done though a motivation based on an emotional tug at the heart stings.

I find this logic baffling. Show me a person who behaves benevolently out of a sense of duty and I know something about their character. Show me a person who behaves benevolently out of an emotional tug at the heart and I know nothing about their character.

Obviously it is best to have the benevolent emotions to go along with the sense of duty, but when it come to getting out of bed in the morning, duty has proven to be a welcome motivator that is a very real source of contentment.

Wednesday, August 11, 2010


Why is it that I can go to bed with my mind fixed on things of God, yet I wake up with no desire to get out of bed and meet with Him?

I ask the question realizing that my daily disciplines are sorely lacking in consistency. I can go days at a stretch without desiring alone time with God. This is not good, nor is it right.

One day, I will regularly pray and read the Word simply through a desire to do so.

I make that declaration because I know from my own past that close communion with the Lord is something that can be attained, though not without cost.

It is not that I feel far from the Lord for I don't. I don't feel far from my earthly father either, we enjoy a great relationship.

The truth is though that He isn't just my Father. As a member of the universal church I am the Bride of Christ and Jesus wants to be closer to me than my wife.

I can easily identify with the truth that God is my benevalent Father. What I have a problem identifying with is the truth that Christ is the benevalent Lover of my soul.

Why don't I desire him as I should?

The issue isn't with Him. It is with me.

Tuesday, August 10, 2010

Where I am spiritually

This past week I have been reading for the 3rd time the biography of Keith Green. If you haven't read "No Compromise - The Life Story of Keith Green", you should.

The first time I read this book it was the fall of 1993 and I was in grade 13. The impact it had on my life was immediate and long lasting, the specifics of which will have to wait for a future post. I read the book again while attending university around 1996.

If one word could sum up my thoughts it would have to be "intense". Keith was a very intense individual and the story of his conversion and subsequent ministry inspire me to live my live with more intensity and with an increased devotion to Jesus.

Before you can walk with me on my journey forward, you need to understand the place where I am starting from, so let me first answer the question implied by this posting.

Where am I spiritually?

First and foremost I am alive.

I believe with all my heart that Jesus died for my sins and that through his death my spirit has been given life.

Yet so many people are dead spiritually and it greaves me to know that I don't really care. Is that too frank? It must be the truth, because I am not doing much to influence my world for Jesus.

That leads into my second observation.

Though I am alive I have a bad case of laryngitis. I know that Jesus wants to speak through me, but people don't seem to be able to hear my life being lived out. I pray that my life would be a light to those spiritually dead around me, but it seems that my light is not intense enough to cut through the darkness.

There is that word again … intense.

How can I increase their my spiritual intensity?

If I think about a flashlight, the obvious answer is that the batteries need to be fully charged to obtain the maximum intensity of light.

I guess that is what I am doing when I read the Word of God and other Christian literature. I am recharging my spirit. Intellectually this makes sense, but also emotionally I can feel this transformation, as my thoughts and motivations are becoming more centered on Christian ministry.

There is a second step though. I need to turn on the light.

Obvious as this may be, this is the hardest step to take.

It is so easy to keep my light tucked away in a pocket, only to pull it out when I need to minister to someone in crisis. It is much harder to shine the light of Jesus to people who are perfectly happy with theirs lives and do not appreciate the light. In fact their spirit's despise it.

This is what I struggle with every day. How do I let Jesus shine though me? Every day, every hour.

I need an answer. And not one that is trite. An answer that is worthy of the one who saved my soul.

Monday, August 09, 2010

Forever Family Day, and my reasons for this blog

Today August 9th 2010, is packed with meaning. It was this day three years ago that my wife and I adopted our precious twin baby girls. The girls have been the source of so much joy in our lives and it is impossible to imagine life without them.

As each year goes by I am realizing that the time of childhood innocence is so fleeting. It seems like yesterday that we were packing our bags for China. This realization also has me contemplating again my role as father to them. The time that I have left to mold godly character in them is so short, and when I think about all the ways in which I fail to live up to the Christian standard I have set for myself, I know that I need to sharpen my own character

The reasons for this blog are twofold. First it is meant to be a record for my children so that they can know who their earthy father is/was. Second it is meant to be a journal of sorts through which I can pour out my thoughts and prayers. It is my intention that it will be personal in nature, since I have no interest in simply reciting the days events. As a man I find it difficult to express my feeling orally, so perhaps this blog might become a much needed outlet for me.