cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
5,605 Views
Registered: ‎09-07-2009

Programming the AD9980 via IIC under Linux

Has anyone successfully been able access the AD9980 registers via IIC under Linux on the ML507

I have a mapped a new IIC core to the pins, and am trying to read some registers, but have had little success.

 

thanks in advance

Tags (4)
0 Kudos
2 Replies
Highlighted
Xilinx Employee
Xilinx Employee
5,599 Views
Registered: ‎09-10-2008

I have not tested the I2C driver with that device on the board.

 

Do you know if the I2C EEPROM on the board is working as that would establish a baseline that the I2C core is working and and the driver?

 

I test this on the Ml507 in automation and have info about it on the wiki if you need more info.

 

Thanks.

0 Kudos
Contributor
Contributor
5,493 Views
Registered: ‎09-24-2009

Hello,

 

 

I found some compile error messages, where can i get  i2c.h, i2c-dev.h, buffDump.h  files for testing IC2 device on ML507.

 

 

example from: 

Using the GPIO Driver from a User Space Application

http://xilinx.wikidot.com/osl-gpio-driver

 

kha@controldev32:~/tmp/i2c$ make
make -C O.linux-x86 -f ../Makefile TOP=./.. T_A=linux-x86 install
make[1]: Entering directory `/home/kha/tmp/i2c/O.linux-x86'
/usr/bin/gcc -c   -D_POSIX_C_SOURCE=199506L -D_POSIX_THREADS -D_XOPEN_SOURCE=500           -D_X86_  -DUNIX  -D_BSD_SOURCE -Dlinux  -D_REENTRANT -ansi   -O3   -Wall      -m32     -g  -I. -I../O.Common -I. -I.. -I./../include/os/Linux -I./../include   -I/home/kha/epics/base-3.14.10/include/os/Linux -I/home/kha/epics/base-3.14.10/include        ../i2c_test.c
../i2c_test.c:12:17: error: i2c.h: No such file or directory
../i2c_test.c:13:21: error: i2c-dev.h: No such file or directory
../i2c_test.c:14:22: error: buffDump.h: No such file or directory
../i2c_test.c: In function ‘main’:
../i2c_test.c:54: warning: implicit declaration of function ‘ioctl’
../i2c_test.c:54: error: ‘I2C_SLAVE’ undeclared (first use in this function)
../i2c_test.c:54: error: (Each undeclared identifier is reported only once
../i2c_test.c:54: error: for each function it appears in.)
../i2c_test.c:70: warning: implicit declaration of function ‘write’
../i2c_test.c:77: warning: implicit declaration of function ‘read’
../i2c_test.c:85: warning: implicit declaration of function ‘buffDump’
../i2c_test.c:20: warning: unused variable ‘count’
make[1]: *** [i2c_test.o] Error 1
make[1]: Leaving directory `/home/kha/tmp/i2c/O.linux-x86'
make: *** [install.linux-x86] Error 2

 

 

 

Thanks,

Kiman,

0 Kudos