Announcement

Collapse
No announcement yet.

uLCD43-PT(SGC) Stamp BS2px24 serial comunication failed

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • ESPsupport
    replied


    You aren't trying to take more than 3ma from the port are you?

    Leave a comment:


  • hestrada6137
    replied


    Hi,
    I'm switching between two modes GFX and SGC,
    I would like to run under SGC but if doesn't work try GFX,
    my problem with GFX is not all ports are working as expected, I need like 10 ports as inputs and outputs
    Im testing with both,
    thanks.

    Leave a comment:


  • ESPsupport
    replied


    ViSi programs are for when you have the GFX PmmC loaded into the display.

    FAT Controller and serial commands are for when you have the SGC PmmC loaded into the display.

    Click the GFX or SGC tab under one of the products http://www.4dsystems.com.au/prod.php?id=114

    Your posts seem rather confused, initially I thought you were flipping between the two, but now I'm not so sure.

    Leave a comment:


  • hestrada6137
    replied


    Hi,
    thanks for fast reply,
    I used to format the uSD with an adapter, on windows,
    I sent commands from Fat controller and saved some screens and images, then display on LCD, ok
    only appears "mounting..." for a long time, I wait for 15 mins and nothing.

    my new code for my stamp ucontroller: using LCD as GCS;
    ' {$STAMP BS2px}
    ' {$PBASIC 2.5}
    Rx VAR Byte
    #SELECT $STAMP
    #CASE BS2, BS2E, BS2PE
    T1200 CON 813
    T2400 CON 396
    T9600 CON 84
    T19K2 CON 32
    T38K4 CON 6
    #CASE BS2SX, BS2P
    T1200 CON 2063
    T2400 CON 1021
    T9600 CON 240
    T19K2 CON 110
    T38K4 CON 45
    #CASE BS2PX
    T1200 CON 3313
    T2400 CON 1646
    T9600 CON 396
    T19K2 CON 188
    T38K4 CON 84
    #ENDSELECT
    Inverted CON $4000
    Open CON $8000
    Baud CON T9600
    '=====================================================================
    Main:

    PAUSE 2500
    DEBUG "antes",CR
    SEROUT 0, Baud, [$55] ' Autobaud
    PAUSE 1000
    GOSUB GetACK
    SEROUT 0,Baud, [$45] 'cls
    PAUSE 500
    GOSUB GetACK
    SEROUT 0,Baud, [$42,$00,$33,$66] 'blue screen
    PAUSE 500
    SEROUT 0,Baud, [$45]
    PAUSE 500
    SEROUT 0,Baud, [$40,$69]
    PAUSE 2500
    SEROUT 0,Baud, [$40,$6D,$6C,$6F,$67,$6F,$73,$63,$72,$00,$00,$5A,$00,$3C,$00,$00,$00,$00]
    PAUSE 500
    'GOSUB GetACK
    DEBUG "despues",CR
    END
    '****************
    'Sub-Routines
    '****************
    GetACK:
    SERIN 3, Baud, [Rx]
    IF (Rx = $06) THEN
    DEBUG "Rx = $06",CR
    RETURN
    ELSE
    DEBUG "NAK ", HEX Rx, CR
    DEBUG "loop", CR
    ENDIF
    RETURN

    It works only when disconnect Rx starts to accept commands, if not disconnected , gets stucked,
    Thanks for your support.

    Leave a comment:


  • ESPsupport
    replied


    Have the files been copied to uSD?

    Is the uSD FAT(16) formatted?

    Any messages?

    Are you try a sample?

    Leave a comment:


  • hestrada6137
    replied


    Hi,
    another question,
    using VISI I can see the gauges and objects on monitor but at time of compile and download nothing on LCD,
    I was trying changing some parameters but nothing,
    any suggestion?,
    Thanks.

    Leave a comment:


  • hestrada6137
    replied


    Hi, thanks for reply,
    I disconnect the MB5 and connect P2 (Tx) directly to Rx and worked, when I turn off computer and ucontroller and turn it again doesn't worked again.
    I checked pin_HI(BUS_0) trying to turn on a LED and nothing, here the code:

    #platform "uLCD-43PT_GFX2"
    func main()
    pin_Set(OUTPUT,13); //pin 13,BUS_5 = pin 17 on J2

    repeat
    pin_HI(BUS_5);
    pause(100);
    forever
    endfunc

    Thank you.

    Leave a comment:


  • ESPsupport
    replied


    There's some information here about BS2 baud rates.

    http://www.emesystems.com/BS2rs232.htm#Baudmode

    It seems to tie in with the table you have used, but it might give you some more ideas as to what might be happening

    Leave a comment:


  • ESPsupport
    replied


    To use the BUS pins individually, eg pin_HI(BUS_0) etc.

    You should be right with the MB5.

    Can you show a diagram of how you have connected your BS2?

    Leave a comment:


  • hestrada6137
    replied


    I can send commands via Terminal connect 9600 and working,
    so no communication with uprocessors.
    thx.

    Leave a comment:


  • hestrada6137
    replied


    Hi, do you think im having problems with my interface?
    Im using the ÎUSB-MB5 and still no connecting with my uController,
    do I need to buy the cable ?
    Do I need to open a usb cable and connect direct the wires to ucontroller instead to pins?

    and no success with bus_Set, bus_Out..


    any help welcomed, thanks.

    Leave a comment:


  • ESPsupport
    replied


    You might find the solution to your problem here http://4d.websitetoolbox.com/post?id=6070636

    In 4DGL you can use each of the Bus IO pins indivually

    Leave a comment:


  • hestrada6137
    replied
    Hi,
    Thanks for reply,
    this was my last code trying to comunicate,

    PAUSE 1000
    SEROUT 2\1, T9600,[$45] ' autobaud
    DEBUG "autobaud was sent",CR
    I will appreciate if you have some code to access such display with any of my uControllers,

    I learning 4DGL language, my problem is picaso controller has 5 pins like IO and I need more, can I use Bus IO pins to get information from some switches?
    Thank you.

    Leave a comment:


  • ESPsupport
    replied


    Don't understand that much.

    But anyway...

    Why are you trying to do inverted communication at 38.4kbaud inverted, shouldn't you be using standard 9600?

    Why are you playing with RST?

    Why aren't you waiting for an ACK after the Autobaud?

    Will your system be writing the '3, 1, 0' as the required 'words' or will it only be writing bytes?

    Leave a comment:


  • hestrada6137
    started a topic uLCD43-PT(SGC) Stamp BS2px24 serial comunication failed

    uLCD43-PT(SGC) Stamp BS2px24 serial comunication failed

    Hi everybody,
    I do have an uLCD43(SGC) display and failed to comunicate with my stamp BS2px24 .
    Included is my code that I used:
    #SELECT $STAMP
    #CASE BS2, BS2E, BS2PE
    T1200 CON 813
    T2400 CON 396
    T9600 CON 84
    T19K2 CON 32
    T38K4 CON 6
    #CASE BS2SX, BS2P
    T1200 CON 2063
    T2400 CON 1021
    T9600 CON 240
    T19K2 CON 110
    T38K4 CON 45
    #CASE BS2PX
    T1200 CON 3313
    T2400 CON 1646
    T9600 CON 396
    T19K2 CON 188
    T38K4 CON 84
    #ENDSELECT

    Inverted CON $4000
    Open CON $8000
    Baud CON T38K4 '+ Inverted

    rst PIN 4
    is_on CON 0
    is_off CON 1
    OUTPUT rst

    Main:
    DO
    rst = is_off
    PAUSE 200

    SEROUT 2, Baud,[$45] ' autobaud

    DEBUG "autobaud was sent",CR

    SEROUT 2, Baud,["s", 3, 1, 0, $FF, $E0, Yellow Text, $00] 'Send text to screen

    rst = is_on
    LOOP
    END

    'Any help is welcomed!, Thank you.
Working...
X