ts-7000
[Top] [All Lists]

[ts-7000] DIO2 port configuration

To:
Subject: [ts-7000] DIO2 port configuration
From: "lazo93600" <>
Date: Thu, 26 Mar 2009 14:50:53 -0000
Good morning,
 
We're developping a robot and we use a TS7260 to control it. 
We have a problem : we would like to use the DIO2 port like a simple input / 
output port.
We don't manage to configure the "MODE 0" on the fpga, even by using function 
provided by 
the card documentation.
 
This a code we used to set the mode 0 :
 

int main(void)
{
     unsigned char *start;
     int i;
  fd = open("/dev/mem", O_RDWR|O_SYNC);
     start = mmap(0, getpagesize(), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 
0x12C00000);
  BASE0 = (unsigned char *)(start + 0x00);  //port BASE0;
  BASE1 = (unsigned char *)(start + 0x01);     // port BASE1;
     BASE2 = (unsigned char *)(start + 0x02);     // port BASE2;
     BASE3 = (unsigned char *)(start + 0x03);     // port BASE3;
  
 

   *BASE0 = 0x0f; // or 0x3f should be enough ?

  printf("%x\n",*BASE0);
  printf("%x\n",*BASE1);
  printf("%x\n",*BASE2);
  printf("%x\n",*BASE3);
     
  return 0;
  
}
 
 
We have an other question :
 
We tried to get the value in the base0 register and base2 register. Each time 
we executed the code, these two 
value changed (0xFF or 0xBF). It would be nice if you could give us a reason.
 
Thank you for have a look on a our mail, have a nice day.



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

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