DMX simple - modifying the break


i'm using dmx simple library control rgb leds. leds dont dmx arduino.

the manufacturer stated following:

the problem "space" break of tristar-rgb-dmx, 500.  the standard dmx "space" break 88~144, dmx controllers handle wide range of 88~1,000.

so @ point, unless can our engineers change "space" break, need dmx controller can handle 500.


i've had @ dmx simple code, i'm out of depth, looks me important section:

/** transmit complete dmx byte
* have no serial port dmx, timed using exact
* number of instruction cycles.
*
* suggest don't touch function.
*/
void dmxsendbyte(volatile uint8_t value)
{
 uint8_t bitcount, delcount;
 __asm__ volatile (
   "cli\n"
   "ld __tmp_reg__,%a[dmxport]\n"
   "and __tmp_reg__,%[outmask]\n"
   "st %a[dmxport],__tmp_reg__\n"
   "ldi %[bitcount],11\n" // 11 bit intervals per transmitted byte
   "rjmp bitloop%=\n"     // delay 2 clock cycles.
 "bitloop%=:\n"\
   "ldi %[delcount],%[delcountval]\n"
 "delloop%=:\n"
   "nop\n"
   "dec %[delcount]\n"
   "brne delloop%=\n"
   "ld __tmp_reg__,%a[dmxport]\n"
   "and __tmp_reg__,%[outmask]\n"
   "sec\n"
   "ror %[value]\n"
   "brcc sendzero%=\n"
   "or __tmp_reg__,%[outbit]\n"
 "sendzero%=:\n"
   "st %a[dmxport],__tmp_reg__\n"
   "dec %[bitcount]\n"
   "brne bitloop%=\n"
   "sei\n"
   :
     [bitcount] "=&d" (bitcount),
     [delcount] "=&d" (delcount)
   :
     [dmxport] "e" (dmxport),
     [outmask] "r" (~dmxbit),
     [outbit] "r" (dmxbit),
     [delcountval] "m" (f_cpu/1000000-3),
     [value] "r" (value)
 );
}

which part of deals 88us break?

thanks

hi soapdodger. i'm dmxsimple author.

the section quoted transmits single byte - not transmit break part. you're looking in wrong place.

the break sent in dmxstate==0 state of timer2_ovf_vect interrupt routine. code there isn't hackable - pretty bodgy there. i'll see can give adjustable break length.

by way, excellent work discovering break length problem. makes fixing whole lot easier.


Arduino Forum > Forum 2005-2010 (read only) > Software > Syntax & Programs > DMX simple - modifying the break


arduino

Comments

Popular posts from this blog

CAN'T INSTALL MAMBELFISH 1.5 FROM DIRECTORY - Joomla! Forum - community, help and support

error: expected initializer before 'void'

CPU load monitoring using GPIO and leds - Raspberry Pi Forums