Chip Programming

CONSIDER THIS

Let’s try a very simple exercise. I want a micro-controller turn a LED light ON for 200ms and turn it OFF for 200ms, then repeat indefinitely. Simple, right? Not really.

The micro-controller first needs to be told what to do and in order to do that, we need to understand its language or it understands us. So, we use a high level language such as ‘C’ to write the program. Then we use a compiler to translate the program into a format the micro-controller can understand.

THE C LANGUAGE

A sample code from 105 lines of the programming language. Although it looked very simple to a lot of people, it was the opposite for me. One look at the lines, you’d basically more or less, in a sense, understood what is going on.

THE ASSEMBLY LANGUAGE

This is just a sample I picked out from 242 lines of code. It is very different from the C language. The Assembly code is a low level language for those who are very familiar with the processor and its architecture. If the next micro-controller you use is different, you would need to learn again. Not by much but you’d need to learn. I gave up in Uni when it took me hours to come up with lines and lines of codes to get a LED blink.

THE FLOWCODE SOFTWARE

The Flowcode software from Matrix TSL uses a very different approach, which is termed as Graphical Programming. MATRIX TSL, is a UK based company which specialises in Education, Training and support to Industrial Engineering on all aspects of mircocontrollers.

Unlike the Arduino, Flowcode was easier for me to grasp its concept and quickly learn about chip programming, overcoming my disadvantage of understanding the C programming language. Though at the back of it all, it is really running on C. For those who are familiar with both C and Assembly, this software allows you to enter your custom code as well. The micro-controller I am using is Microchip PICs.

What I like about Flowcode is that it is very easy to adapt and change things especially when you need to use a different chip of the same family. Since I am working on this alone, getting help is not easy as my programming style baffles a lot of people. Eventually, things do get done. The latest Flowcode on the market is version 9 while I am at version 6. I had to upgrade myself from version 3 because it had a more advanced RS-232 serial communication function. Now, Flowcode is even available for Atmel and Arduinos. So, do download their trial demo and see for yourself.

Well, hey, it took me less than 5 minutes to get this program done and have it compiled.
This is the .Hex file as churned out by Flowcode which can then be used by a programer to program it into the microcontroller.

AM I CHEATING?

Right up to now, I still have no knowledge about programming Languages such as C or even understood Assembly coding anymore. I invested into Flowcode to help me save time as during those years, even with the Internet starting up, there was not much help out there. Moreover, there was no one I could one I could turn to because of the area of interest I was into, was so niche. But at the end of the day, I got the results that I wanted.

Cheating? Maybe.