-
I try to make a DMX controller with a LGT8F328P-32 (LQFP32 PRO MINI NANO3; The only modifications I made are replaced the ATmega328 by the LGT8F328 board and switched from one channel to 6 channels. [code] // Constants for the program // inputs from the dip switches ( starting address) // container for the dip switch value int startAddress = 1; void setup () { DMXSerial.init(DMXReceiver); pinMode(EnablePin1, OUTPUT); pinMode(Input1, INPUT); // test outputs at startup/reset DMXcontroller void loop() { // translate the dip switches inputs into a number if (digitalRead(Input2) == HIGH) {Dip2 = 2;} if (digitalRead(Input3) == HIGH) {Dip3 = 4;} if (digitalRead(Input4) == HIGH) {Dip4 = 8;} if (digitalRead(Input5) == HIGH) {Dip5 = 16;} if (digitalRead(Input6) == HIGH) {Dip6 = 32;} if (digitalRead(Input7) == HIGH) {Dip7 = 64;} if (digitalRead(Input8) == HIGH) {Dip8 = 128;} startAddress = Dip1 + Dip2 + Dip3 + Dip4 + Dip5 + Dip6 + Dip7 + Dip8; // set the startAddress
delay (500);
} // last loop |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 15 replies
-
Maybe I am not the right one to respond to this post, but as far as I can see the DMXSerial library explicitly specifies that it supports exact Arduino boards Supported Boards and processors and LGT8FX... is not among them. Also if you look at the source of the DMXSerial library DMXSerial_avr.h you can see that it performs some low level AVR register manipulation. LGT8FX is different (at lower level) and does not have these registers. |
Beta Was this translation helpful? Give feedback.
-
Many thanks.I gone make the test with 16Mhz.Keep you informed.
Verzonden via Yahoo Mail op Android
Op di, dec. 20, 2022 om 22:48 schreef ***@***.***>:
You must select 16 MHz clock source anyway. Otherwise it won't work.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Thanks
Verzonden via Yahoo Mail op Android
Op wo, dec. 21, 2022 om 0:03 schreef ***@***.***>:
I could take a look on it tomorrow but I guess the dmxserial code needs to get fixed/modified.
Have dmx equipment, rs485 modules and oscilloscope at hand.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
If you want, I can also send you the code for the Arduino mega who is transmitting the dmx code.
Verzonden via Yahoo Mail op Android
Op wo, dec. 21, 2022 om 0:03 schreef ***@***.***>:
I could take a look on it tomorrow but I guess the dmxserial code needs to get fixed/modified.
Have dmx equipment, rs485 modules and oscilloscope at hand.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Board settings in arduino ID 👍 |
Beta Was this translation helpful? Give feedback.
-
Side note: This schematics of that project are... uhm... let's say "wrong". Arduino D2 has to be connected to MAX485 Pins /RE (low enables receiver) and DE (high enables sender). The Library uses this pin to switch RX/TX, and ONLY using this way works when you need RX/TX to program the flash (via USB). D2 after reset is floating, so MAX485 does no connect its output to RX. If not, it's mixing up DMX RX and USB RX serial signals. But problem then is: it drives the DMX bus HIGH for a around 1 second while resetting the arduino (as DE is pullup high), then competing with the DMX sender. This again is a flaw in the DMXSerial library, which should use 2 different I/O for driving the /RE and DE signals. If you only intend to RECEIVE data, want to still use USB serial for programming, and not killing your DMX bus while resetting the device you should connect DE to GND, and /RE to D2. |
Beta Was this translation helpful? Give feedback.
-
The controller is working after changing the variant to LQFP32 Many thanks for the support to all of you |
Beta Was this translation helpful? Give feedback.
The controller is working after changing the variant to LQFP32
Settings now :
board : LGT8F328
Clock source : internal
Clock 16 MHz
Variant :LQFP32 (miniEVB nano-style ans WAVGAT)
Arduino has ISP : default (64)
Programmer : ArduinoISP
Many thanks for the support to all of you