I2C Comm with Digital Compass HMC6352


Results 1 to 11 of 11

Threaded View

  1. #11
    Join Date
    Mar 2008
    Location
    Texas, USA
    Posts
    114

    Default

    Good to see you’re figuring it out Andy. I too have jumped ship on PBP's I2C functions for my current project and have written my own. Like you said, it's easy to send out wrong addresses since the byte contains the address and is not in itself the address. If a data sheet says its address is xyz, then you have to format it to the device control byte by left-shifting it one place. If it says send xyz in the device address, then use that literally.

    So, your I2C bus does not expect the receiving device to send an ack after each byte is received? That's odd. I thought that was only for slave to master reads after the last byte needed was read.

    My needs were more about speed and open-ended read/write functions. It would be nice if PBP had better ways to deal with I2C. I think I understand why it's done the way they do it, but for some of us placing a bit more demand on us to follow a bit more rigid format, it could have a ton of time. For the average basic language programmer, it seems they are too far removed from what's going on in order to make it easy. I guess I'm just spoiled by CCS-C I2C functions.

    You can see an example of my I2C code here:http://www.picbasic.co.uk/forum/atta...8&d=1206738334

    Again, my goals were speed because I'm clocking at 1mhz and I want to leave the I2C bus open while I go do other things and come back to a bus that's just waiting for the next byte.
    Last edited by JD123; - 9th April 2008 at 23:00.
    No, I'm not Superman, but I did stay at a Holiday Inn Express last night!

Similar Threads

  1. I2C Master/Slave 16F88/16F767 working code
    By DanPBP in forum Code Examples
    Replies: 2
    Last Post: - 23rd October 2012, 22:31
  2. HARDWARE I2C SAMPLE CODE question
    By Michael Wakileh in forum Code Examples
    Replies: 2
    Last Post: - 16th June 2009, 21:07
  3. I2C Master Slave issues.
    By cpayne in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 29th March 2008, 19:33
  4. Big characters on HD44780 4x20
    By erpalma in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 7th January 2007, 02:21
  5. Digital Compass Project
    By BJSmith in forum Serial
    Replies: 2
    Last Post: - 7th April 2006, 19:32

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts