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.
DMX master has issues
-
- Matrix Staff
- Posts: 1954
- http://meble-kuchenne.info.pl
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 626 times
- Been thanked: 656 times
-
- Valued Contributor
- Posts: 1512
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 138 times
- Been thanked: 725 times
Re: DMX master has issues
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...
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...
-
- 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
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
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.
I'm not an expert in DMX just going by documented protocol.
Hope this helps
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
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.
I'm not an expert in DMX just going by documented protocol.
Hope this helps
-
- Valued Contributor
- Posts: 1512
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 138 times
- Been thanked: 725 times
Re: DMX master has issues
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
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
-
- 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
Hi
I can run through my analyser tomorrow morning and let you know.
Regards
I can run through my analyser tomorrow morning and let you know.
Regards
Re: DMX master has issues
Hi Martin,
Great news, I am getting a valid signal on my tester, here are the details it is giving me.
Ben
Great news, I am getting a valid signal on my tester, here are the details it is giving me.
Ben
Re: DMX master has issues
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
I am assuming the signal is just so corrupted the data is not where it is supposed to be.
Ben
Re: DMX master has issues
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
Thanks
Ben
-
- Valued Contributor
- Posts: 1512
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 138 times
- Been thanked: 725 times
Re: DMX master has issues
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
We will be interested to hear how you get on... (with photos!)
Martin
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
Martin