Archive for April, 2005

Testing C Interrupts using Breakpoints in GPSIM

Tuesday, April 26th, 2005

Well, well, well, here we are again. I will be continuing with my new found appreciation of Small Device C Compiler (SDCC) and showing you how to handle interrupts using C-- specifically, the TMR0 interrupt. I will also show you how to simulate this using gpsim, thus learning how to set breakpoints in your code and use the stopwatch feature in gpsim. What's really great, is if you are new to PIC programming and are having a difficulty understanding the concept of the Timer module, interrupts, and prescaler values and what they mean, using GPSIM gives you a realistic visual understanding without having to build a circuit. Pretty handy dandy.
Read the rest of this entry »

Programming PIC’s in Linux using C with SDCC

Monday, April 25th, 2005

In my last article, Programming PIC Microcontrollers in Linux, I talked about using using gputils and gpsim to assemble and simulate a basic PIC program. After writing this article, I recieved an email from Martyn Welch regarding the article he recently wrote: Installing and using SDCC on Linux. SDCCs a free C compiler for several small devices, including the PIC microcontroller.
Read the rest of this entry »

Gnome Programming: Using LibGlade with Anjuta/Glade

Friday, April 22nd, 2005

Note: This tutorial is no longer current. A new, more up-to-date and in-depth tutorial has been written: Tutorial: Simple Gnome Application Using libglade and C/GTK+

Read the rest of this entry »

Gnome Programming: Getting Started with Anjuta/Glade

Wednesday, April 20th, 2005

Note: This tutorial is no longer current. A new, more up-to-date and in-depth tutorial has been written: Tutorial: Simple Gnome Application Using libglade and C/GTK+


Read the rest of this entry »

PHP Format Any Time/Date for MySQL

Wednesday, April 20th, 2005

Many people find the act of formatting a date or time for input into a MySQL database tedious. It's actually very simple. Here is a function that will take a timestamp value such as time() or a human readable string and format it for MySQL. MySQL format is: 'YYYY-MM-DD HH:MM:SS'
Read the rest of this entry »

Intro to Programming PIC Microcontrollers in Linux

Tuesday, April 19th, 2005

PIC Programming on Linux

I first tried switching to Linux back in 1996-- however, grew frustrated after 2 agonizing weeks of trying to configure ppp to connect to the internet on my speedy 28.8 modem. I continued using, and developting software for, Windows. I grew more and more frustrated with Windows until I reached the breaking point with the new spyware/virus epidemic. I once again attempted the switch to Linux, and to my delight, found it quite painless. I found the install to be VERYeasy and all the drivers and applications I would need were free and readily available-- if not already built into my Linux distribution (at the time that was Fedora Core 1, and is now Fedora Core 3).

Read the rest of this entry »

PHP Zip Code Range and Distance Calculation

Tuesday, April 19th, 2005

Planet Source Code Superior Code Winner!

This is a PHP class to do various calculations with zip codes. It's primary purposes are to calculate the distance between two zip codes and to extract all the zip codes that are within a range of a given zip code. All calculations are based on lattitude and longitude coordinates stored in the database. Included is a class file, demonstration file, and the sql files required to create and populate the MySQL tables.
Read the rest of this entry »

PHP MySQL Database Class

Tuesday, April 19th, 2005

A class for very basic MySQL database connectivity. Written to reduce redundant code in my own projects aswell as aid in debugging and error reporting during the developement phase. Currently connects to a database, execute external files containing SQL commands, insert and update from an array of key => value pairs, insert and update with sql command, query (one result), query (multiple rows), and dump a select query to a table. The zip file contains the class aswell as a demonstration script. Read the rest of this entry »

PHP Authorize.net AIM Interfacing Class

Tuesday, April 19th, 2005

Provides a simplified interface the the authorize.net AIM payment gateway. Allows all the control and flexibility to be in the hands of the PHP developer (you). Uses cURL and SSL. The zip file includes the class to interface with authorize.net as well as a demonstration script on using the file. Read the rest of this entry »

PHP Paypal IPN Integration Class

Tuesday, April 19th, 2005

This free PHP script provides a simple method to interface with paypal and the paypal Instant Payment Notification (IPN) system. It is not a complete system but a single PHP class allowing the PHP developer more control. Included in the zip file is a demonstration PHP script called paypal.php which shows the basic usage of the class.
Read the rest of this entry »