The code to run the motors from the Parallax Propeller is here. This code is for the Adafruit 24-Channel 12-bit PWM LED Driver - SPI Interface (TLC5947). The following is an explanation of how it works. To run the LED drivers first send out a 0 signal to the clock and the latch. Then send out 12 bits of information to the driver and shift them in by sending a pulse to the clock. Repeat that process 24 times (one for each LED or Motor). When all the data is in, the program sends a pulse to the latch which starts the PWM. Then the program constantly repeats this PWM process.
Note: There is a big difference for shifting in information between the Adafruit 24-Channel 12-bit PWM LED Driver - SPI Interface (TLC5947) which I got to work and the Adafruit 12-Channel 16-bit PWM LED Driver - SPI Interface (TLC59711) which did not work for me.
The difference is that the TLC5947 http://www.adafruit.com/datasheets/tlc5947.pdf has an input for the latch that the microcontroller can physically be attached to unlike the TLC59711 http://www.adafruit.com/datasheets/tlc59711.pdf. The TLC59711’s latch is controlled through sending a specific code then shifting in data for LED groups and individual pins for PWM of the 12 output pins. The speed for sending in this information exceeds the speed of Python running on the Raspberry Pi at 700 MHz (the default speed). If I used C or C++ on the Raspberry Pi or SPIN on the Parallax Propeller to send out the information I believe it would have worked properly.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.