Arduino Teaches Old Coder New Tricks
Because some of the components I was using do not exist in the built-in library, I scoured the Internet for contributed symbols, and in a few cases, I had to design my own symbols. A good source for contributed symbols and footprints is http://gedasymbols.org. For creating your own symbols, see David Weber's Online Symbol Creation Tool at http://EmbeddedToolBox.com. Symbols actually are text files. Figure 3 illustrates a symbol along with a portion of the text file used to draw it. Symbol files are not just an image. They also hold important pin definitions and the name of the footprint file that the gEDA PCB program ultimately will use to represent the component on the circuit board.
Figure 3. Symbol Example 1
A gEDA schematic is a text file interpreted for GUI presentation by gschem, but it also serves as the source for gEDA's PCB program. An intermediary helper program named gsch2pcb is used to prepare the schematic file for use as input to the PCB program. While xgsch2pcb is a GUI version of gsch2pcb for gsch2pcb, I use the gsch2pcb command-line version. For example, given the schematic file vt100lcd84.sch as an input, gsch2pcb creates vt100lcd84.pcb, vt100lcd84.net and vt100lcd84.cmd, all necessary files for PCB creation. gsch2pcb also displays important instructions as part of its command-line text output. To make the process a little easier, I use a file named "project" in the project folder for the current design. Figure 4 shows my project folder for the vt100lcd84 project, the "project" file and the command line with the gsch2pcb command just before execution.
Figure 4. Example of gsch2pcb Project File
It is worth noting that the gEDA suite includes circuit simulation capability (SPICE), enabling virtual design testing. I did not use SPICE with my VT100-LCD project, but see the Resources for this article if you are interested.
Software Design
Now that I had the circuitry designed for the project, it was time for the software. I wrote the software as a simple state machine that parses each character received on a character-by-character basis, meaning that there is no buffer. Characters are handled differently based upon the current state of the machine. If the state is NOTSPECIAL, the character simply is passed to the LCD screen for display. However, if the state is GOTESCAPE, GOTBRACKET or INNUM, the character is processed further. For example, if the state is GOTBRACKET, both an escape and left-bracket character have been received previously, and the current character must be parsed in that context. For illustration, the VT100 sequence for Screen-Clear is \033[2J, and if the current character being parsed was the 2, the state would be GOTBRACKET, and the next state would be INNUM (number collection).
This method of parsing has the advantage of simplicity, which is suitable for the limited-capacity microcontrollers but with the disadvantage of not being able to scroll the screen due to the absence of a buffer holding a copy what is on the screen. See Resources for a copy of the software source. I used Arduino libraries to build the code. Although the source can be compiled using the Arduino IDE, I used Linux make. Using the Arduino libraries makes the project extremely easy to build. Most of the drudgery of low-level code and the bootloader is hidden away within the Arduino libraries, which freed me to focus solely on my project. Even main() is hidden away such that Arduino code contains two required routines: setup() and loop(). Main actually does exist deep in the Arduino directory structure in ~/arduino/arduino-1.0/hardware/arduino/cores/arduino/main.cpp and is automatically linked in at compile time.
Edward Comer is retired from the telecommunications industry, having worked for the real AT&T, BellSouth and Numerex Corp during a 30-year career.
Today’s modular x86 servers are compute-centric, designed as a least common denominator to support a wide range of IT workloads. Those generic, virtualized IT workloads have much different resource optimization requirements than hyperscale and cloud applications. They have resulted in a “one size fits all” enterprise IT architecture that is not optimized for a specific set of IT workloads, and especially not emerging hyperscale workloads, such as web applications, big data, and object storage. In this report, you will learn how shifting the focus from traditional compute-centric IT architectures to an innovative disaggregated fabric-based architecture can optimize and scale your data center.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
| Non-Linux FOSS: Seashore | May 10, 2013 |
| Trying to Tame the Tablet | May 08, 2013 |
| Dart: a New Web Programming Experience | May 07, 2013 |
- RSS Feeds
- New Products
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Drupal Is a Framework: Why Everyone Needs to Understand This
- A Topic for Discussion - Open Source Feature-Richness?
- Home, My Backup Data Center
- Developer Poll
- Dart: a New Web Programming Experience
- May 2013 Issue of Linux Journal: Raspberry Pi
- What's the tweeting protocol?
- Reply to comment | Linux Journal
35 min 56 sec ago - Reply to comment | Linux Journal
1 hour 22 min ago - Web Hosting IQ
2 hours 56 min ago - Thanks for taking the time to
4 hours 33 min ago - Linux is good
6 hours 30 min ago - Reply to comment | Linux Journal
6 hours 48 min ago - Web Hosting IQ
7 hours 18 min ago - Web Hosting IQ
7 hours 18 min ago - Web Hosting IQ
7 hours 19 min ago - Reply to comment | Linux Journal
10 hours 20 min ago



Comments
medical assistant
Medical Assistant programs and medical assistant classes are now online at St. Augustine School of Medical Assistants.
Now offers a nationally accredited and certified medical assistant program online.
St. Augustine School of Medical Assistants is a provider of online medical assistant programs and medical assistant courses.
Thank you for teaching us
Thank you for teaching us this trick. This trick is very useful.
Jasa SEO
You stirred my curiosity
You really did. Never been interested in playing with hardware stuff. Been a web developer for years, never looked into hardware programming and Arduino and stuff like this. Now I want to learn it lol
Good writeup on this, keep up the good work mate
Cheers,
Hosting Dude
I want to learn Arduino
I want to learn Arduino projects. maybe by reading this article can help me. tempo
medical assistant job
medical assistant job description
Check out: medical assistant
Check out: medical assistant job description
Thanks for share this
Thanks for share this article. I think Arduino projects is amazing. berita Indonesia
Nice one
Thanks for sharing your ideas and thoughts, i like your blog and bookmark this blog for further use thanks again…
It didn't take very long to
It didn't take very long to remove the mental cobwebs and get into the elegant simplicity of the Arduino Project. Years ago, when I built microprocessor projects, the underlying system code always was the problem. Before I actually could write my application, I had to develop or adapt systems-level code to interface the application-level code with the underlying hardware. Cleaners London
hello
I discovered your blog so far ... much information to improve our space! So thank you and have a nice day!
voyance en direct
The link to the source code
The link to the source code and design schematics just refers to the google code homepage :)
Nice!
What a great article!
Are you familiar with Instructables.com? They have many Arduino projects. I think this would be a great submission.