hi all
I am trying to use PC104 on ts7250 to only output some data, but i
can't , i got tired from trying it, when i send 0xff to PC104, it
makes one of data lines 3.2 v and the others around 0.8 , and this
value not considered as logic '1' by any interfacing circuits, the
code i used is the following
#include<unistd.h>
#include<sys/types.h>
#include<sys/mman.h>
#include<stdio.h>
#include<fcntl.h>
#include<string.h>
int main()
{
volatile unsigned char *P1DR,*P2DR;
unsigned char *start;
int fd = open("/dev/mem", O_RDWR);
start = mmap(0, getpagesize(), PROT_READ|PROT_WRITE, MAP_SHARED,
fd, 0x11c00000);
P1DR = (unsigned char *)(start + 0x01); // port 1 address
*P1DR=0xff;//make port 1 all ones
close(fd);
return 0;
}
i have compiled this successfully using root permissions , please any
one have an idea about a solution , don't hesitate to write to me
thanks in advance
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/
|