Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

DMX Slave - startbyte

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR
View previous topic :: View next topic  
Author Message
kartmanne

Bascom Member



Joined: 02 Mar 2018
Posts: 28

germany.gif
PostPosted: Tue Dec 19, 2023 10:53 am    Post subject: DMX Slave - startbyte Reply with quote

HI,

"normel" DMX starts with a start byte value of 0. If RDM will be used... the start byte will have a different value. In that case DMXslave will not store data.

Is there a chance to adjust DMXslave to receive data following a different start byte value?
Is there an internal variable of the received start byte value?

(BASCOM-AVR version : 2.0.8.6 )

_________________
CU
Manfred
Back to top
View user's profile Visit poster's website
MWS

Bascom Member



Joined: 22 Aug 2009
Posts: 2262

blank.gif
PostPosted: Tue Dec 19, 2023 11:37 am    Post subject: Re: DMX Slave - startbyte Reply with quote

kartmanne wrote:
Is there a chance to adjust DMXslave to receive data following a different start byte value?

The DMX-slave can be found in MCS.lib, it is built as state machine waiting for zero, the exact opcode where that happens is
Code:
cpi r24,0

Quote:
Is there an internal variable of the received start byte value?

No, but the constant based compare can be exchanged with a variable one
Code:
* lds r16, {cust_startbyte}
cp r24,r16

cust_startbyte must be dim'd as byte in main code.

To alter the DMX-function, it is the better way NOT to write to and mess up MCS.lib itself, but to copy the complete DMX-code from MCS.lib into a custom lib.
This custom lib can be altered and included via $LIB directive into code and overrides the original function.
Means by not including custom.lib the original MCS.lib-function is used again and no mess is left.
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum