Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support UCS1903B #16

Closed
kolu4iy opened this issue Jan 24, 2014 · 2 comments
Closed

Support UCS1903B #16

kolu4iy opened this issue Jan 24, 2014 · 2 comments

Comments

@kolu4iy
Copy link

kolu4iy commented Jan 24, 2014

I'm try to add new chipset in source code for support UCS1903B this datasheet:
http://www.icdemi.com/manual/UCS1903B.pdf
(sorry, but i find only the chinese version).

chipsets.h:

...
template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
class UCS1903BController800Khz : public ClocklessController_Trinket<DATA_PIN, 2, 5, 3, RGB_ORDER> {};

...

template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
class UCS1903BController800Khz : public ClocklessController_Trinket<DATA_PIN, 4, 10, 6, RGB_ORDER> {};

...

// UCS1903B - 400ns, 450ns, 450ns
template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
class UCS1903BController800Khz : public ClocklessController<DATA_PIN, NS(400), NS(450), NS(450), RGB_ORDER> {};

if NO_TIME(400, 450, 450)

warning "Not enough clock cycles available for the UCS1903B"

endif

FastLED.h also was edited for adding support of UCS1903B.

Timings in datasheet:
T0H 0.4μs ± 40 ns
T1H 0.8μs ± 80 ns
T0L 0.85μs
T1L 0.45μs
Reset >=24us

but it wan't work... Also i'm not sure about tick counters in a part that use ClocklessController_Trinket. Can you help me?

@focalintent
Copy link
Contributor

Ahh - ok, this is basically an 800kHz version of the UCS1903 controller. I'm going to work on adding the definitions that you provided.

The tick counters in the trinket are basically hand converted ns values to clock counts for 8 and 16Mhz clocks. I do this for the trinket because, especially at 8Mhz, the timing for the hand rolled assembly is tight enough that I want to define the timings in clocks, rather than allow for an ns to clock conversion, which for most other platforms is ok.

I'll close this ticket when i've checked the code into the 2.1 branch (which is the current 'next' release branch that is being worked on).

Thank you for the update!

@kolu4iy
Copy link
Author

kolu4iy commented Jan 27, 2014

Thanks!

Your timings (2,4,4) or (4,8,8) are work pretty nice, we are happy )

2014/1/27 Daniel Garcia notifications@github.com

Closed #16 #16.


Reply to this email directly or view it on GitHubhttps://github.com//issues/16
.

Йош

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants