rmb

Members
  • Content count

    4
  • Joined

  • Last visited

Community Reputation

0 Neutral

About rmb

  • Rank
    Newbie

Profile Information

  • Gender
    Male
  1. rmb

    I2C

    I found solution for second part of issue. I need to add at least 10us delay at loop(). It give me the Sin with f~4.5Hz what is compatible with arduino uno. rmb.
  2. rmb

    I2C

    Gents, thank you for answers. A half issue was that probably I made some mistake when I modified ZPUino Vanilla soft processor (I attached I2C symbol to wishbone 9, remove Arduino pins 6 an 7 from WING_AL, extend I2C pins by wires, create markers to that and rename ports as Arduino_7 and Arduino_6 ). When I uploaded this to FPGA and test it with blinked pin6 sketch the pin6 change his value. It means something wrong with my modified soft processor. When I loaded circuit from of WIIChuck sketch and uploaded my I2C sketch, I see activity on pins 6 and 7. However another half issue remains unsolved. DAC does not change his output value. I suppose it is not connect with next behavior, but my question why it is happened: I saw drift of first clock pulse between 5us to 8us on oscilloscope when processor send each third byte to DAC (from 4 bytes send within loop()). Thank you. rmb
  3. rmb

    I2C

    Jack, thank you for your answer. I started from simple task however no luck yet. I added I2C to wishbone 9 and attached signals to pins Arduino_7 and Arduino_6 like in provided example. For sketch I used next modified code (originally provided for Wire arduino library): #include <i2c.h> #define DAC_ADDR 0x60 int lookup = 0; // index int mysin[512] = { 2048, 2073, 2098, 2123, 2148, 2174, 2199, 2224, … 1847, 1872, 1897, 1922, 1948, 1973, 1998, 2023 }; void setup() { I2C.begin(100000); I2C.enable(); } void loop() { I2C.start(DAC_ADDR,0); I2C.tx(64); I2C.tx(mysin[lookup] >> 4); I2C.tx((mysin[lookup] & 15) << 4); I2C.stop(); lookup = (lookup + 1) & 511; } Unfortunately I don’t see any activity at Pins 6 an 7. I would like to ask some questions which could help me moving forward: How need I declare in sketch that I attach I2C to wishbone 9 at ZPUino soft processor? What is second argument in function I2C.start? Thank you rmb
  4. rmb

    I2C

    Hi I would like to communicate with MCP4725 DAC from Papiio DUO through I2C. Is it possible to use I2C library or it could work only with WII Chuck? Thank you rmb.