Why do you need a series resistor?
What is the correct series resistance to use when driving an LED?
These are frequently asked questions.
One possible answer is: You do not need a series resistor.
The proper answer is: A series resistor is required to limit the current through the LED and...
What is Structured Programming?
Over the years structured programming has come to mean different things to different people. It could refer to coding style, variable naming convention, modular programming, use of custom libraries and header files, object oriented programming, or how to...
Finding the Largest Member in an Array
As an example on program development using Structured Programming techniques, we will create an algorithm for finding the largest number in an array of numbers.
The first step is to create a flowchart. Pseudocode can be used instead of flowcharts or they...
Using the I2C library to control 2x16 LCD Module, and other things
The Onion2 Maker Kit came with a backlit 2x16 LCD module with I2C interface.
The I2C LCD Example is completely documented here. I will simply summarize the steps required to get this up and running.
The LCD module...
How to send text data over the UART TX Data line, and other things
When developing an embedded microcontroller (MCU) system it is essential to be able to monitor the status and progress of your code for debugging purposes. In addition, you may want a permanent 2-line x 16-character Liquid...
If you have managed to successfully setup your Omega2 as described in Part 1 of this series, here is where the fun begins.
The goal when getting started on a new microcontroller system is to:
get the controller to flash an LED,
become familiar with the IDE, the Integrated Development...
Over the next few blogs and days I will delve into some simple programming examples on the Omega2 single chip computer.
Omega2 and Omega2+ are made by Onion. These replace the original Onion which was introduced in 2015.
Here are the basic hardware specs:
This is the final part of my four-part DIY Pong blog.
We now have all the ingredients in place to wrap this up. We have bats and a ball. Let's play ball.
Single Player Mode
To make things simple, let's begin with a single player game. We detect when the ball hits the paddle by ANDing the ball...
The ball is the tricky part.
The vertical motion of the ball is constrained by the floor and ceiling of the video screen. This is the easy part.
A triangular waveform generator is used to output an analog voltage. This is fed to the gate of an FET (field effect transistor) used as a variable...
The two paddles (or bats) are identical. The paddle is dead simple. For each paddle, we need to define its horizontal position on the screen and how thick it is. These two values are fixed and will be set by two monostable multivibrators. Then we need to show its current vertical...
Remember the old TV Pong game? This is one of the early video games where you played a simulated version of ping-pong on a video screen.
Video Game Demo
We built this on a breadboard for the fun of it when I was in grad school. Why would I want to do this again? Because it is...
This tutorial introduces and explains the fundamentals of how flip-flops work.
There are four basic types of flip-flops as follows:
Basic Logic Gates
Firstly, let us review basic logic functions and gates:
U1, U2 and U3 show...
Clock synchronization to the midday sun
Synchronization to the midday sun is turning out to be an excellent exercise in engineering design.
Here are the three steps:
1) Begin with a concept, theory and initial design.
2) Collect data to support and verify the theory.
3) Test, test and test...
I can't believe that it has been exactly one year since I last posted on my 10000 Year Clock.
Well I finally got the low power LCD and put together a prototype of the clock. So progress is being made.
The LCD is a 40-pin 4-digit module 40LCD from Futurlec.
The LCD driver is MAXIM...
I was postponing this post until I got a chance to acquire and test a 2x20 3V LCD.
I have not gotten one as yet so the test will have to wait.
I wanted the display to show the date and time like this:
However, when Wednesday comes around, I need 18 characters across, hence the need for a...
Here is a 24-hr Clock/Calendar project with a twist.
The idea is to create a perpetual clock that will run for 10,000 years without requiring calibration. This idea was inspired by the 10,000 Year Clock project from the Long Now Foundation:
To achieve this goal, I...
You can use your handheld TV remote controller to turn on/off lights, appliances, gadgets, robots, etc.
Here I will show you how you can receive and decode the infra-red (IR) signals transmitted by the controller. This is also an excellent exercise to learn and use the intricate functions of...
Here is my MSP430G2553 LCD Terminal program.
Where would I use something like this?
1) If I am debugging a system and would like to see some internal results I can send ASCII text to a dumb terminal. Can I not use the IDE debugger to trace the code? Many times I am debugging in "real time" and...