On 18/12/13 09:44, [email protected] wrote: > Dear all, > > i am working on Beaglebone (Angstrom linux), i tried to interface > Compass Module - HMC6352 to the beaglebone through I2C-3 (available in > expansion header P9, pin numbers 19 and 20) > > i used i2c commands in the terminal to detect the module. > > ##i2cdetect -r 3 > 0 1 2 3 4 5 6 7 8 9 a b c d e f > 00: -- -- -- -- -- -- -- -- -- -- -- -- -- > 10: -- -- -- -- -- -- -- -- -- -- -- UU -- -- -- -- > 20: -- 21 -- -- -- -- -- -- -- -- -- -- -- -- -- -- > 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- > 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- > 50: -- -- -- -- UU UU UU UU -- -- -- -- -- -- -- -- > 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- > 70: -- -- -- -- -- -- -- -- > > ##i2cdump -y 3 0x21 > No size specified (using byte-data access) > 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef > 00: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 ???????????????? > 10: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 ???????????????? > 20: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 ???????????????? > 30: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 ???????????????? > 40: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 ???????????????? > 50: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 ???????????????? > 60: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 ???????????????? > 70: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 ???????????????? > 80: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 ???????????????? > 90: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 ???????????????? > a0: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 ???????????????? > b0: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 ???????????????? > c0: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 ???????????????? > d0: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 ???????????????? > e0: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 ???????????????? > f0: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 ???????????????? > > here, i am getting an error No size specified... > > i am unaware of these errors. > > please help me.. i am looking application C-code for reading the above > module. >
Here is some C code[1] for the HoneyWell HMC6352 compass. It is in the form of a kernel module, but should give you some direction. If you don't want a kernel driver, then I would suggest using libsoc[2] to help you write a simple userspace version. [1] http://lxr.free-electrons.com/source/drivers/misc/hmc6352.c [2] https://github.com/jackmitch/libsoc Cheers, Jack > > > Thanks and Regards > > N Reddy > > -- > For more options, visit http://beagleboard.org/discuss > --- > You received this message because you are subscribed to the Google > Groups "BeagleBoard" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. -- Jack Mitchell ([email protected]) Embedded Systems Engineer Cambridgeshire, UK http://www.embed.me.uk -- -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
