Library for interfacing with the NXP PCA9685 PWM controller over an I2C connection. Designed with the Adafruit breakout board (of the same name) in mind.
Dependents: Hexapod_Library main_robot_gant_v22
Documentation is lacking - not currently ready for public use, sorry.
definitions.h@4:3bcda7deb098, 2016-05-10 (annotated)
- Committer:
- el13cj
- Date:
- Tue May 10 12:14:55 2016 +0000
- Revision:
- 4:3bcda7deb098
- Parent:
- 1:9d6633a308ba
About to add directions;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
el13cj | 0:aa965d6b1f8f | 1 | #ifndef PCA9685_LIBRARY_DEFINITIONS_H |
el13cj | 0:aa965d6b1f8f | 2 | #define PCA9685_LIBRARY_DEFINITIONS_H |
el13cj | 0:aa965d6b1f8f | 3 | |
el13cj | 0:aa965d6b1f8f | 4 | #define ADDR 0x80 |
el13cj | 0:aa965d6b1f8f | 5 | |
el13cj | 0:aa965d6b1f8f | 6 | #define MODE1 0x0 |
el13cj | 0:aa965d6b1f8f | 7 | #define MODE2 0x1 |
el13cj | 0:aa965d6b1f8f | 8 | #define PRESCALE 0xFE |
el13cj | 0:aa965d6b1f8f | 9 | |
el13cj | 0:aa965d6b1f8f | 10 | #define LED0_ON_L 0x6 |
el13cj | 0:aa965d6b1f8f | 11 | #define LED0_ON_H 0x7 |
el13cj | 0:aa965d6b1f8f | 12 | #define LED0_OFF_L 0x8 |
el13cj | 0:aa965d6b1f8f | 13 | #define LED0_OFF_H 0x9 |
el13cj | 0:aa965d6b1f8f | 14 | |
el13cj | 0:aa965d6b1f8f | 15 | #define ALLLED_ON_L 0xFA |
el13cj | 0:aa965d6b1f8f | 16 | #define ALLLED_ON_H 0xFB |
el13cj | 0:aa965d6b1f8f | 17 | #define ALLLED_OFF_L 0xFC |
el13cj | 0:aa965d6b1f8f | 18 | #define ALLLED_OFF_H 0xFD |
el13cj | 0:aa965d6b1f8f | 19 | |
el13cj | 0:aa965d6b1f8f | 20 | #define OSC_CLOCK 25e6 |
el13cj | 0:aa965d6b1f8f | 21 | |
el13cj | 1:9d6633a308ba | 22 | #define PWM_SCALER 0.90425 //set by manual calibration - ratio of FREQUENCY_SET:ACTUAL_OUTPUT |
el13cj | 1:9d6633a308ba | 23 | |
el13cj | 0:aa965d6b1f8f | 24 | #endif |