I2C Communication from 18F4PIC550 to Titan Intel BLDC Motor Driver

Results 1 to 3 of 3

Threaded View

  1. #1
    Join Date
    Aug 2012

    Default I2C Communication from 18F4PIC550 to Titan Intel BLDC Motor Driver


    Quick note to apologise for if I miss any information out from this initial post, if you ask for any more information i'll post it as soon as I can. I have hunted the forums on this and every other site to find a answer but to no avail.

    Read PelcoP control command from a serial port and output the correct I2C control commands to the Titan Intelligent BLDC Motor along the SDA line asynchronously. This must be completed using Pic Basic Pro.

    I started from the working C code that was given to me by the previous person assigned to the project. This C code works absolutely fine and reads the commands in and write the I2C commands out perfectly (although the code is badly written). The code can be seen here.
    I slowly worked through using PicBasic with the PIC18F4550 to get it to flash the on-PCB led to test my programmer and code works correctly, which it does and then moved on to try to create a simple program that writes the I2C commands straight from code to the motor driver. This is where I got stuck and have remained stuck for a number of days. I need you help to get this program writing the commands to the motor dirver to get it to move.

    Original C Code: Ccode.txt (Apologies about the write up, you will need to copy and paste it into a editor like notepad++ and set language to C)
    Titan BLDC Motor I2C Protocol
    PIC18F4550 Datasheet
    The PicBasic code I am trying to get to work: blink.bas

    Relevant Information
    • The SDA line is connected to PORTB.0
    • The SCL line is connected to PORTB.1
    • The clock used is the 8MHz internal clock set by OSCCON = 110010
    • I can see the output from the PIC trying to write to the camera but the camera remains stationary. It seems the output is working but the motor driver is not reading the data in.
    • The SDA output from the C code and the PBP code seem to be the same.
    • The SCL line on both programs remains high throughout the code process.
    • The configuration bits set in the PBP file is there to make it match the C code config bits.
    Thanks for your help, replies e.t.c.
    Last edited by JJVector; - 7th August 2012 at 11:14.

Tags for this Thread

Posting Permissions

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