Page 2 of 2

Re: 4d Display Visi serial commands interface

Posted: Wed Aug 21, 2013 11:18 pm
by acestu
Hi Benj,
Benj wrote:Thinking about this.
Visi interface is loaded onto the SD card in the 4D display and it would be a huge undertaking to try and replicate all of this functionality.
If I could figure out how to parse the .dat file and generate the correct visuals for the visi front end then it may not be too bad to add simulation too. Is what we have already enough to make it useable?

Yes this is a brilliant start, thank you so much for doing this it means that we can use the components on the display to control the host micro, using the display as a serial slave would be a great tool also , but I realize you have a lot to do yet....

Cheers and thanks again

Acestu :D

Re: 4d Display Visi serial commands interface

Posted: Thu Aug 22, 2013 12:30 am
by acestu
Hi Benj,

I have tried to get your Visi Demo chart going but to no avail, I am enclosing the 4D Workshop file that I am using which has just the 2 rocker switches, could you take a look at it please and see if anything is wrong, I have set events on both rocker switches to "Report Message"

Thanks
Acestu
New-rocker.rar
(1009 Bytes) Downloaded 376 times
Thanks
Acestu

Re: 4d Display Visi serial commands interface

Posted: Thu Aug 22, 2013 9:39 am
by Benj
Hello,

Might be worth trying with the rockerswitch events set to none. With the event set to report the display will talk to the micro when the switch state changes. With the event set to none then you should be able to poll the state of the switch at your leisure.

Also worth checking the baud rate of the Flowcode component is set correctly looked like it should be 115200 rather then 9600.

Re: 4d Display Visi serial commands interface

Posted: Thu Aug 22, 2013 4:19 pm
by acestu
Hi Benj,

Is there any chance you could post the 4D Workshop file that you used to setup the Visi-Demo that you did please...

Cheers
Acestu

Re: 4d Display Visi serial commands interface

Posted: Thu Aug 22, 2013 8:49 pm
by acestu
Hi Ben,

I have been trying to get your Visi-Demo chart to work and noticed that the two commands for the rocker switch index 0 are the same, so is it not switching rocker 0 on and then switching it on again ?
Visi-Demo-Benj.png
(9.87 KiB) Downloaded 5633 times
cheers
Acestu

Re: 4d Display Visi serial commands interface

Posted: Fri Aug 23, 2013 10:12 am
by Benj
Hello,

Yes whoops the second VisiWriteObject call should be 0,0 not 0,1.

Not actually tested the code on hardware but it should be ok, went through it quite carefully. If your still having problems I will dig through for my 4D display and see if I can help you debug.

Re: 4d Display Visi serial commands interface

Posted: Fri Aug 23, 2013 12:38 pm
by acestu
Thank Benj,


I will have another look when I get home tonight, I could not find the baud rate on the component, so I thought I would try the TX/RX flasher but I could not get that working either...

cheers for now
Acestu

Re: 4d Display Visi serial commands interface

Posted: Fri Aug 23, 2013 1:55 pm
by Benj
Hello,

The component should default to 9600 baud but there is an issue with this as you need to call the init function to initialise the UART but this then assumes a old style display and ramps the UART speed up to a higher baud (57600 from memory). Not sure if the newer display supports this as is. Will probably end up seperating out the Visi stuff into a stand alone component so it's easier to determine if your drawing to the display or talking via the Visi interface.

Re: 4d Display Visi serial commands interface

Posted: Fri Aug 23, 2013 6:19 pm
by acestu
Hi Benj,

These are the baud rates that the 4d displays support in 4D Workshop..
Baud.png
(6.45 KiB) Downloaded 5624 times
cheers
Acestu

Re: 4d Display Visi serial commands interface

Posted: Sat Aug 24, 2013 3:10 pm
by Benj
Hi Stu,

New fully tested and working component now available from here: http://www.matrixmultimedia.com/mmforum ... 53&t=12734

Re: 4d Display Visi serial commands interface

Posted: Sun Aug 25, 2013 12:08 am
by acestu
Hi Benj,

Thanks for doing this so quickly, I know what I am doing all day sunday :lol: ..


Cheers
Acestu