Arduino & 4d Display (Diablo)

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
markavo
Posts: 33
Joined: Wed Apr 11, 2018 11:10 pm
Has thanked: 10 times
Been thanked: 2 times
Contact:

Arduino & 4d Display (Diablo)

Post by markavo »

Hello

I'm after a little advice if i can please i have set up a short program that uses the diablo 4d systems touch screen in the main page all i have done is initialise the display then created a loop, within the loop i have created two macros

The 1st macro reads an external eeprom (i have also tested with internal Arduino eeprom) assigns to a variable upon one of two key presses from the display add or subtracts the number by 1 and the re-writes back to the eeprom and displays it to led digits on the 4d display.

The 2nd macro (at the moment will do more) when pressing the enter button on the 4d display send a string to the display saying “enter pressed” the same is setup for back button pressed.

I find the update to the screen very slow and missing screen presses, for example i can press the screen 2 - 3 times (the screen is detecting the down press as it changes colour) and it may only detect 1 key press out of the 3.

Hardware i’m using is Arduino 2560 R3
Diablo 4d Display
Flowcode 7.3

There is not a lot of code here to achieve the above but my question is the Arduino the bottle neck and not fast enough for achieving the above ?

Any recommendations please if this is the case for a faster development board that would keep up (will be adding lots lots more to achieve my project goal) maybe an arm processor i guess but would like a board that is compatible with flow code 7 (or flow code 8) and many outputs, PWM, analogue inputs, spi, i2c etc.

Can give code and video if required.

Thank you. :D

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: Arduino & 4d Display (Diablo)

Post by Benj »

Hello,

The code and a video might help so we can see what you mean by slow. The displays are not lightning fast and take a couple of seconds to completely redraw. This is independent of the processor speed.

markavo
Posts: 33
Joined: Wed Apr 11, 2018 11:10 pm
Has thanked: 10 times
Been thanked: 2 times
Contact:

Re: Arduino & 4d Display (Diablo)

Post by markavo »

Thanks Ben will get this uploaded now to view

The display i've noticed performs fast and well and a fast redraw of a full screen, that's why it led me to believe the bottle neck was the Arduino, will show you what i mean it will show the display responses to a down press of the user button (by turning yellow) but press not detected and is detected if keep pressing takes 2 - 3 attempt or sometimes take 1 press.

Thanks again.

markavo
Posts: 33
Joined: Wed Apr 11, 2018 11:10 pm
Has thanked: 10 times
Been thanked: 2 times
Contact:

Re: Arduino & 4d Display (Diablo)

Post by markavo »

Thank you. :D
Flowcode1.fcfx
(14.66 KiB) Downloaded 307 times
https://youtu.be/9JpH73co4w4

markavo
Posts: 33
Joined: Wed Apr 11, 2018 11:10 pm
Has thanked: 10 times
Been thanked: 2 times
Contact:

Re: Arduino & 4d Display (Diablo)

Post by markavo »

Any news please.

I’ve been doing a little reasearch and found this

d) Ensure you have the Reset Code in your sketch, for the Arduino to reset the Display Module at startup, so the display and Arduino are in sync and both are in a known state. Without this code, your program may not work at all, the display may appear to be not communicating, or you may have seemingly slow comms. Please refer to the Demo which comes with the Genie Arduino library, and implement the Reset logic in your sketch.

e) If you have a large program in WS4, you may need to increase the delay after your reset code in your setup() routine, from 3500ms to 5000ms or even higher. If the Arduino starts talking to the Display before the Display is ready, then it can flood the library and get the two out of sync and cause all sorts of grief.


It recommends this:

Code: Select all

 // Reset the Display (change D4 to D2 if you have original 4D Arduino Adaptor)
  // THIS IS IMPORTANT AND CAN PREVENT OUT OF SYNC ISSUES, SLOW SPEED RESPONSE ETC
  // If NOT using a 4D Arduino Adaptor, digitalWrites must be reversed as Display Reset is Active Low, and
  // the 4D Arduino Adaptors invert this signal so must be Active High.  
  pinMode(RESETLINE, OUTPUT);  // Set D4 on Arduino to Output (4D Arduino Adaptor V2 - Display Reset)
  digitalWrite(RESETLINE, 0);  // Reset the Display via D4
  delay(100);
  digitalWrite(RESETLINE, 1);  // unReset the Display via D4

  delay (3500); //let the display start up after the reset (This is important)
So at the start in main I’ve added a reset to the display first sending an output low then high (active low reset) with 100ms delay in between then 3.5 seconds delay after then I initialise the display, I see the screen blank and display ready on the display to indicate start up done (I send a string ready to the display) but I see no improvements still very slow from the communication side.

Thanks

markavo
Posts: 33
Joined: Wed Apr 11, 2018 11:10 pm
Has thanked: 10 times
Been thanked: 2 times
Contact:

Re: Arduino & 4d Display (Diablo)

Post by markavo »

Matrix

Is there any help on this subject please i have now switched from the Arduino to the nucleo-144 f746zg to see if this was a speed issue.

I am still getting slow acknowledgments from the MCU to the display and it gets worse the more code added within flowcode.
I do not get a NAK or ACK back from the code sent (for example a update of a digit via a button).

I can monitor the byte sent from the 4d and its instant but the MCU sometimes does not return anything the more code added the slower or lack of response from the MCU but i do get ACK back.

Does flowcode 7 or 8 use its own library for the Visi4d commands ? As this library been updated with the newest version ? as i can see other issues on this subject with an older library version or custom ones.

Thank you.

Post Reply