Page 1 of 1
RS232 Help Please
Posted: Tue Aug 20, 2013 9:55 pm
by acestu
Hi,
I am trying to get the 4D display working with a pic and I need to send the info from the display to the controller via serial, I am enclosing a pic of the commands that a simple switch sends via serial when it is switched off or switched on, could somebody please tell me if it is possible to do this, I suppose it would be a chart that listens out for the serial data and simply changes the state of a pin accordingly..
Thanks In Advance
Acestu
Re: RS232 Help Please
Posted: Tue Aug 20, 2013 10:19 pm
by Benj
Hi Stu,
How about this? I used a finite state machine approach to wait for the detection of the bytes 1,2. Once these are are detected we wait until byte 5 and then check the value to determine if we are switching the LED on or off. Byte 4 also has information but I am currently throwing this away. You could add another branch to the switch statement to collect byte 4 if it is useful.
Re: RS232 Help Please
Posted: Tue Aug 20, 2013 10:51 pm
by acestu
Hi Benj,
To be honest I am not sure what is going on with the info that the display sends, is the information that is sent, the green digits in brackets, and if so why are their 12 numbers ?.
So am I right in thinking that all of that info is needed and detected, the first line is when the switch is switched off, and the second lot of info is when the switch is switched off, do you think it would be an idea to build a little circuit on a breadboard that shows what the display sends on an LCD ?
Thanks
Acestu
Re: RS232 Help Please
Posted: Tue Aug 20, 2013 11:06 pm
by Benj
Hi Stu,
I'm assuming that the actual data being sent and received is the bit in the square brackets in hex format so 00 to FF to represent the values 0 to 255.
I'm currently looking into a full featured visi interface for Flowcode v6 so will know more once I have got a bit further with this. The prog I send should work with the values you posted but other values may differ.
do you think it would be an idea to build a little circuit on a breadboard that shows what the display sends on an LCD ?
If you could do this then it may prove very useful. I have a new 4D systems display in a box somewhere so I will have a dig.
Re: RS232 Help Please
Posted: Tue Aug 20, 2013 11:19 pm
by acestu
Hi Benj,
Yes I will have a go at the LCD circuit then, and the Visi module for FC6 would be brilliant as they are a brilliant piece of kit, I have just taken delivery of a 4d Beaglebone Black touchscreen cape and it is amazing because the video driver and screen resolutions on the Beaglebone Black are not as good as the Raspberry Pi...
cheers
Acestu
Re: RS232 Help Please
Posted: Tue Aug 20, 2013 11:33 pm
by acestu
P.S.
There is a new version of 4D Workshop available to download now FREE:
http://www.4dsystems.com.au/product/10/ ... hop_4_IDE/
cheers
Acestu
Re: RS232 Help Please
Posted: Wed Aug 21, 2013 9:42 am
by Benj
Aha,
The bytes in green are being transmitted to the 4D screen, the bytes in Red are being sent by the screen. Makes a lot more sense now
v6 interface coming along nicely.
the 4th byte 00 and 01 are off and on commands, the last byte 03 and 02 is a check sum byte.
Re: RS232 Help Please
Posted: Wed Aug 21, 2013 10:54 am
by Benj
Hello,
The Flowcode v6 Visi Interface for the EB076 component has now been done and is available from here.
http://www.matrixmultimedia.com/mmforum ... 793#p50793