Skip navigation.
Home
Tech for Linux Users
Welcome to warped logic. This site aims to help those electronics hobbyists whom wish to use the Linux operating system in computer interfacing projects, electronic circuit development and microcontroller programming.

SDCC library for controlling a 16x2 LCD display from a PIC.

Embedded Systems

So, you have a small LCD character display, with a Hitachi HD44780 compatible controller and a PIC. You want to control the LCD display from the PIC. There seems to be quite a bit of sample code on the web, however, it seems to either have been written or an alternative microcontroller or in assembly. Well, here's a very basic library for writing to the controller from SDCC.

This library provides a wrapper over the configuration options provided by the Hitachi display; it provides a number of defines to make it easier to select individual options; a basic initialisation function and some very basic comands to send commands and data.

Using PicStart Plus under Linux

Electronics

Microcontroller development under Linux at times is still a little problematic. Many applications exist to enable compiling of C, assembly language and for programming many different microcontrollers. Here we will consider how to program Microchip's PIC family of microcontrollers.

Installing and using SDCC on Linux

Embedded Systems

SDCC, the Small Device C Compiler, is an open source C compiler for a number of microcontrollers and small platforms. This document describes how to get SDCC installed and working under Linux, provides an example code and a description of how to compile it for the 16f877, 16f84 and 18f252.

Using LAMP

Web Technologies

LAMP is the name given to a program stack that is commonly used for developing dynamic web-pages. These applications being the GNU/Linux operating System, Apache webserver, MySQL database and either PHP, Perl or Python.

So what are dynamic web-pages and how do they differ from any other webpage? Web pages can be thought of as either being static or dynamic. Static web-pages are those where the completed document is stored in a file and is merely presented to the client by the webserver. A dynamic page is one whos content is constructed on the fly in response to a request by a client. The basic process thus:

A JDM Programmer Variant

Electronics

I have found the the low-cost programmer provided in schematic form by Jaakko Hyvätti (which is based on the jdm84v23 by Jens Madsen), though slow, to be acceptable for my needs. I currently have the device working with Picprog on a breadboard, however I would like a much more solid version ;-)

I have decided, rather than placing a chip holder on the board, to provide a header with the required control lines. This can then either be plugged onto a similar header for in-circuit programming, or into a patch board as shown in the picture below - allowing different PIC layouts to be easily programmed, without excessively complicated wiring.

Programming PIC Microcontrollers under Linux

Electronics

Programming microcontrollers under Linux can be some what of a complicated task. The manufacturers of microcontrollers generally sell tools and provide software to program their devices, but these tools are produced only for one operating system. This operating system is not Linux...

To add to the problem further many of the tools that they sell, whilst being reasonably feature rich (allowing for in-circuit debugging and alike), they are also quite pricey. Many alternative low cost designs have sprung up offering varying features, device compatibility and cost. Some of these devices have software written to cater to the Linux market, sometimes by the providers themselves, often by other groups and individuals. There are therefore many choices to make, some which will lead to success, others to failure.