Adding support for 16 channel PWM expansion to libraries

Related to the development libraries, released by Curt Binder
User avatar
Posts: 1426
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City
PostPosted: Mon Dec 29, 2014 6:45 am
cosmith71 wrote:Disregard the second half of my previous statement. I was doing it wrong. :oops:

Got it running, but I've noticed I can't dim below a raw value of 21 with my LDD drivers. At 20 they shut off. Hardware limitation or software issue?

--Colin


OK, so I've figured out that this really isn't a raw value of 21. I'm using the RANet dimming module which works off of an 8 bit value scaled up to 12 bits (multiplied by 40.95). So 21 is probably the break point between 0 and 1%.

What I'd like to do is use the bytes in the RANet packet normally used for the 16 channel dimmer for some sweet 12 bit dimming action.

What would be the best way, with a 6 channel dimming module defined, to send along some 16 channel data? I think plucking it out on the RANet receiver side would be easy enough. From what I've seen, you can have a 6 or a 16, but not both.

Maybe just define as a 16 channel and re-write the receiver code to translate to 6 channels?

--Colin

Posts: 12327
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Mon Dec 29, 2014 9:28 am
Damn... :) You are digging it deep huh? :) I like it.
I doubt this is the case.
21 in the RANet packet is really 21%.
Just to make sure we are talking about the same number, go to your dimming channels in your RA and look at the % for that channel.
Is it 21% or 1%?
Roberto.
User avatar
Posts: 1426
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City
PostPosted: Mon Dec 29, 2014 9:34 am
It's 1%. But I'm writing a raw value of 21, which I'm guessing is converted to 1%, sent to the RANet receiver, which then converts it to 1*40.95 and sends it on to the dimming module, right? So my end result is a raw value of 40.

--Colin

Posts: 12327
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Mon Dec 29, 2014 9:43 am
Yeap. You are correct then.
I think the only way we will be able to achieve this is to make the RANet payload bigger and send int values instead of byte values.
Can you open an issue in the github?
Roberto.
User avatar
Posts: 1426
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City
PostPosted: Mon Dec 29, 2014 10:04 am
Done.

Isn't an int 4 bytes? We only really need 2 (or even 1.5). Not sure how big the payload can be.

--Colin
User avatar
Posts: 5362
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Mon Dec 29, 2014 11:50 am
int is 2 bytes :)
User avatar
Posts: 1426
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City
PostPosted: Mon Dec 29, 2014 12:20 pm
Doh! I misread. :D Of course it is.
User avatar
Posts: 1426
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City
PostPosted: Thu Jan 22, 2015 4:06 pm
I did a little work on this, and got GitHub working.

Something is still wrong. I changed the payload to 68 bytes to accommodate 2 bytes for each expansion dimming and 16 channel expansion dimming and changed the RANet receiver software to read it. None of the channels are working as expected and I'm not really sure how to debug it.

My repositories are cosmith71/Libraries and cosmith71/RANet-Reciever. Not sure if that is what you need to find them?

Thanks,

--Colin

Posts: 12327
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Thu Jan 22, 2015 10:31 pm
I'll take a look at it.
Roberto.
User avatar
Posts: 1426
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City
PostPosted: Fri Jan 23, 2015 8:46 am
Thanks. Made a couple of changes this morning, but still not correct. I'm wondering if I have my MSB's and LSB's reversed some how.

--Colin
PreviousNext

Return to Development Libraries

Who is online

Users browsing this forum: No registered users and 5 guests

cron