I2C Communication from 18F4PIC550 to Titan Intel BLDC Motor Driver


Closed Thread
Results 1 to 3 of 3

Hybrid View

  1. #1
    Join Date
    Aug 2012
    Posts
    3


    Did you find this post helpful? Yes | No

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

    Quote Originally Posted by JJVector View Post
    [*]The clock used is the 8MHz internal clock set by OSCCON = 110010
    Edit: OSCCON = %01110010

  2. #2
    Join Date
    Aug 2012
    Posts
    3


    Did you find this post helpful? Yes | No

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

    Code:
    PanRightNormal:
    	PORTB = $1C 	'STX Set Ports Low
    	addr = $00		'Set address to write to to default (0)
    	a[0] = $07
    	a[1] = $00
    	a[2] = $00
    	'gosub flashled 'Flash debug LED on PortE
    	pause 10		'Pause 10ms between commands to allow them to go through
        I2CWRITE sda,scl,cont,[STR a\3]	'Write 0101|000|0 to initialise I2C comms (controlbyte|address|read/write)	
    	'LSB of velocity byte
    	'gosub flashled	'Flash debug LED to show commandds ave been completed
    	pause 10		'Pause 0.01 second
        return
    Using a array fixed my problem, i was continually sending the control byte when did it separately.

Members who have read this thread : 0

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

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