does dmx work on attiny chips

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 7.

Moderator: Benj

Post Reply
chrisbooth1957
Posts: 26
Joined: Tue May 23, 2017 1:55 am
Been thanked: 1 time
Contact:

does dmx work on attiny chips

Post by chrisbooth1957 »

i am trying to get the dmx to work using an attiny 84 ,,, there only appears to be the software option wicth is in itself not a problem but it default to ports not on the chip i am trying to use and they are greyed out so i am unable to use pins that are actuly on my chip

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: does dmx work on attiny chips

Post by Benj »

Hello,

The ATTINY84 device does not have a hardware UART, this is why it is not showing up in the channel property list for the DMX component.

I would advise a hardware UART for reliable communications so if possible I would choose a microcontroller with a hardware UART peripheral available.
DevHelper.jpg
DevHelper.jpg (67.42 KiB) Viewed 5961 times
I'll investigate why the pins are not becoming available to edit when in software mode.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: does dmx work on attiny chips

Post by Benj »

I believe I have now fixed the problem where the software pins were not editable.

Simply copy the attached components into your "Flowcode 7/components" directory and restart Flowcode to load in the changes.
DMX512Slave.fcpx
(11.07 KiB) Downloaded 282 times
DMX512Master.fcpx
(11.01 KiB) Downloaded 263 times
Let us know how you get on.

chrisbooth1957
Posts: 26
Joined: Tue May 23, 2017 1:55 am
Been thanked: 1 time
Contact:

Re: does dmx work on attiny chips

Post by chrisbooth1957 »

thank you that fixed it as you sugested looking at using the 2313 or 4313 as they have hardware

chrisbooth1957
Posts: 26
Joined: Tue May 23, 2017 1:55 am
Been thanked: 1 time
Contact:

Re: does dmx work on attiny chips

Post by chrisbooth1957 »

i am not sure if i understand how the dmxslave should work . i am asuming it should wait and time out without a dmx signel if so it does not it just hanges there choice what times i set for the time out

second issue i am asuming a need to set the datachannes to 512 to recice all 512 channeles . when i do this it returnes them to 256 .. . i am using a atmega328 so has lots of ram but this appears to be a very waistfull way of doing this

what i am trying to do is control 4 relays using dmx and have the address set using 9 dip swicthes , i only need to recive 4 channels but i am unable to select the channes to recive using flowcode so i asume will need to recive the full 512 and then just read the 4 channes i need

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: does dmx work on attiny chips

Post by Benj »

Hello,

Please can you post your program and that will help me investigate the problems you are reporting.

chrisbooth1957
Posts: 26
Joined: Tue May 23, 2017 1:55 am
Been thanked: 1 time
Contact:

Re: does dmx work on attiny chips

Post by chrisbooth1957 »

what i am trying to do is read the dip swicthes and then do something with the 9 bit dmx address (512) one problem is i can set the DMX slave to recive 512 channels it says the max is 512 but when i enter that is changes it to 256

it would be a lot better if i was able to change the dmx start address and number of channes recived in the main flowcode component macro as it is i will need to read the full 512 channes when i only need 3 as i dont know wicth 3 untill the dip swiches are read . it is normal to want to change the address of a fixture on the fly

i have tried changing the proccosor to a larger device as i dont think this one will have enough ram to read 512 channels and that does not fix the problem

not shown there but i have added some leds before and after the dmx call and it hanges waiting for the dmx to time out ) i remove the dmx call and the leds flash so the loop workes

not sure how difecult it would be to add the channes recived to the recive data chain macro ? that would make it a lot more usable , my sugestion would be start address and number of chanels then it would not matter that you appear to only be able to recive 256 channels as i have never come accross a fixture than needs more than 192 channels
Attachments
attiny_dmx_relay.fcfx
(16.88 KiB) Downloaded 270 times

Post Reply