Shop OBEX P1 Docs P2 Docs Learn Events
Cannot make FullDuplexSerial work with USB connection — Parallax Forums

Cannot make FullDuplexSerial work with USB connection

cleocleo Posts: 3
edited 2008-02-25 14:01 in Propeller 1
Hello,


I am a newbie and as a first step, I want to make propeller
communicate with my PC. I used FullDuplexSerial and created
really simple communication program below. (also attached)

It (should) starts FullDuplexSerial object with pin 30(TX), 31(RX),
outputs "Hello, world", and outputs every input charactor.
But in reality, it just outputs "Hello, world", and does not take any input.

I am using hyperterminal for input/output interface and prop and pc
is connected via USB cable.

I thought about the possibility of crooked RX pin, and replaced
the propeller, but the same situation.

Am i missing something?

con
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000

TXPIN = 30
RXPIN = 31

CR = 13
LF = 10

obj
serialio: "FullDuplexSerial"

pub main | receivedbyte

serialio.start(RXPIN,TXPIN,%0000, 9600)

serialio.str(string("Hello, World"))
repeat

waitcnt(clkfreq + cnt)
receivedbyte := serialio.rxcheck

if(receivedbyte <> -1)

serialio.tx(receivedbyte)
serialio.tx(CR)
serialio.tx(LF)

Comments

  • deSilvadeSilva Posts: 2,967
    edited 2008-02-21 02:31
    Your program is fine. The delay however is unnecessary and a little bit confusing!
  • cleocleo Posts: 3
    edited 2008-02-21 03:26
    Thank you deSilva!

    Sorry to confuse you. I should have eliminated that part.

    Okay, so, the program itself is fine...

    I will check with my friend's computer tomorrow and see how it works...
  • paul6502paul6502 Posts: 7
    edited 2008-02-21 21:12
    I am trying to get this to run also. The prop tool won't load the program if hyperterm is open because of the com port conflict (it seems). If I start hyperterm after the program loads and runs I don't get any chars back when I send data. when I quit hyperterm it seems to reboot the prop. Is this not really a good setup? , Thanks
  • deSilvadeSilva Posts: 2,967
    edited 2008-02-21 21:16
    You can use Aribas PropTerm, which is not as versatile as HyperTerminal but has a lot of additional options...
    In fact I use PropTerm as I use PC_Interface for all of my debugging and most user interfaces.
    Never thought of using Hypertermina for months...
  • paul6502paul6502 Posts: 7
    edited 2008-02-21 22:14
    Where can I find these? I tried using realterm, got the same results as with hyperterm. The program running on the prop should keep running when proptool is shutdown, right?
  • deSilvadeSilva Posts: 2,967
    edited 2008-02-21 22:23
    e.g. insonix.ch/propeller/prop_term.html
    The download is near the end.
  • paul6502paul6502 Posts: 7
    edited 2008-02-21 22:51
    That works! thanks so much! I wonder why the other terms don't...?
  • dfletchdfletch Posts: 165
    edited 2008-02-22 04:33
    Doh! How did I get anywhere with my VGA driver without this? It is something of a minor miracle. This should speed things up, being able to actually see the numbers! smile.gif
  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-02-22 19:01
    paul6502 said...
    That works! thanks so much! I wonder why the other terms don't...?
    They do work, you just need to know the correct way of setting things up and physically manage the com port, if you don't follow the correct procedure it won't work.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • paul6502paul6502 Posts: 7
    edited 2008-02-22 21:45
    I set the baud rate and com port the same on the terminal apps. (com4 - 9600 n/8/1)
    Not sure what you mean by "setting things up and physically manage the com port"
  • cleocleo Posts: 3
    edited 2008-02-23 00:20
    Thank you all, i made it work finally.

    > Paul

    thank you, it was indeed the settings. I specified no flow control in hyperterminal modem
    configuration, and it worked just as I wanted. I did doubt my code itself, but forgot to
    doubt my configuration.


    > deSilva

    thank you for information of Prop Terminal. we can do much more thing on this terminal.

    I am very happy that I could get rid of my concern from last week [noparse]:)[/noparse]
  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-02-23 04:46
    paul6502 said...
    I set the baud rate and com port the same on the terminal apps. (com4 - 9600 n/8/1)
    Not sure what you mean by "setting things up and physically manage the com port"
    You also have to make sure flow control is off. What I mean by manage is if you are also doing development you have to make sure you disconnect the Terminal or you cant program the propeller. You have to physically "manage" the port.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • paul6502paul6502 Posts: 7
    edited 2008-02-25 14:01
    Turning flow control off was the issue. Thanks. Shutting down the terminal program (any of them) will still reboot the prop. Not that big of a deal to me, but just curious if this is expected behavior.
Sign In or Register to comment.