DMX master has issues

For general Flowcode discussion that does not belong in the other sections.
beneee
Posts: 16
http://meble-kuchenne.info.pl
Joined: Tue Jul 13, 2021 2:02 pm
Has thanked: 1 time

DMX master has issues

Post by beneee »

Hi All,

Having spent weeks trying to get the DMX master to output a stable signal I have eventually worked out there is something suspect with it.

I have tried the output on multiple devices with different degrees of success.

A 3 channel DMX fixture (RGB) behaves very oddly on a 3 channel output however if send the 3 colour signals on Channel 1,3 and 5 it sort of works - I have repeated error on multiple fixtures.

Analysing the actual dmx data it appears that when I place a value on a channel inserts the data and then pushes up the remaining channels (sometimes) - it's so odd it is extremely difficult to figure out what is happening.

Is there any other way of getting help other than the forum as unfortunately it looks like this component is not very widely used so I am kind of stuck.

I am currently using FC8 as that is what I am licenced for however FC10 behaves exactly the same way.

Thanks
Ben

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 »

Hi Ben,

I've not used the component - but looking at the source code it looks very pic specific - as it had various if pic16 / pic32 sections.

It's also quite demanding as it should be 250000 baud which might be beyond some MCUs.

I tried a pic32 and got an output (on an oscilloscope) but not sure it was correct...

Martin

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

Re: DMX master has issues

Post by beneee »

Thank you,

I am running it on a 18877 @32mhz

The problems start when I am constantly changing the output values as when the values don't change the output is consistent otherwise the channels seem to jump around.

I am almost at the point of scrapping the project as it is due to go live next week and it should have been a fairly simple thing but has taken weeks to get nowhere.

Ben

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 »

I don't have the same chip to test on - but I pulled an example from the web and coerced it into Flowcode.

Perhaps you could try this - I've set it to out on Pin C0 (and for speed it is hardcoded to this - sorry) If it outputs anything - we could perhaps look at changing this if needed!

I've set it to output 24 channels (set as 0..23) every 10ms.

Not expecting miracles - remote debugging is a nightmare - but worth a shot!

Martin
Attachments
dmx1.fcfx
(13.68 KiB) Downloaded 7 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 have the targets being used by both of you, and analysers / scopes to see what is happening. Unfortunately I won't be able to do much until next in my Evil Lab, but happy to check once there. Possibly tomorrow but no guarantee.

Regards

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

Re: DMX master has issues

Post by beneee »

Thank you so much, I have uploaded it to the chip but unfortunately i can't get the chip to output, I have added an output for an led (C1) on the 2nd loop but it is failing to flash so I think the chip maybe freezing somewhere in the SenDMXpacket macro.

Sorry

Ben

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

When I face such problems I add in some temporary "debug" code which could be to output information over the UART, or just flash an led at certain points within the program to let me know where it is at, or where it hasn't reached...

Regards

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 »

Sadly, and the most likely outcome for a first attempt :-( - still one step forward.... I didn't add any OSCON settings - though seemed to be set at 32MHz internal oscillator - so assumed it didn't need this. Good to check though - no clock, nothing happens....

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

Re: DMX master has issues

Post by beneee »

If this is any help this document about DMX is really we written from someone making DMX stuff using atmels - I have made a few of his projects and they are great.

Thanks
Ben
DMX Specs.pdf
(167.69 KiB) Downloaded 10 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 downloaded Martin's chart, added in OSC settings as per "helper" and included a flash test for sanity. This pulses pin C2 three times, goes low then after the DMX is initialised goes high.

dmx1.fcfx
(15.8 KiB) Downloaded 5 times

This is just to see if anything is happening.

On the below trace Ch0 is the DMX pin (C0) with Ch1 on C2 monitoring pulses.

DMX.jpg
DMX.jpg (34.78 KiB) Viewed 112 times

As you can see the pulses are captured but the DMX pin remains flat. No output.

Regards

Post Reply