DMX master has issues

For general Flowcode discussion that does not belong in the other sections.
medelec35
Matrix Staff
Posts: 1955
http://meble-kuchenne.info.pl
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 626 times
Been thanked: 656 times

Re: DMX master has issues

Post by medelec35 »

Hello this error:
dmx887.c:143:1: error: (192) undefined identifier "OSCCON"
Is suggesting that OSCCON does not exist in code code you have change target to.
If you search Flowcode components (use the magnifying glass)
Search for intosc, then add the Intosc helper to your 2D panel ,it will show you the name of the register used to set the hardware speed.
It is not OSCCON!
Look at the properties of Intosc helper,you can copy and paste the correct register name and value within your project.

Martins project is using 16F887 which does has an OSCCON register, you just changed to a device which does not.
Martin

mnfisher
Valued Contributor
Posts: 1514
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 138 times
Been thanked: 725 times

Re: DMX master has issues

Post by mnfisher »

Just got a handful of 16f18877 arrive.

So far - nothing from the UART (although I can if I use the UART component - in software mode) - UART component doesn't go to 250000 baud - but (in theory) initialising the EUSART is straightforward.

So - as yet - nothing - but some more fiddling time later - and hopefully we'll have something working...

chipfryer27
Valued Contributor
Posts: 1575
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 356 times
Been thanked: 560 times

Re: DMX master has issues

Post by chipfryer27 »

Hi

Using the FC component I created a chart that:-

Flashes 3 times as Osc check
Sets start to 05 (random value chosen by me), data ch11 to 0b10101010 (170 decimal)
Loops sending this info every three seconds.

I connected to a logic analyser.

I expected to see a Mark after Break (MAB)
A start bit (low)
My Start Code
Two Stop Bits (high)
Then zero for all channels (with associated start and two stops) until ch11, then zero after until last channel

Not quite what I got

Screenshot 2025-06-11 142058.jpg
Screenshot 2025-06-11 142058.jpg (45.01 KiB) Viewed 98 times


You can see only one stop bit, the second isn't generated, and it without the second stop bit the frame is too short and the position of the subsequent stop bits are moving position within frame.

dmx1_init.fcfx
(12.76 KiB) Downloaded 4 times

I'm not an expert in DMX just going by documented protocol.
Hope this helps

mnfisher
Valued Contributor
Posts: 1514
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 138 times
Been thanked: 725 times

Re: DMX master has issues

Post by mnfisher »

Finally cracked it - I had the wrong value for RC6PPS.... I must have changed every other line of code!

A very simple demo - write DMX data to C6. Always uses a command byte of 0 (this might be better as data[0] or a parameter to SendDMXPacket)- if different values are needed. I just send 24 channels - though up to 512 is okay.

There are some bits that could be tidied

Please check it is actually valid DMX data :-)

Martin
Attachments
dmx_test.fcfx
(14.1 KiB) Downloaded 5 times

chipfryer27
Valued Contributor
Posts: 1575
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 356 times
Been thanked: 560 times

Re: DMX master has issues

Post by chipfryer27 »

Hi

I can run through my analyser tomorrow morning and let you know.

Regards

beneee
Posts: 16
Joined: Tue Jul 13, 2021 2:02 pm
Has thanked: 1 time

Re: DMX master has issues

Post by beneee »

Hi Martin,

Great news, I am getting a valid signal on my tester, here are the details it is giving me.

Ben
dmx_test1.png
dmx_test1.png (332.76 KiB) Viewed 72 times

beneee
Posts: 16
Joined: Tue Jul 13, 2021 2:02 pm
Has thanked: 1 time

Re: DMX master has issues

Post by beneee »

Using the FC DMX component I can also get a valid signal as long as the outputted values don't change, when I added a simple macro that ramped the first 3 channels up and down at 3 different rates from 5 to 220 the fixture couldn't cope with the signal and the light flickered all over the place.
I am assuming the signal is just so corrupted the data is not where it is supposed to be.
Ben

beneee
Posts: 16
Joined: Tue Jul 13, 2021 2:02 pm
Has thanked: 1 time

Re: DMX master has issues

Post by beneee »

Well here is the output generated by the DMX_Master component, do you think the 0us Inter Byte Gap is the issue - if so is there a method of requesting the higher Ups to edit the component?

Thanks
Ben
DMX_Master.png
DMX_Master.png (304.19 KiB) Viewed 66 times

beneee
Posts: 16
Joined: Tue Jul 13, 2021 2:02 pm
Has thanked: 1 time

Re: DMX master has issues

Post by beneee »

DMX512.PNG
DMX512.PNG (364.55 KiB) Viewed 66 times

mnfisher
Valued Contributor
Posts: 1514
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 138 times
Been thanked: 725 times

Re: DMX master has issues

Post by mnfisher »

Looks promising.

I think there is a requirement for a minimum of 24 channels - and a maximum of 512.

I haven't added a set channel macro - though it would be easy to do.

Alternatively - in a calculation

Code: Select all

dmx_dat[channel_number 0..511] = value
We will be interested to hear how you get on... (with photos!)

Martin

Post Reply