Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
21 years ago

How to Using OpenCores i2c master controller

Hi,

I inserted the OpenCores i2c Master Controller into my custom board design (NIOS-II CPU) for communicating with an external RTC. Verilog source files were downloaded from the OpenCores website; also a header file named "oc_i2c_master.h". After re-compiling the system library project, in file "system.h" several #define were added.

Questions are:

- How do I write the code for using this controller? Some sample code would be very helpful.

As it's seen, I'm completely new to this topics.

Thanks a lot in advance.

3 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi VLorenzo,

    I used it and it works.

    Give me your e-mail and i'll send you sample file.

    bye
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    hi,

    i also work with DE2 and need to connect ds1307 as part of BSc final project and i have problems.

    one of you can send me the vhdl code for this RTC ?

    thanks a lot!!

    my mail is oriya1992@gmail.com