- From: Sagar Behere <sagar_behere_at_yahoo.com>
- Date: Sun, 7 Jul 2002 01:35:30 -0700 (PDT)
Hi all,
I am a student of mechanical engg. trying to
control a robotic arm through linux, using a stepper
motor.
After some research, I managed to make an isa card
with a single 8255 chip on board ( base address 280H,
with consecutive addresses for control and ports A,B
and C)
I want to do the following...have a kernel module that
will send appropriate signals to the io ports, so that
I'll eventually be able to get +5V or 0V at the
desired output pins of the card. This will act as
control signals for the stepper motor driving
circuitry.
A user space program will then talk to the
driver, telling it which o/p pins should be
activated, depending on motion desired.
I don't know ANYthing about programming and not much
about computers, so I read a book about C, titled "The
C programming language", 2nd edition, but KERNINGHAN
and RITCHIE. Then I read some chapters of the Linux
Kernel Module Programming Guide and after much effort
made a driver for the 8255 chip, which worked.
But I started facing problems because the
program oftem made timing errors while reading the
encoder or when sending o/p signals.
Someone told me that I'd need to use a real time
operating system. So I patched kernel 2.4.17 with the
RTAI 24.1.9 patch. But after nearly 3 weeks of
struggle, I realised that I still haven't understood
the first thing about programming RTAI. Also, the
kernel sources didin't make much sense even after
reading K&R :-(
I then came across COMEDI.I noticed that when I
modprobe'd its 8255 driver, it also loaded the RTAI
module. So it seems that it does support real time.
But so far what I've done is by pure chance. It's like
groping along in the dark.So I'd like someone to
clarify if
1) I'm going along in the right direction.
OR
2) I'm nowhere near to what I should do and I've
wasted
efforts barking up the wrong tree.
However, assuming that I've done the right thing so
far....
1) How should I proceed ?
2) If the 8255 driver is indeed what I need, how do I
write a user program that will plug into that module ?
3) Above all, how should I take advantage of the real
time capabilities of that driver ?
i installed comedilib-0.7.18 and I also have something
called "comedi_examples.tar.gz" and
"realtime_comedi_examples.tgz". I didin't understand
single line in those examples :-(
The Documentation is just a bunch of functions
which I didin't understand either :-(((((((((((
Can someone tell me how to do this ? Even if you can't
tell me much, it'll be great if someone at least tells
me how to proceed...like...what stuff to read and what
more knowledget to acquire.
I am determined to get this working. If
someone will just give me a pointer in the right
direction, I am willing to pull all-nighters and work
out the rest on my own.
My computer;s configuration is as follows
Pentium 90Mhz, 16 Mb of RAM, 1 Gb harddisk
I am running debian linux ( 2.2 R3 )with the 2.4.17
kernel, and the necessary patches and upgrades to make
it work, and the RTAI 24.1.9 kernel.
Is this configuration enough ? If necessary, I can buy
a new computer with the following configuration
Celeron 266Mhz, 64Mb ram and 3.2 Gb harddisk
Will THAT be enough ?
Stay Free,
Sagar
__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com
Received on 2002-07-07Z07:35:30