TLC549 A/D-Converter communication in C
Hi Folks!
At school we build a temperature gauger. The device is connected to the serial port and uses the TLC549 A/D-Converter. The board layout can be found at http://www.wvss-projekte.de/index.ph...ekte&prj=tmess sorry, it's only in german. Our teacher has made a program for that device, but it's only for windows (runs in wine, too) but I want to program a Linux native version. My problem is, that I don't know, how to communicate with the TCL549 with the Linux (POSIX) functions. I found a kernel modul, but that's not running with the 2.6 Linux Kernel. Another try was with the outb, inb and ioperm functions, which gave me a segmentation fault as root and no connection as normal user. A second try was with the open and fnctl functions. But I don't know how to change the state on specific lines of the serial port. I hope, that someone has a solution for that problem. PS: It's the first time that I make a program on this low level (near the hardware). |
You can use this example to get you started. For more examples, use Google.
|
Thank you for your answer. But in the meantime I already found some code examples and the program I wrote is nearly ready. If it's ready, I'll post the sources here. But it can take a few days, because I'm on a holliday trip ne for 1 week.
|
If you're interested in a library to communicate with the TLC548/549 family of A/D-converters, you can now visit http://sourceforge.net/projects/libtlc54x and get a copy of the library I build to get my device working.
If want to build the temperature gauge from http://www.wvss-projekte.de/index.ph...ekte&prj=tmess you can use the following tool and the library, to get the temperature data. http://www.dopehouse.dyndns.org/Software/T-Mess-Linux The tool shows the temperature in celsius, but it's easy to show it as fahrenheit. You just need to convert celsius to fahrenheit. °F=(°C*(9/5))+32 |
All times are GMT -5. The time now is 02:51 AM. |