ts-7000
[Top] [All Lists]

Re: [ts-7000] PC104 16-bit confusion...

To:
Subject: Re: [ts-7000] PC104 16-bit confusion...
From: "Don W. Carr" <>
Date: Sun, 4 Feb 2007 08:41:46 -0600
Yes, I recall hearing that it does exactly that. It is an 8 bit interface to the PC-104, but will automatically break up a 16 bit read into two 8 bit reads. I just stuck with 8 bit reads and writes. Don.

On 2/3/07, richw42 <> wrote:

I'm trying to understand how to do 16-bit transfers on the TS-7250
PC104 bus, but it doesn't seem to be happpening. Instead, I get two
cycles, apparently 8 bits each. The pair is a little faster, though.

When I run the program below, I see four cycles on each of IOR#,
MEMR#, IOW#, and MEMW#, with somewhat confusing (to me) signals on
BHE#. Here's what I see:

IOR# cycles
1 BHE#=0 A0=0
2 BHE#=0 A0=1
3 BHE#=0 A0=0
4 BHE#=0 A0=1

This is what I would expect, except for there being two cycles for the
16-bit transfer. By the way, A1 is always zero.

MEMR# cyces look about the same, except iirc faster.

IOWE# and MEMW# cycles:
1 BHE#=1 A0=0
2 BHE#=1 A0=1
3 BHE#=1 A0=0
4 BHE#=0 A0=1

This BHE# setting seems to make no sense.

What am I missing?

Here's the source code, with some comments and error checking removed:
(someone may recognize their code as my template)

#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/mman.h>

static volatile unsigned char *pc104_io8;
static volatile unsigned short *pc104_io16;
static volatile unsigned char *pc104_mem8;
static volatile unsigned short *pc104_mem16;

/********************************************************************/

int main(int argc, char *argv[])
{
int size = getpagesize();
printf("Page Size = %d\n", size);

int fd = open("/dev/mem", O_RDWR|O_SYNC);

pc104_io8 = mmap(0, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd,
0x11E00000);
pc104_io16 = mmap(0, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd,
0x21E00000);
pc104_mem8 = mmap(0, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd,
0x11a00000);
pc104_mem16 = mmap(0, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd,
0x21a00000);

while (1) // Now once a second
{
char c;
short s;
sleep(1);
c = *pc104_io8;
c = *(pc104_io8+1);
s = *pc104_io16;
c = *pc104_mem8;
c = *(pc104_mem8+1);
s = *pc104_mem16;
*pc104_io8 = c;
*(pc104_io8+1) = c;
*pc104_io16 = s;
*pc104_mem8 = c;
*(pc104_mem8+1) = c;
*pc104_mem16 = s;
}
}




--
Dr. Don W. Carr
J. G. Montenegro 2258
Guadalajara, Mexico
+52-333-630-0704
+52-333-836-4500 ext 2930 __._,_.___

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