Jason,
Thanks for the encouragement. I after just a bit of trial and error, I
think I have a working solution:
1. Use open() to open /dev/port with read/write access
2. Use lseek to position the file pointer to the byte you would like to
read/write. This is the board's base address, plus the byte offset.
3. Use read() or write() as necessary to read or write the desired byte.
>From there, I wrote a quick test program to scan through the ports,
looking for a 'T" that indicates a DIO24 board. As I had
hoped/expected, the test program found the 'T" at offset 0x100, which
matched the board's address (no jumpers).
The B and C ports had all bits set (0xFF), as expected given the pull-up
resistors. I jumpered one of the 'C' bits to ground, reran the program
and found that the byte at 0x107 (i.e. Port C) changed to 0xFe,
indicating an input bit transitioned from high to low, again as
hoped/expected.
Seems like this approach could be easily expanded to reading/writing
multiple bytes in one operation.
I need to investigate further, but if anyone can point me in the right
direction: How is this approach different than using /dev/mem? Other
than the syntax of file I/O vs. Memory Mapped I/O? And single- vs.
multi-byte operations.
Thanks again,
jw
--- In Jason Stahls <> wrote:
>
> On 2/12/2012 5:47 PM, jywmpg wrote:
> > Is it possible to use the TS-DIO24 on an Advantech PCM9562?
> >
> > If so, how would one do that?
> >
> > I installed the board and the computer comes and runs fine, but
there is no indication that the TS-DIO24 is recognized by any of the
systems.
> >
> > Are Advantech kernels drivers required for this? Or it this just
not going to work?
>
> If you can get access to the ISA bus then you're golden, the TS-DIO24
is
> just on the PC104 ISA bus, not using the GPIO's or anything. I don't
> know if TS has a kernel mode driver, but check the files section of
the
> group I think someone uploaded one there, but you don't have to use
> kernel drivers.
>
> --
> Jason Stahls
>
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|