An I/O controller for virtual pinball machines: accelerometer nudge sensing, analog plunger input, button input encoding, LedWiz compatible output controls, and more.
Dependencies:
mbed
FastIO
FastPWM
USBDevice
Fork of
Pinscape_Controller
by Mike R
3 comments:
Yes, the TLC5940 interface will affect PWM frequencies on other GPIO pins that you might be using for regular outputs. The TLC5940 interface requires a PWM pin to generate the master clock signal for the TLC5940 chip, and the way the KL25Z is wired internally, the PWM frequency that's set on one port affects a whole group of ports. The correspondence between ports and frequencies is complex and arbitrary - it's just how the KL25Z is wired internally. For full details, refer to "PWM Limitations" in the KL25Z Pin-Out section in the Build Guide:
http://localhost/pinscape/BuildGuideV2/BuildGuide.php?sid=kl25zPinOut
I'm not sure what you mean by "curve", but at a guess, your MOSFET boards are probably using optocouplers that are too slow for the 350kHz frequency that the TLC5940 sets on its TPM unit. Common optocouplers top out at around 80kHz. The MOSFETs themselves can usually go into the mega-Hertz, but that won't matter if they're connected through slower optos.
You can't really slow down the TLC5940 chip without starting to visible strobing on attached LEDs (350kHz is about as slow as it can go), so changing that isn't an option. You *could* potentially look for faster booster boards, but short of building something yourself using high-spec parts, that's probably not going to turn up anything. I think your best bets are: (1) toss out the MOSFET boards and add more TLC5940 outputs instead, or (2) try to move around the GPIO pin assignments so that the TLC5940 master clock signal generator is on a separate TPM unit from the ones you're using for the direct feedback-device GPIO ports. The TPM/GPIO matrix in the Build Guide chapter linked above will help you with that.
One quick addition: when I said "toss out the MOSFET boards", what I should have said was that you can keep the MOSFET boards, but you just have to move them over to additional TLC5940 outputs. The TLC5940 outputs themselves only run at about 200 Hz, so they'll work fine with slow optos.
Hey, thanks for your answer.
I moved my GPIO regarding your link, it was the issue, now it work like a charm.
When i talked about "curve", it's because i'm a lighting tech (use to talk about curve to define how is the output), and the way the outputs change wasn't similar regarding the output (and so, the GPIO), but now it's fine.
And i have no flicker issue with LTV817A and 80Khz, it's quite enough for a pincab ;)
Thanks a lot for your job dude !
Yes, the TLC5940 interface will affect PWM frequencies on other GPIO pins that you might be using for regular outputs. The TLC5940 interface requires a PWM pin to generate the master clock signal for the TLC5940 chip, and the way the KL25Z is wired internally, the PWM frequency that's set on one port affects a whole group of ports. The correspondence between ports and frequencies is complex and arbitrary - it's just how the KL25Z is wired internally. For full details, refer to "PWM Limitations" in the KL25Z Pin-Out section in the Build Guide:
http://localhost/pinscape/BuildGuideV2/BuildGuide.php?sid=kl25zPinOut
I'm not sure what you mean by "curve", but at a guess, your MOSFET boards are probably using optocouplers that are too slow for the 350kHz frequency that the TLC5940 sets on its TPM unit. Common optocouplers top out at around 80kHz. The MOSFETs themselves can usually go into the mega-Hertz, but that won't matter if they're connected through slower optos.
You can't really slow down the TLC5940 chip without starting to visible strobing on attached LEDs (350kHz is about as slow as it can go), so changing that isn't an option. You *could* potentially look for faster booster boards, but short of building something yourself using high-spec parts, that's probably not going to turn up anything. I think your best bets are: (1) toss out the MOSFET boards and add more TLC5940 outputs instead, or (2) try to move around the GPIO pin assignments so that the TLC5940 master clock signal generator is on a separate TPM unit from the ones you're using for the direct feedback-device GPIO ports. The TPM/GPIO matrix in the Build Guide chapter linked above will help you with that.