Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.

MATTHEWPENA

Member Since 20 Feb 2015
Offline Last Active May 02 2015 09:04 AM
-----

Posts I've Made

In Topic: ND+2 with I2C problems? Can't get any responses from slaves

20 April 2015 - 04:19 AM

I finally got some reading from the unit....hurray!  I did have to use base address &h1E and not &h3C.  I'm only running at 10kHz.  Not sure what i did to get it going this time as I had tried the 1E address before.  I hooked up my O-scope for testing today and changed the program (which uses direct I2C commands, and not the multiI2C ones) to just run at 10kHz and read the whoami register in a loop.  It started working and I got return values from the transactions and the 3C value from the whoami register!  go figure?  Next, I set out to read the mag registers...but the auto increment thing didn't seem to work...However, i then tried writting each address before the read...and I started getting real values from all 6 registers that actually change when I move my board! woo hoo!  Now i just have to figure out the proper way to but the bytes together for a full x, y & z values!  i'm not exactly sure how to do that...and I havn't seen any VB code to do it...only C++ or C#, which is only a little helpful.  I'll propably figure it out, but again, any help would be appreciated.  thanks all.

Matthew


In Topic: ND+2 with I2C problems? Can't get any responses from slaves

20 April 2015 - 12:50 AM

Hi Kiwi, Thanks for the reply.  I have tried those addresses, but still no no response.  I've tried looping thru all the speeds from 10khz to 400khz...the board has 4.7 k pull-ups on the lines.  I've done direct commands as well...one write and one read and a combined write/read...still all zero's for return value and return byte!  I just don't have any confirmation that the hardware/firmware/software that I'm using will work.  I have tried the netduino and netduinoplus for hardware references...neither make a difference in getting it to work.  I have 4.2.2.2 firmware and 4.2 netmf drivers for windows 7-64.   I sure wish the I2C doc's spelled out what the commands actually do in code in regards to addresses and set bits.

I have gotten an ultrasonic unit working, xbee units working, a GPS and motor controllers working for my robot...but not this SIMPLE I2C CONNECTION...I Just need to get a real-time heading!  I couldn't locate an analog-output magnetometer...I got an analog accelerometer working, but that dosn't give me a heading!  Any other ideas, hints, tips, tricks would be greatly appreciated...this one's really stumping me and pissing me off a bit too!  I will breakout my old O-scope to check the lines, but if they are working, then what else can the problem be?  I have checked and replaced my jumpers to the board and checked the voltage levels...all OK there.

thanks again everyone.

Matthew


home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.