Search the Community

Showing results for tags 'i2c'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • News
    • New Users Introduction
    • Announcements
  • Digilent Technical Forums
    • FPGA
    • Digilent Microcontroller Boards
    • Non-Digilent Microcontrollers
    • Add-on Boards
    • Scopes & Instruments
    • LabVIEW
    • Other
  • General Discussion
    • Project Vault
    • Learn
    • Suggestions & Feedback
    • Buy, Sell, Trade
    • Sales Questions
    • Off Topic
    • Educators
    • Technical Based Off-Topic Discussions


  • Community Calendar

Found 29 results

  1. Waveforms Script Printing

    Hello, I have an Analog Discovery (legacy) and the latest Waveforms app. I am trying to write a script that makes the protocol module write to a 24C16 eeprom, read it back, and print to the screen or window. I can access th I2C (can see on my scope), but I can't print anything. The print() function does nothing unless in debug mode, but then the app seems to hang. I tried Custom mode and Sensor mode. And I tried the ADXL345 example, with a known good breakout board, and it always returns the same thing, doesn't change with orientation of the chip (but my main concern is the eeproms) Why is the output window at the bottom of the script area only one line long. The only thing that shows up there is the results of return statements. How can I see the I2C and run the script at the same time ? The logic analyzer only shows the first two I2C bytes, so I'm using an external scope. What does the manual mean when it says the the I2C can only send when in debug ? Isn't that a show-stopper ? Am I missing some key piece of documentation ? The manual does not say much about how all of this stuff works. - Thanks
  2. I2C Python Interface

    I'm writing an I2C interface in python in order to get a real-time stream from a peripheral device and do some additional processing. I have been able to get everything set up such that my peripheral ACKs my request. However, I'm curious for what your strategy is for handling the next packet depending on ACK/NACK. Originally I was just using a digital read at the start of the transmit (Start + Address) and processing the response to detect ACK, then setting up the device for the next transmit (data). However, the USB back/forth is way too slow, so I'm assuming you set everything up in advance in Waveforms I2C to trigger on an ACK. I tried a few methods of setting the output to trigger from I/O states, but I haven't been able to get it to work quite right (is there a way to force a trigger?). Can you briefly explain the general flow for how you set the AD2 up to handle I2C as master in Waveforms? Thanks, Kyle
  3. I2C ACK before STOP bit

    I'm using Waveforms with the AD2 device to do some I2C debug. I'm running into an issue where my slave device hangs because the AD2 master doesn't ACK the final data transmission before sending the STOP signal. I believe it is supposed to per the I2C spec.
  4. Can someone please point me to a manual for the Protocol section of the Waveforms software? I would like to send an I2C command over a bus but I am getting an I2C bus error. Verify the signal pull-ups error. I do have the appropriate pullup resistor however. Also, it's not clear how the interface works. A manual would be useful. Thanks, Dave
  5. I have designed a board to program serial flash memories using the JTAG-SMT2-NC operated as an SPI master. This works fine but now I want to use the same board to program an I2C EEPROM (on a different target). FTDI's document "USB to I2C Example using the FT232H and FT201X devices" suggests that this should be possible and I belive that the JTAG-SMT2-NC uses the FT232H. Has anyone tried this? What would the mapping of the connections be? I imagine that it would be:- TMS - connect to Write Protect on the EEPROM TCK - connect to I2C's SCK TDI, TDO - tie together and connec to I2C's SDA alternatively I suppose that one could bit-bash the GPIO pins (GPIO0, GPIO1, and GPIO2) but this would require a hardware change to my adapter that I'd prefer to avoid.
  6. Hi everybody, thaks for your time. I'm a new Xilinx user and I'm learning about VHDL language and FPGA. In this opportunity, I want to establish a I2C communication between Zedboard and PmodACL. I'm implementing the tutorial "Getting Started with Digilent Pmod IPs", and I have some doubts: 1) I've installed the "vivado-library-2015.4-3", but when I search the info in board section about Pmod there is nothing: 2) When I click on "Generate Bitstream" I get this error: With this lines: Running DRC as a precondition to command write_bitstream INFO: [DRC 23-27] Running DRC with 2 threads ERROR: [DRC 23-20] Rule violation (NSTD-1) Unspecified I/O Standard - 8 out of 146 logical ports use I/O standard (IOSTANDARD) value 'DEFAULT', instead of a user assigned specific value. This may cause I/O contention or incompatibility with the board power or connectivity affecting performance, signal integrity or in extreme cases cause damage to the device or the components to which it is connected. To correct this violation, specify all I/O standards. This design will fail to generate a bitstream unless all logical ports have a user specified I/O standard value defined. To allow bitstream creation with unspecified I/O standard values (not recommended), use this command: set_property SEVERITY {Warning} [get_drc_checks NSTD-1]. NOTE: When using the Vivado Runs infrastructure (e.g. launch_runs Tcl command), add this command to a .tcl file and add that file as a pre-hook for write_bitstream step for the implementation run. Problem ports: pmod_out_pin10_io, pmod_out_pin1_io, pmod_out_pin2_io, pmod_out_pin3_io, pmod_out_pin4_io, pmod_out_pin7_io, pmod_out_pin8_io, pmod_out_pin9_io. ERROR: [DRC 23-20] Rule violation (UCIO-1) Unconstrained Logical Port - 8 out of 146 logical ports have no user assigned specific location constraint (LOC). This may cause I/O contention or incompatibility with the board power or connectivity affecting performance, signal integrity or in extreme cases cause damage to the device or the components to which it is connected. To correct this violation, specify all pin locations. This design will fail to generate a bitstream unless all logical ports have a user specified site LOC constraint defined. To allow bitstream creation with unspecified pin locations (not recommended), use this command: set_property SEVERITY {Warning} [get_drc_checks UCIO-1]. NOTE: When using the Vivado Runs infrastructure (e.g. launch_runs Tcl command), add this command to a .tcl file and add that file as a pre-hook for write_bitstream step for the implementation run. Problem ports: pmod_out_pin10_io, pmod_out_pin1_io, pmod_out_pin2_io, pmod_out_pin3_io, pmod_out_pin4_io, pmod_out_pin7_io, pmod_out_pin8_io, pmod_out_pin9_io. WARNING: [DRC 23-20] Rule violation (BUFC-1) Input Buffer Connections - Input buffer pmod_out_pin1_iobuf/IBUF (in pmod_out_pin1_iobuf macro) has no loads. An input buffer must drive an internal load. WARNING: [DRC 23-20] Rule violation (BUFC-1) Input Buffer Connections - Input buffer pmod_out_pin4_iobuf/IBUF (in pmod_out_pin4_iobuf macro) has no loads. An input buffer must drive an internal load. INFO: [Vivado 12-3199] DRC finished with 2 Errors, 2 Warnings INFO: [Vivado 12-3200] Please refer to the DRC report (report_drc) for more information. ERROR: [Vivado 12-1345] Error(s) found during DRC. Bitgen not run. INFO: [Common 17-83] Releasing license: Implementation ERROR: [Common 17-39] 'write_bitstream' failed due to earlier errors. I think it's because in the block design I could not open the Pmod corresponding to the Zedboard and then the pin assignment is not elaborated. So, how can i do to import the complete library for Zedboard pmod? Or, which is the order for Pmod pin assignment? Bests reggards, Oscar.
  7. AD2 I2C via C++

    Hi, I've created a custom software program in C++ that uses analog discovery 2 and I have two questions. 1. I want to read some data using I2C interface, but I'm having trouble on the idea of how should I set up a "typical I2C" interface in C++. Is there an example anywhere on how exactly can this be accomplished in C++? 2. When reading the on-board temperature value in C++ I keep receiving a constant value if I'm doing multiple reads in a row. How can I fix it so that every time I read the AD2 on-board temp value I would get an updated temp value not the initial value? Thank you!
  8. Zybo I2c Master

    Hi, I have the Zybo Zynq 7000 board (Z-7010). I also have a Ti Msp430G2 launchpad. I need the Zybo to be the Master I2c , send request data from the Ti Chip. In Zybo i'm Using the I2c_0 Built in controller on the ps, i've tried the following Examples with no success(test failed Everytime): xiicps_polled_master_example.c xiicps_slave_monitor_example.c then i tried to to troubleshoot the problem, i'v used the xiicps_polled_slave_example.c and on the Ti Chip i used the wire library, as I2c Master and a c program that Scans Addresses - this works Therefor all the connections and vivado config are fine. How can find a working Master Program for zybo?
  9. Zybo I2C

    Hi, I have the Zybo Zynq 7000 board (Z-7010). I want to receive data from Multiple Devices via I2C protocol. In the PS there are 2 I2C Controllers. The Steps i made so far: 1) In vivado i created the ip : Zynq7 processing system. 2) i'v enables the I2C 0 controller and routed it to Emio. at this point i need 2 pins: clock and data, but instead i have 6 pins: where should i connect the pins? after Exploring this issue online i saw another option : using the Axi_IIc ip, With the same problem:
  10. I'm having problems printing data on-screen, when the program is about to write it, the board freezes, it won't even allow me to reset. In the module of the MAX30100, Vin is connected to 3,3v, GND to GND, SCL to RB8, SDA to RB9, there are also 4k7 resistances conected between SDA and 3,3v, the same goes for SCL and 3,3v. INT remains unplugged. The almost fully white screen is the result of using the ChipKit board. The image filled with data shows the results obtained with an Arduino UNO board, wich were proved right with a saturometer. The last image shows the module for the MAC30100. The files are the libraries used and the program. I tried changing the communication speed from 100kHz to 400kHz but there wasn't any changes. I also tried it with a pull-up resistence on the INT port of the MAX30100. examples.7z MAX30100.7z
  11. Emulate I2C slave

    Would it be possible to emulate a I2C slave using the digital discovery (using scripting)? If not, is this something that could potentially be added in the future, or are there any HW limitations that make this infeasible?
  12. Hello, I'm using waveforms to control some I2C communication. the first byte interpreted is wrong, waveforms should read 0xC0 but reads 0x60 instead. Other bytes are good. (see attached picture) Is there a setting I missed? Regards edit: I have waveforms 2015 for windows version 3.5.4
  13. SDK Coding

    Its been a few months since I've been introduced to FPGA design and have successfully completed some basic projects, however, while trying to effectively establish communication with devices via protocols such as uart, spi, and i2c I usually fall short. From what I understand you must enable these through the ZYNQ7 processor on block design or drop in their respective IP blocks. How to actually connect these to external devices becomes fuzzy for me and interpreting/modifying the SDK code is very difficult. In short I'm looking for some help/resources to get the ball rolling on these type of projects, and how to actually understand/develop the C code for processor myself, on both the Microzed and Zybo development boards. Thank you
  14. I'm working with a sensor that uses clock stretching to tell the master when data is ready. When using the AD2 as an I2C master, the analyzer insists there's a NACK after an address somewhere, but I can't see where. The first attached picture shows a write to 0x40, ACK, 0xF1, restart, read from 0x40, ACK, then slave holds both SCL and SDA low. About 68ms later (seen in the second attached picture), the slave releases the bus indicating the data is ready. The protocol analyzer shows the correct sequence from its point of view, then shows "NACK after address" even though all bytes were clearly ACK'd. From what I can tell, I'm using everything correctly. Does WaveForms 2015 actually support I2C clock stretching when acting as an I2C master? As a matter of curiosity, you might be wondering why I chose to use an analog analyzer to view the I2C lines. That's because I can't seem to coerce the logic analyzer to behave while I was also using the protocol analyzer. Is that a software limitation, a bug, or am I just using it wrong?
  15. Hi there, I am using the chipKIT Wi-FIRE with the basic I/O shield and MPLABX IDE. I want to read out the temperature sensor of the I/O shield via I2C and write the value to the OLED display. I do see a value on the OLED-display that reacts on the sensors environment (i.e. it increases when I put my finger on the sensor), however it is clearly wrong as I get 360°C for room temperature (before anyone asks: I know I have to multiply the sensor value with 2^-4 to get a the correct numerical value). To initialize the bus and read out the sensor value I followed an example found on, but it goes much beyond what I actually want to accomplish and modifying that code just leads to the result mentioned above. So here is my question: is there some starter code to simply read out the temperature sensor in this setup?
  16. I just got myself an Analog Discovery 2. I tried probing an I2S stream on a CODEC, using the Logic Analyzer function. I noticed that the software is capable of decoding Left and Right channel samples as hex or singed decimal numbers - which is not much help when trying to make sense of audio signals. Is there any way to reconstruct left and right channel audio wave-shapes represented as analog charts for better observation? Can it be exported as channels on the oscilloscope and compared with other analog signals or Is it possible to see the spectrum of the Left and Right channel audio streams from the I2S signals?
  17. Zybo audio codex setup

    I am currently trying to setup the ssm2603 audio codex on the zybo board to output audio, with a purely rtl design. I am having issues setting up the audio codex via i2c. I am wondering about how you should send the address information to the audio codex to initialize the setup registers. Below is an RTL state machine of how I am trying to write the register values to the codex. Can someone verify that this is the correct way to address the registers? I am unable to get anything out from the audio codex currently, and I don't think my initialization is working. always @(*) begin next_state = IDLE; address = 7'h0F; data = 8'hFF; case(state) IDLE: begin start = 0; address = 7'h0F; data = 8'hFF; next_state = (setup_audio_codex) ? WR_POWER_MGNT : IDLE; end WR_POWER_MGNT: begin start = (busy) ? 0 : 1; address = 7'h06; //power management data = 8'b00000111; //PWROFF,CLKOUT,OSC,OUT,DAC,ADC,MIC,LINEIN next_state = (ready) ? WR_DIG_AUDIO_IF : WR_POWER_MGNT; end WR_DIG_AUDIO_IF: begin start = (busy) ? 0 : 1; address = 7'h07; //digital audio I/F data = 8'b00000010; //BCLKINV,MS,LRSWAP,LRP,WL,FORMAT next_state = (ready) ? WR_DIG_AUDIO_PATH : WR_DIG_AUDIO_IF; end WR_DIG_AUDIO_PATH: begin start = (busy) ? 0 : 1; address = 7'h05; //digital audio path data = 8'b00000000; //HPOR,DACMU,DEEMPH,ADCHPF next_state = (ready) ? WR_ANA_AUDIO_PATH : WR_DIG_AUDIO_PATH; end WR_ANA_AUDIO_PATH: begin start = (busy) ? 0 : 1; address = 7'h04; //analog audio path data = 8'h00010010; //SIDETONE_ATT,SIDETONE_EN,DACSEL,BYPASS,INSEL,MUTEMIC,MICBOOST next_state = (ready) ? IDLE : WR_ANA_AUDIO_PATH; end endcase end
  18. Hi, I have a problem with my i2c communication with digilent pmod CMPS. I've routed i2c-0 via EMIO to the Pmod. Pullups are enable. I can send only one frame with initialization data and then I can't send anything. I checked the transmission using logic analyzer, and I have no idea why the i2c port is blocked. To send another frame i have to restart system. I would be grateful for any help. I2c is rather OK because gyroscope works fine.
  19. Arty and I2C to query PmodTMP2

    Hi, I recently bought an Arty Board to get myself acquainted with FPGA/µC development. Currently I focus on µC programming using Microblaze. Following the tutorials provided under I managed to read out a PmodMaxSonar using UART and PWM, using a pmod_bridge configured in the Block Design within Vivado, and write the measured values on a PmodSSD seven segment display. Next I would like to work with I2C to read from a PmodTMP2 temperature sensor. Currently I am not very successful in doing so. I again use a pmod_bridge where the Top-row is set to i2c and the bottom row to none. Attached to the bridge I have a axi iic ip core, which is then integrated using the connection automation of vivado. I was trying to make use of the provided examples in the SDK for axi_iic. Analyzing the bus using a oscilloscope I measure voltage level of 1.6V for both scl and sda. I understand that both should be pulled up using resistors. I would expect that this is taken care of by the pmod_bridge or the axi_iic blocks. I attached the corresponding block design as system.pdf. Using: Status = XIic_SetAddress(&Iic, XII_ADDR_TO_SEND_TYPE, 0x4B); Status = XIic_Start(&Iic); I manage to acquire the attached measurement (see screenshot), after the following command is processed. Status = XIic_MasterSend(&Iic, &registerAddress, 1); Ch B (green) is attached to scl, and Ch A (yellow) to sda. Given what I have leaned so far about i2c it looks a bit alike. However, the voltage levels are off and the timing also does not look convincing. I would appreciate any feedback that could help me to figure out what I'm doing wrong. Regards system.pdf
  20. Hello, I am exploring the Arty board. I get the a Microblaze Base system up and running and like to start programming the system, more specific - the I2C (SCL/SDA) (HIH6130 sensor) - SPI pin (TLC5947). - Build IP block written in VHDL (PWM driver). Any starting points are welcome. Regards, J.
  21. Zybo beginner - Simple communication via i2c

    Hello everybody, I want to connect my Zybo to a gyroscope that communicates via I2C but I have not been able to do it. I want to do this in bare-metal. What I gathered so far is that I have 2 options: 1) connect it directly to the MIO, i.e., to JF PMOD or 2) connect it to another PMOD and from the PL, instantiate an AXI IIC IP and access the values via AXI. Either of the options are fine by me. I have many questions regarding both options. Starting with option 1) Where do I physically connect my gyroscope SCL and SDA lines? Does it depend on the MIO configuration? To which MIO should I assign I2C? Should I use I2C 0 or I2C 1? Which functions are available for reading/writing from/to the I2C interface? Could you provide an example for reading/writing from/to a certain memory position? And for option 2) Which are the constraints I need to place on the SCL and SDA signals? How to I connect the SCL and SDA signals to the I2C port that is on the AXI IIC IP? Which functions are available for reading/writing from/to the I2C interface? Could you provide an example for reading/writing from/to a certain memory position? I know this may be simple and intuitive but I have not been able to discover it by myself. Thank you very much in advance Best regards, Miguel
  22. Hello, I am a new user of analog discovery. I have an Arduino talking to my sensor through a 5v to 3.3 V level converter using I2C protocol. The code works fine and gets me the desired output on the serial port but when I try to connect the SDA and SCL lines to the analog discovery on the pin 7 (Data) and Pin 15 (clock) lines, I dont see any signals getting recorded. I am interested in seeing the clock and data lines with the addresses and data that is being written on the lines. But it either gives me Error status or no result after getting triggered. The snapshot is attached below: I wanted to know if I am following all the necessary steps in initializing the analog discovery. 1. Connect the wires to the 2 digital lines of analog discovery ( Pin 7,15 here) 2. Assign the right DIO pins as data and clock lines in the waveforms software. 3. Click the Red T button to set the trigger option. --> Start signal as trigger is the condition I used in the image below. but I also tried different trigger settings like, SDA = Ignore and SCL = Rising edge. Both of them gives me the error blocks as below. 3. Click Run button 4. Reset the Arduino. 5. Stop. I am interested in seeing the start, addresses in hex, ACK/ NACK signals labeled. Can anybody tell me if there is some required program to be run before I able to see them? Thanks & Regards,
  23. Dear forum I'm trying to log the activity on the I2C bus using my Analog Discovery 2 and the Logic Analyzer tool. I remember someone posted a script that will let you log all of the data. Can someone refer me to that post? Also, the specific protocol that I'm trying to decode is SVID (Serial voltage ID, Intel) that is based on I2C but with lower voltage threshold (0 to ~1V). I cannot find the option to change the threshold in Logic Analyzer. Within a script, could this be achieved? Thanks !
  24. Good evening! I am trying to use an Adafruit BNO055 breakout board with a ChipKit uC32 board, but there’s some kind of underlying bug causing the initialization code to fail. I’ve tracked it down to how the reset of the BNO055 is happening, but I’ve hit a wall at how to go deeper. Any advice would be welcome. Hardware used: Adafruit Feather Bluefruit LE Digilent ChipKit uC32 Adafruit BNO055 orientation board breakout Breadboard, wires, etc. Photos of hardware setup attached. To start, I tested using the BNO055 and the Adafruit sensorapi example sketch on an Adafruit Bluefruit LE via the I2C connection. This worked just fine. I've used it for other projects in the past, so that's old hat: Then, when I first tested the uC32 with the normal ChipKit-core distribution found via the ChipKit-core url, the I2C implementation was broken. None of the 3 different I2C sensors I had worked. After following the instructions to update ChipKit-core to 1.1.0-13 to fix I2C bug, as suggested below, I as able to connect to devices via I2C: Note: I did set JP6 and JP8 to enable the I2C interface on the uC32. Tested ChipKit uC32 using the I2C interfaces on the Adafruit BME280 and Si1145 breakout boards. Both worked just fine. Data was read and written properly. Unfortunately, when connecting the BNO055 orientation board from here: The board is recognized (by the device ID of 0xA0), but then the ChipKit uC32 hangs after first println in the sensorapi example sketch. It goes into the bno.begin() call and never returns. Since I can’t do any deeper debugging in the main library, I copied out the BNO055 library (called it C_BNO055) and built against my version. Started with no changes other than the name of the library, include guards, and filenames. Worked just fine on Bluefruit LE, but exhibited the same issues on the uC32. My source code for the library modified for testing is attached to this post. I had combined the three breakout boards into a single program. This worked just fine on the Bleufruit LE, and it accessed all three sensors without issue, but the same bno.begin() call would hang everything. So, I stripped out the other sensors and tested with debugging messages in my custom bno.begin() definition found in C_BNO055.cpp. The code executes until the first BNO055 reset is attempted. Writing 0x20 to the BNO055_SYS_TRIGGER_ADDR resets the sensor. This loop then waits for the device to return 0xA0 for the chip ID, which indicates that it's ready to be used again. Serial.println(" [x] Doing a reset and waiting for the address to stabilize."); write8(BNO055_SYS_TRIGGER_ADDR, 0x20); while (read8(BNO055_CHIP_ID_ADDR) != BNO055_ID) { Serial.print(" [x] Waiting for BNO055 to reset. ADDR of: "); Serial.println(read8(BNO055_CHIP_ID_ADDR), HEX); delay(10); } delay(50); Serial.print(" [x] BNO055 address is now: "); Serial.println(read8(BNO055_CHIP_ID_ADDR), HEX); That loop runs about 8 times (see attached screenshot) for the ChipKit uC32, then just stops. Every read it gets an ID of 0x00 (zero). When the same code is run on the Bluefruit LE, it gets an ID of 0xFF until the board resets (see attached screenshot). Then it gets 0xA0 like it should and continues execution, and my larger program is able to read/write to the BNO055 and other sensors on the same I2C bus. I believe there’s some kind of issue in the ChipKit-core implementation for I2C that’s being exposed by the series of calls leading up to the reset of the BNO055 board. I’m not sure how to proceed at debugging or testing the system. Any advice or investigation would be welcome. I have: Changed the I2C address of the BNO055 by connecting the ADR pin to Vcc and changing the address in the .h file. Worked for Bluefruit, not for uC32. Commented out that address check and added in a delay(300) call. While the code progressed, it crashed when trying to access other I2C devices in loop(). Tried a similar test on a ChipKit MX3ck board with the same results. I’ve tried re-wiring the board/jumpers and testing my solder joints. I'm trying to get this board working on the uC32 as part of the sensor package we're building for the WSU Aerospace Club's rocket. If you'd like me to bring my hardware for testing to Digilent, just let me know via email and I'd gladly cross town to get some help. Thank you for your time. -- Aaron Crandall
  25. How to use Audio on Zybo board

    Hello guys; Can you refer me to a quick guide about how to use Audio signal on ZYbo board? I just want to know if there is any simple tutorial about how to get data from audio jack and have in on Arm side. Appreciate your comments in advance.