ts-7000
[Top] [All Lists]

Re: [ts-7000] DIO Subroutine for TS-7200

To:
Subject: Re: [ts-7000] DIO Subroutine for TS-7200
From: Jim George <>
Date: Sat, 31 Jan 2009 10:37:08 -0700
On the 7250, you can use the sample code they have in the user guide,
which uses mmap on /dev/mem to access the registers that control the
direction and output bits. You can wrap these in a small function, and
it should work. Of course, your program will need root privileges
since only root can open /dev/mem.
-Jim

On Sat, Jan 31, 2009 at 9:17 AM, Matthieu Crapet <> wrote:
> Hi,
>
> Since 2.6.27 you can use sysfs entries for GPIOs:
>
> # echo 8 >/sys/class/gpio/export // DIO_0 = Port B, bit 0
> # echo 9 >/sys/class/gpio/export // DIO_1 = Port B, bit 1
> # echo 10 >/sys/class/gpio/export // DIO_2 = Port B, bit 2
> # echo 11 >/sys/class/gpio/export // DIO_3 = Port B, bit 3
> # echo 12 >/sys/class/gpio/export // DIO_4 = Port B, bit 4
> # echo 13 >/sys/class/gpio/export // DIO_5 = Port B, bit 5
> # echo 14 >/sys/class/gpio/export // DIO_6 = Port B, bit 6 (could have been
> reserved for I2C)
> # echo 15 >/sys/class/gpio/export // DIO_7 = Port B, bit 7 (could have been
> reserved for I2C)
> # echo 17 >/sys/class/gpio/export // DIO_8 = Port F, bit 1
>
> For example:
>
> # echo "out" >/sys/class/gpio/gpio8/direction
> # echo "1" >/sys/class/gpio/gpio8/value
>
> Matthieu
>
> bonjelo2000 wrote:
>>
>> Hi,
>>
>> Is anyone aware of a C language subroutine for the DIO ports on the TS-
>> 7200. I would like to set direction and receive/set HI/LOW status on
>> each of the 9 DIO1 header pins with a simple call in C"
>>
>> Thanks
>>
>>
>
> 

------------------------------------

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/

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU