I wish to make the Arduino Mega act as a slave on an I2C bus. I want an FPGA to be master. Is this possible? If it is, is it difficult?
Have you checked out the wire library examples in the reference section?
penderam:
I wish to make the Arduino Mega act as a slave on an I2C bus. I want an FPGA to be master. Is this possible? If it is, is it difficult?
Which FPGA it is? If the FPGA Processor has the I2C Bus Logic Circuitry, you can always operate the MEGA as a slave (and also as a Master optionally).
Now, the question is -- do you want to handle them using the Arduino IDE and Wire.h Library? You need to check that the specific processor of the FPGA is also supported by this Platform which supports MEGA.
BTW: Please, specify the Processor type of your FPGA.
The Specific FPGA is a ML605 Xilinx Virtex 6. I can use a soft processor core using microblaze. I would prefer to use the I2C IP Core in the embedded system kit with the microblaze. And just treat the arduino like another peripheral device.
penderam:
The Specific FPGA is a ML605 Xilinx Virtex 6. I can use a soft processor core using microblaze. I would prefer to use the I2C IP Core in the embedded system kit with the microblaze. And just treat the arduino like another peripheral device.
You can program the MEGA using Arduino IDE, and you can also program the ML605 Xilinx Virtex 6 by the development Kit. We have to wait to observe what will be going on between them once they are put into operation using the TWI/IIC/I2C/I2C Bus.
The following diagram taken from the ML605 Xilinx Virtex 6 data sheets clearly indicates that the MEGA could be used as a peripheral device in the TWI/IIC/I2C/I2C Bus.