ts-7000
[Top] [All Lists]

[ts-7000] TS-7260 DIO2 programming help

To:
Subject: [ts-7000] TS-7260 DIO2 programming help
From: "pdaderko" <>
Date: Thu, 01 Jun 2006 17:29:09 -0000
Hey,

First post here, but I've been lurking here for a while (all of my
other ?'s have been answered by searching)... anyway, I'm using the
DIO ports to interface with stepper motors using a stepper motor
driver circuit I built.

I'm able to control them with no problems using DIO1, except when
they're not configured as outputs (during boot), it causes problems
because bits 0 through 3 are pulled up with a 4.7k resistor, which
partially energizes my circuit.  This isn't a problem with the rest of
the DIO ports since they're pulled up by a 100k resistor.  The layout
of the connector is more convenient for my cable than the LCD
connector, so I'd prefer to use DIO2 over the LCD connector.  My
problem is that I can't control the DIO2 outputs.

I'm guessing that it has something to do with the TS-XDIO, which I
believe also shares the connector, but I have the SD card slot, so
AFAIK my TS-XDIO is unavailable.

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.

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,

Pat







------------------------ Yahoo! Groups Sponsor --------------------~-->
Home is just a click away.  Make Yahoo! your home page now.
http://us.click.yahoo.com/DHchtC/3FxNAA/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