Computer Magic
Software Design Just For You

Crystalfontz LCD – 635 on FreeBSD and OpenSolaris

I have recently gotten a hold of a CFA 635 LCD + Keypad device. Very slick. I was doing some work with it and wanted to use a unix OS to drive the device for some custom work. I ran into a couple minor things when getting the device setup.

1) It works great in windows, just use the USB driver from the crystalfontz website.
2) It works great in FreeBSD (v 6.3 +) but you need to load the kernel module (kldload uftdi or add uftdi_load=”YES” to the /boot/loader.conf file). See below for patch to allow examples to compile.
3) Works great in OpenSolaris if you update to the dev version. I couldn’t find the uftdi (SUNWuftdi package) in the standard 0906 install until I updated to the current dev version (b128+). I didn’t look hard though. After install reboot and you are golden.

In both unix systems, the device would be detected and light up and even get devices to show up in the /dev area. This was confusing at first because they were the wrong devices. You need the uftdi driver loaded and then it loads different/correct devices and it works like a charm.

Here is where it detected properly on my installs.
Freebsd: /dev/ttyU0
Opensolaris: /dev/term/0

I put this down because I had trouble finding this information out on the net and in the crystalfontz forums. There is lots of info for Linux/Win, but less for Unix.

FreeBSD Patch
FreeBSD is missing some entries in the termios.h file. Here are the lines you can add to your code (include/serial.h is recommended) if you are compiling the crystalfontz examples on freebsd. I used the ifndef around each so that it wouldn’t re-declare if it was present so it should be safe to put this in your code even if you are running on a system where they are defined.

#ifndef OFILL
#define OFILL 00000100
#ifndef OFDEL
#define OFDEL 00000200
#ifndef NLDLY
#define NLDLY 00001400
#ifndef TABDLY
#define TABDLY 00006000
#ifndef CRDLY
#define CRDLY 00030000
#ifndef FFDLY
#define FFDLY 00040000
#ifndef BSDLY
#define BSDLY 00100000
#ifndef VTDLY
#define VTDLY 00200000

Comments are closed.

Home | My Blog | Products | Edumed | JParks Design | About Us | Portfolio | Services | Location | Contact Us | Embedded Python | College Courses | Quick Scan | Web Spy | EZ Auction | Web Hosting
This page has been viewed 533805 times.

Copyright © 2005 Computer Magic And Software Design
(360) 417-6844
computer magic