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