06-09-2009 04:36 PM
Hey everybody,
I'm having some issues getting the USB 8451 to work properly. I currently have connected a MEMS accelerometer using I2C and I'm trying to simply read the WHO_AM_I register to make certain everything is working properly.
The address for this device is 19 (hex) while letting the software take care of the final bit for write/read.
The clock rate is set to 100 kHz.
The WHO_AM_I register is 0F, but the generic I2C Read.vi won't allow that value. When I run the VI, I don't receive any errors. I have had errors before that were quite clear (lack of bus seizure, improper address, etc.). Can anyone help explain why I can't modify this file at all or point me towards a more in depth and robust Read/Write VI? Thanks for your time.
=Chris
Accelerometer Datasheet
06-09-2009 04:51 PM
When I open up the Write Read.vi that is part of the larger sample VI, I notice the number of bytes to read is set to 0. When I change it to anything other than 0 and run, I receive the error code -301742 in the error out window. I have no idea how to diagnose this because no text accompanies the error message.
=Chris
06-14-2009 01:43 PM
Klepackage,
Write Read.VI where did you get this? As far as the error this forum as some good information that I think may apply. Does this application work other than trying to read this register?
06-15-2009 02:36 PM
Jason,
I was tinkering around with the General I2C Read.vi. When you double click on the icon that says 845x I2C (has glasses and a pencil), it opens up a clone of NI-845x I2C Write Read.vi. That is what I was referring to.
=Chris