FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP
6343 Discussions

Custom 10bit ADC i2c interface example needed !!!

Altera_Forum
Honored Contributor II
1,304 Views

Hello . I am not xpert on verilog just started using , as my 10bit adc needed i2c slave controller . I am more towards analog ADC low speed sensor interface. I would to interface a output of parallel 10 bit data (d0..d9) , with input port (1) start [ a pulse to start adc conversion ] , (2) output port valid [ to indicate data conversion done , data valid ] to an i2c slave controller . As to provide i2c for the adc ? Would like to do i2c with operation like read/write operation of 2 byte sequential i2c transmission , see attached jpeg example .  

 

I recently found altera cpld example , application notes an494.pdf ( i attached with the code ) . Does anyone have this i2c slave controller example of 10 bit/ or more i2c gpio ? Need help/example on doing the 2 byte sequential read/write or modification of an494 to support it ? Been trying to change and insert to the code but data rcv/transmit not correct ? Can any one give example ??? 

 

Thx in advance.
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
384 Views

The good thing with the AN494 code, it's pretty short, the bad thing, it's not very structurized, the interface states are more or less hidden in a combination of several bits. For your application, you have to supplement multiple bytes read operation, which requires at least an extended input register and possibly an additional state bit. ADC start could be wired to any I2C write, if you don't need to write other data.

0 Kudos
Altera_Forum
Honored Contributor II
384 Views

Hello FvM . I made changes to the test bench "test_I2C_GPIO.v" and the slave controller "I2C_GPIO.v" but dont know if it correct ? Can u run and looh at the simulation to see if it follow i2c ?  

 

The simulation runs ok but first time so not that sure ? 

 

Thx in advance.
0 Kudos
Reply