Get your microcontroller and PC to talk
(and get it done free ‘n’ easy!)
Specifications can dynamically change during the product development cycle. Bosses/clients suddenly approach us with additional requirements, which, however simple, can put us in a fix. One such requirement could be to have a PC based design interface for a standalone microcontroller project.
On many occasions, the required PC software has to just behave like a slave display or to minimally control the microcontroller to do some simple jobs.
Some of us, the embedded C/ASM types, are more used to programming the Microcontroller than the PC. We have been always used to limited memory programming and are very stingy on RAM usage. We prefer learning new microcontrollers and score through volumes of datasheets for hardware and software specifications rather than focussing on Visual programming IDEs for the PC.
There are several reasons for this which includes the cost of such IDEs. Also, the structure of these new languages is different (sometimes very easy) and gives us a jolt when we start using them the first time. Even then, we try to find a way to use them with a need-to-know approach. We may not want to learn the nitty-quitties of the language and want to stay focussed on the job at hand. Having to try out a short-cut method to reach our goal, we often overlook important aspects of the software and end up having a half-baked software which downgrades the great job that we have done at the microcontroller end.
For example, for the above requirement, Visual Basic can be the right candidate. There are scores of information available on how to use Visual Basic or the latest Visual Basic .net to communicate through the COM port. Details on MsComm.ocx flood the internet. Visual C++ also is being used for various such applications. In spite of all these, sometimes, we have to face the fact that , for a Embedded C programmer, these easy visual programming languages, make it a necessity to learn new methods in programming.
Most of us definitely would like to write PC software which
· Communicates with our embedded system
· Provides an interactive interface
· Can be customised to our individual applications
· is easier to write and re-write the same way we write our Embedded code.
· Help debug our design.
A package which saves from the pitfalls encountered by a newbie while helping to write code without much hassle is the need of the hour. The features expected from such a product would be
· C like syntax
· Faster learning curve
· Not too complex in terms of configurations as the requirements may need a simple UI , while having the power to provide future opportunities for an advanced UI.
· Portable to platforms such as Windows, Mac OS and Linux
· Has components and controls to facilitate a good user experience
· Most importantly, has a way to communicate through the COM port
· And why not, it must be open source
Google and other searches yielded results which are much oriented towards VB and VC++. Some die-hard PC programmers had advocated using C, Python and other languages including the Assembly (under DOS) for such requirements. Some of the posts were so excellent that it is irresistible to copy-paste them and start using them directly. However, these demanded one thing: knowledge on various related programming concepts and, may be, hardware. We needed to learn things without much pain, isn’t it? Some could call this a lazy approach, but remember the old saying :
Give the toughest job to the laziest person and you will have a shortest route to complete it.
Posts in a social networking site gave the much-needed answer. One member, Dave, informed about the “Processing” Language.
Processing is a C/C++/Java like language which simplifies major hurdles for people like us who may not be interested to learn all the aspects of a visual programming language, yet, are forced due to project requirements.
The website Processing.org says
“Processing is an open source programming language and environment for people who want to create images, animations, and interactions.”
The website provides volume of useful information. The language reference and learning pages give us quickly the syntax and utility of each of the commands and functions. Each command is explained in a detailed manner with examples.
Many libraries are available for free download helping us to work on
· Video interface
· Networking through the net
· Serial Communication
· Pdf Export
· Arduino interface (great!)
Arduino users can directly control their boards from the Processing environment.
The IDE is so easy to operate and very interactive.
The error messages are more human, like "Syntax error, maybe a missing semicolon?". Interesting isn't it?
When we tested Processing to interface with a standard 8051 microcontroller and a Renesas R8C microcontroller through the serial port, we were delighted to note that , we have found our answer, indeed.
Processing talks with a 8051!
We Gill Instruments Pvt. Ltd. have a requirement for an engineer with a strong expertise and hands on experience in the field of MSP430. Candidates who are willing to relocate in Bangalore can send us their CV on - firstname.lastname@example.org.
To post reply to a comment, click on the 'reply' button attached to each comment. To post a new comment (not a reply to a comment) check out the 'Write a Comment' tab at the top of the comments.
Registering will allow you to participate to the forums on ALL the related sites and give you access to all pdf downloads.