Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers

Cyclone 3 I2C

Altera_Forum
Honored Contributor II
1,275 Views

Hi, 

 

I had a question about I2C on the Cyclone III. I have a design that uses some constants I would like to be able to change from a PC in real time. Is it possible to issue commands over the I2C bus that change internal RAM on the FPGA? Or is there a better way to do what I'm trying to do. 

 

Thanks, 

Andrew
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
548 Views

hi andrew, 

 

how will you be interfacing I2C to your PC? 

 

can you switch your design to use a UART rather than I2C? most computers have a serial port or can have one with a cheap USB interface. you could then issue commands from a serial terminal on your PC to your CIII. 

 

on the FPGA you could use a UART core or you could use NIOS and include a UART. if you use a UART core you'll need to write some HDL to interpret the incoming data, if you use NIOS you could write C to do the same thing.
0 Kudos
Altera_Forum
Honored Contributor II
548 Views

Well, the interface to the PC is actually through a USB controller (separate IC) and the USB controller has an I2C master on it that could talk to the FPGA. The USB controller also has UART so I suppose I could try that. Seemed like overkill to change like 16 bits of data though. Would I2C not work for this? 

 

Thanks, 

Andrew
0 Kudos
Altera_Forum
Honored Contributor II
548 Views

ok so you do have I2C access from a PC, cool. i've used both I2C and UART in the microcontroller world but only UART in FPGA. i haven't looked at the logic usage between the two protocols but i think that UART is simpler which is why i suggested it, along with most PCs being able to interface with it. you should be able to use I2C for your application.

0 Kudos
Altera_Forum
Honored Contributor II
548 Views

Cool, thanks for the information.

0 Kudos
Reply