I did  a quick review of the set up part of the code you posted. The code is 
not complete. It is missing some clocks setup.

 

You should download the TI AM335x Technical Reference manual. I have version 
spruh73q. Look at the picture on page 1563. You will see that the L4_per is 
connected to the L3S unit. Now look at the picture on page 1565. You will see 
the I2C2 is on the L4 peripheral bus (L4_per). So you need to enable the clocks 
for both the L3s and the L4 unit to be able to use I2C2.

 

I did not look at any of the other code, but I think the value for the pin mux 
should be 0x33. That turns on the pull up.

 

There is a lot of great information in the Reference manual, so happy reading 
and coding.

 

Graham

 

 

 

From: [email protected] [mailto:[email protected]] On 
Behalf Of [email protected]
Sent: Saturday, August 15, 2020 5:27 PM
To: BeagleBoard <[email protected]>
Subject: [beagleboard] Re: I2C driver for a PCA9685 servo controller board for 
s90 servos

 

You are right the code that is missing is

 

 

            void i2c_init(void){                            


On Saturday, August 8, 2020 at 12:57:15 PM UTC-7, M wrote:

Can anyone provide a C program that can be run in CCS that would program an I2C 
controller on the BBB board to generate the desired clock frequency signal and 
the required data signals on the I2C bus.

 

 

Part 1. Program the device to generate signals to turn LED15 to full ON. Should 
be measurable voltage from the number 15 signal pin on the servo board.

 

Part 2. Develop commands you send to PCA9685 to intialize it for the  correct 
frequency for your servo, set up a timer on the BBB to control delays, and 
intialize the BBB User LEDs.

-- 
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] 
<mailto:[email protected]> .
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/d0cbb043-6e61-4bb4-b93b-55dde349123fo%40googlegroups.com
 
<https://groups.google.com/d/msgid/beagleboard/d0cbb043-6e61-4bb4-b93b-55dde349123fo%40googlegroups.com?utm_medium=email&utm_source=footer>
 .

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/002c01d6741d%24b9396bb0%242bac4310%24%40comcast.net.

Reply via email to