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
RS232 Help Please
Moderator: Benj
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
RS232 Help Please
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
- 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: RS232 Help Please
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.
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.
- Attachments
-
- Decoder.fcf
- (12.44 KiB) Downloaded 229 times
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
Re: RS232 Help Please
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
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
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
- 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: RS232 Help Please
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.
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.
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.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 ?
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
Re: RS232 Help Please
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
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
Last edited by acestu on Wed Aug 21, 2013 9:09 am, edited 1 time in total.
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
Re: RS232 Help Please
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
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
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
- 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: RS232 Help Please
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- 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: RS232 Help Please
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
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
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel