ts-7000
[Top] [All Lists]

Re: [ts-7000] TS-7260 DIO2 programming help

To:
Subject: Re: [ts-7000] TS-7260 DIO2 programming help
From: Jim Jackson <>
Date: Fri, 2 Jun 2006 11:24:39 +0100 (BST)


On Thu, 1 Jun 2006, pdaderko wrote:

> I'm basing my code on button.c, where for interfacing with DIO1 I use:
> start = mmap(0, getpagesize(), PROT_READ|PROT_WRITE, MAP_SHARED, fd,
> 0x80840000);, PBDR = (unsigned char *)(start + 0x04);, and PBDDR =
> (unsigned char *)(start + 0x14);, then the usual setting of the data
> and direction regs.
>
> For DIO2, from the manual/memory map, I believe I should do: start =
> mmap(0, getpagesize(), PROT_READ|PROT_WRITE, MAP_SHARED, fd,
> 0x12C00000);, PBDR = (unsigned char *)(start + 0x00);, and PBDDR =
> (unsigned char *)(start + 0x01);, but this doesn't work.

you entering for an obfuscated code contest or something :-)

You got a typo....

PBDDR=(unsigned char *)(start + 0x10);

I have a general purpose program for playing around with the dio and lcd
digi ports and the 12 bit ADC option, it's referenced on my ts7200 page at

 http://www.comp.leeds.ac.uk/jj/linux/arm-sbc.html

and is at

 http://www.comp.leeds.ac.uk/jj/linux/adio.tgz

The ts72xx specific stuff is in the c file ts7200io.c

> Does anyone see what I'm doing wrong, or have any example code for
> DIO2?  Is there something I have to do first to disable the TS-XDIO,
> or to tell the board that DIO2 should be standard DIO ports?  Thanks,

cheers
Jim


------------------------ Yahoo! Groups Sponsor --------------------~--> 
You can search right from your browser? It's easy and it's free.  See how.
http://us.click.yahoo.com/_7bhrC/NGxNAA/yQLSAA/CFFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> 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