4D SYSTEMS FORUM

Register New Posts
 
 
 


Reply
 
Author Comment
 
simonfrfr

Avatar / Picture

Registered: 06/09/11
Posts: 221
Reply with quote #1 
Is there any way to get these to communicate (TX, RX)? Do I have to write up a code in Arduino to slow down the oscillation rate to 12 mhz? Thanks
__________________
Simon
ESPsupport

Moderator
Registered: 27/01/09
Posts: 4,256
Reply with quote #2 

Lots of people have them communicating.

 

Why do you think you need to do something 'special'?

simonfrfr

Avatar / Picture

Registered: 06/09/11
Posts: 221
Reply with quote #3 
You can tune your oscillator on the Arduino by simply delaying the clockspeed... so I don't know what I have to do to get them to communicate.... because it doesn't communicate for me.
__________________
Simon
ESPsupport

Moderator
Registered: 27/01/09
Posts: 4,256
Reply with quote #4 

Have you tried using this library? http://4d.websitetoolbox.com/post/4D-LABS-%CE-%BCLCD32PT(SGC)-3.2quot-Serial-LCD-Display-Module-Arduino-Library-5238318

simonfrfr

Avatar / Picture

Registered: 06/09/11
Posts: 221
Reply with quote #5 
Well, I wanted to use GFX mode. The library says that it is unavailable.
__________________
Simon
ESPsupport

Moderator
Registered: 27/01/09
Posts: 4,256
Reply with quote #6 

The library is for SGC.

 

I was just hoping you might be able to use it to get communications going between Arduino and the display.

 

Once you have it working and understand why you should be able to transport that knowledge to GFX

simonfrfr

Avatar / Picture

Registered: 06/09/11
Posts: 221
Reply with quote #7 
What I really meant was that I just need the display to receive a letter or somthing, and then it makes the display do something, but when i send somthing to the Arduino It doesn't seem to work..
__________________
Simon
newborn

Registered: 25/07/12
Posts: 3
Reply with quote #8 
Responding to Simon,

Yes I got data from my arduino to my SGC, but now trying to do it with GFX, no success yet.
If you want I can try to help you with the SGC stuff, but I am a newbie and am struggling myself. Good luck


__________________
signature
dekker314

Registered: 05/05/12
Posts: 18
Reply with quote #9 
Simon,

You can easily communicate from Arduino to the LCD while in GFX mode.  On the LCD side use COM1 (RX1 and TX1).  Look at section 2.11 in the GFX2 Internal Functions document.  I got the code shown below in one of 4D's samples:


#platform "uLCD-32PT_GFX2"
#inherit "4DGL_16bitColours.fnc"

/*************************************************
* Filename: my_BufferedRX.4dg
This code receives a character string on COM1 from an Arduino.
COM0 is used for programming the LCD
************************************************** /

var combuf[100];

func main()
    var n, ch,i;
    var charbuf[40];

repeat
    com1_Init(combuf, 30, ':' ); // set up a comms buffer, //requires ':' lead in character


    repeat
        if (com1_Sync()) // we have qualifier, now receiving
            putstr("QUALIFIED");
        endif
    until(com1_Full());

// at this point, packet in buffer is locked and any further characters are ignored until
// either a com_Reset (to return to polled mode) or re-initialization with com_Init(..);

    n := com1_Count();   // use the count to extract the buffer
                        // (or set to 20 so we try to over-read)
    while(n--)
        if( (ch := serin1()) < 0) ch := '.';  // print the chars we received, substitute a period if over-reading

        //display the received characters
        putch(ch);

        //build string to use later
        charbuf[n] := ch;
    wend


    com1_Reset();  // any pending characters are ignored until after the reset


forever

endfunc
simonfrfr

Avatar / Picture

Registered: 06/09/11
Posts: 221
Reply with quote #10 
Sorry, I forgot to post that I figured out GFX and sgc, thanks for the reply though.
__________________
Simon
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Powered by Website Toolbox - Create a Website Forum Hosting, Guestbook Hosting, or Website Chat Room for your website.