ts-7000
[Top] [All Lists]

Re: [ts-7000] Dobts about ts-dio24

To:
Subject: Re: [ts-7000] Dobts about ts-dio24
From: justin wilson <>
Date: Tue, 3 Mar 2009 18:14:41 -0800 (PST)
I haven't tried it, but you should be able to..  On one dio24, set JP1 and JP2 both to off.  On the second dio24 set JP1 to on, and JP2 to off. Stack them on the board.

Then access the first dio24 at 0x11E00100
and the secound at 0x11E00108

I would just mmap 0x11E00000, and then access both boards by defining 2 different base addresses.

DIO24_BASE0 = 0x0100
DIO24_BASE1 = 0x0108

Then just use your mmap pointer plus your base DIO24_BASE to access which ever board you need.

Hope this helps,
Justin

Here are some snippets from what I use for my one board, much of this code came from help from others on this group:

//PC/104 8 bit read/write to I/O
static volatile unsigned char *pc104_start;
static volatile unsigned char *dio24_r0_Identifier;
static volatile unsigned char *dio24_r1_Reserved;
static volatile unsigned char *dio24_r2_JumperStatus;
static volatile unsigned char *dio24_r3_InteruptControl;
static volatile unsigned char *dio24_r4_DDR;
static volatile unsigned char *dio24_r5_DRA;
static volatile unsigned char *dio24_r6_DRB;
static volatile unsigned char *dio24_r7_DRC;
static int fd;

//Pick the correct base depending on jumper settings
#define DIO24_BASE (0x0100) //jp1 and jp2 off
//#define DIO24_BASE (0x0108) //jp1 on and jp2 off
//#define DIO24_BASE (0x0110)
//#define DIO24_BASE (0x0118)
  fd = open("/dev/mem", O_RDWR|O_SYNC);
  if (fd == -1)
  {
    perror("open /dev/mem");
    exit(1);
  }

  int size = getpagesize();
  //printf("Page Size = %d\n", size);

  pc104_start = mmap(0, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0x11E00000);

  if (pc104_start == MAP_FAILED)
  {
    perror("mmap");
    exit(1);
  }

  // Assign the addresses for all of the registers
  dio24_r0_Identifier = (unsigned char *) (pc104_start + DIO24_BASE + 0);
  //dio24_r1_Reserved = (unsigned char *) (pc104_start + DIO24_BASE + 1);
  //dio24_r2_JumperStatus = (unsigned char *) (pc104_start + DIO24_BASE + 2);
  //dio24_r3_InteruptControl = (unsigned char *) (pc104_start + DIO24_BASE + 3);
  dio24_r4_DDR = (unsigned char *) (pc104_start + DIO24_BASE + 4);
  //dio24_r5_DRA = (unsigned char *) (pc104_start + DIO24_BASE + 5);
  dio24_r6_DRB = (unsigned char *) (pc104_start + DIO24_BASE + 6);
  //dio24_r7_DRC = (unsigned char *) (pc104_start + DIO24_BASE + 7);

--- On Mon, 2/9/09, gnloch <> wrote:

From: gnloch <>
Subject: [ts-7000] Dobts about ts-dio24
To:
Date: Monday, February 9, 2009, 12:45 PM

Hi all...

Anybody knows if is possible to connect 2 ts-dio24 to a ts-7000 board?

If is possible, how to do it?

thx




__._,_.___


Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: =Email Delivery: Digest | m("yahoogroups.com?subject","ts-7000-fullfeatured");=Change Delivery Format: Fully Featured">Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | =Unsubscribe

__,_._,___
<Prev in Thread] Current Thread [Next in Thread>
  • Re: [ts-7000] Dobts about ts-dio24, justin wilson <=
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