Connecting I2C Device to Labview using NI-845x - sensors

I'm trying to connect a mass flow sensor, SFM-3000 by sensorion, to labview on PC using USB device, NI-8452, which provide I2C interface.
I followed the user manual of the sensor and used I2C example by labview but I cannot establish communication between them
I get the error message:
Error -301744 occurred at NI-845x I2C Run Script.vi:6110001,
Possible reason(s):
NI-845x: The I2C master lost arbitration and failed to seize the bus during transmission of an address+direction byte.
I'm using NI-8452 that include pull up resistor and I make sure to enable them by enabling 'Use Internal I2C Pullup Resistor' filled in 'NI-845x Device' property node.
I set I/O voltage level to 3.3,
I double check the address, I have 7 bit address defined in user manual of my device, 64 dec or 1000000 binary.
As specified in my device user manual, I provide it Vdd of 5v from NI-8452 pin 40 and also GND in pin 7.
Off-course SDA in pin 5 and SCL in pin 9.
I think I might have a problem with pull up reference voltage because the sensor specified it need to be 5v but NI-8452 use up to 3.3V.
but the low limit for high signal is 2.5v so it should work
My diagram:
another option i tried is using I2c script blocks
I tried similar solution also for pressure sensor, hdi0611arz8p5 by First-Sensor, but also got the same error.

After re-wiring it's started working, maybe some bad connectivity between wire and port. i hope this thread could help people that wish to connect sfm3000 using labview.

Related

Linux Camera Driver Communication Enable Pin Setting i.MX6Q Issue

I am writing MIPI csi-2 camera driver on Linux but I have a problem about communication enable signal. I have the technical data sheet in my hand but the communication enables register or another info about how to set or get this signal is not mentioned. I think this signal is getting from device tree I don't know. This signal called datasheet as an XCE signal and these are the information about that;
XCE: Communication enable 4-wire: XCE pin and I2C: Fixed to High
The pin for 4-wire serial communication and I2C communication is shared, so the external pin XCE must be fixed to power supply side when using I2C communication
these are some information about that other information of XCE is about how to use it while configuring the camera.
I need some advice or any idea to figure out how to solve this issue.
Thanks.
Best Regards

Add own sensor to lm_sensors?

I have a PCIe connected to my linux server and want to use SMBus pins to communicate via I2C to a slave uC (atmega128). This slave will, similarly, read some temperature also via I2C (the wires are multiplexed by a signal controlled by the uC, so it can be slave/master depending on the state of this signal). In master mode, the uC can get all the information from the sensors attached to it. In slave mode, the linux server will be seeing this device and will be able to ask for the information. Now, my question is:
How can I get my device to appear in the list shown when we write "sensor" in the console with the library lm_sensors installed? I have no idea what is the format in which the data is sent to this library, or whatever I would need to do. Would really appreciate some help!
Thanks!

Writing network driver for Raspberry Pi GPIO connected to FS1000A

I want to create a Linux network driver for a FS1000A connected to the RasPI via GPIO. It does not need to support a high bitrate.
The hardware is already working, I've previously managed to emulate a 433 MHz remote control using a FS1000A transmitter connected to a Raspberry PI's GPIO pins. The FS1000A transmitter and receiver use on off keying. If the GPIO pin is set high, the transmitter transmits a carrier. If it's set low it does not transmit.
According to an article about writing virtual interfaces, "A virtual interface has no way to receive interrupts, and thus it cannot receive any network packet." Is it possible to receive an interrupt when a GPIO pin changes state on a Raspberry PI? If not it is possible for a network driver to get a callback to poll the state of a GPIO pin? It does not have to be elegant or efficient, it just needs to work.
Does a network driver's xmit function have to block until all the data is sent? That could take a long time the packet is transmitted 9600 bps.
I read a guide to writing network device drivers for Linux but it is focused on PCI devices. Is there any documentation/tutorials about writing network drivers for Linux?
Any other tips suggestions welcome.

How to use APC220 Radio Communication Module in raspberry pi

I am developing a project using Arduino to send a message to Raspberry Pi using an APC220 Radio Communication Module.
The Raspberry Pi can't receive serial message by using USB connect to APC220. I want to know how to use APC220 in Raspberry Pi?
The APC220 has a TTL UART interface which you can connect directly to the RPi TTL UART pins on the GPIO header - you do not need the USB-Serial converter (though that should work too if it is a standard CDC/ACM device - though this suggests that there may be issues).
A note of caution however, the RPi GPIO pins use 3.3Volt logic, the APC220 datasheet is not clear on the TTL level used, but the specified supply range is 3.3 to 5.5 volts so it seems likely that it is 3.3V - best measure it to be certain. You can probably use the RPi GPIO headers's 3.3V supply pin to power the ACM220, then you will be sure to be safe. If the ACM220 level is too high, the quick-and-dirty solution is to use current limiting resistors in-line to protect the RPi (10KOhm should be enough, but don't hold me responsible; you should know what you are doing before proceeding).
The UART device on the Pi is /dev/ttyAMA0.
See here for details of serial I/O on the Pi.
22 Feb 2012 Update
The discussion here suggests that to make the TTL<->USB adapter work on Raspberry Pi, you need to disconnect the EN signal - the discussion links back to the manufacturer documentation, which gives that advice in the troubleshooting section. Since that makes the device appear as a USB serial, and you won't have to reconfigure the on-chip serial or build a connector that may be simpler.

How does Bluefruit EZ-link perform DTR/RTS over Bluetooth for programming?

Bluefruit EZ-link is described as programmer. It means it supports RTS/DTR:
The EZ-Link has another impressive feature: the DTR/RTS/DSR flow
control pins are automatically synced to the computer serial port.
What this means is that if the computer sets the hardware flow control
DTR or RTS pins high or low the pins on the bluetooth module will
follow.
So Arduino IDE performs reset to initiate flashing (as Arduino's Bootloader wait for few seconds after reset for upload commands from Arduino IDE). For USB reset works by switching DTR to 1 and 0 and special schematics on Arduino board monitors it and performs reset. After reset is done Arduino IDE runs avrdude and start flashing.
The question is "How does it works over Bluetooth module by Adafruit?" There is no RTS/DTR line for Bluetooth..
PS. I believe virtual COM-port drivers for this Bluetooth device should send special AT+ commands and Bluetooth device should handle them and perform setting 1 or 0 to special pin wired with MCUs reset. But this requires Bluefruit bluetooth driver to be used. But i can't see it requires special BT drivers at computer.
RFCOMM do support flow control.
RFCOMM is based on GSM TS 07.10. Bluefruit extract info on RFCOMM and map it to flow control lines.

Resources