Loading ...
Sorry, an error occurred while loading the content.

Re: Still having problems communicating at higher baud rates

Expand Messages
  • revffwplay
    Thanks for your reply. This is another electronics board (I m actually trying to write programs to operate four different instruments). I can get the correct
    Message 1 of 7 , Apr 1, 2006
    • 0 Attachment
      Thanks for your reply. This is another electronics board (I'm
      actually trying to write programs to operate four different
      instruments). I can get the correct values back when I use the same
      exact settings (baud rate, parity, data bits, etc.) when using
      something like ZTerm just to make sure the device is
      communicating/working. An asterix is the only character with which
      the device will start, and end, the data, I don't know if I can change
      that. The next character that comes out is a plus sign, though. But,
      I can't get any numbers, or letters for that matter, to show up, no
      matter what the next character should be.



      --- In chipmunkbasicforum@yahoogroups.com, "Jeff Avery"
      <jeffz8user@...> wrote:
      >
      > --- In chipmunkbasicforum@yahoogroups.com, "revffwplay"
      > <revffwplay@> wrote:
      > >
      > > I'm having problems communicating to electronics boards using my
      > > Chipmunk basic program when the baud rate is higher than 1200 baud. I
      > > can only get the astericks back that surround the data, but never the
      > > data.
      >
      > My understanding is that the asterisks are being sent from the
      > electronic boards. In that case, you may still be having problems with
      > parity. An asterisk is hex 2A which has even parity. In a previous
      > message you said that numbers with even parity were not a problem
      > while those with odd parity were.
      >
      > Try replacing the asterisk with a plus sign (+) which is hex 2B and so
      > has odd parity. See if the plus signs print correctly in the same way
      > the asterisks do. If they don't show, then parity is still a problem
      > and maybe that's where your data is going.
      >
      > .....Jeff
      >
    • rhnlogic
      There s still stuff that could be hiding inside the b$ unless you print it out byte-by-byte (asc(mid$(b$,i,1)) Last time I tested the serial port stuff, I
      Message 2 of 7 , May 12, 2006
      • 0 Attachment
        There's still stuff that could be hiding inside the b$
        unless you print it out byte-by-byte (asc(mid$(b$,i,1))

        Last time I tested the serial port stuff, I think it
        was with an iBook plus USB/serial adapter at rates up
        to 38400.

        --- In chipmunkbasicforum@yahoogroups.com, "revffwplay"
        <revffwplay@...> wrote:
        >
        > No, when I print that initial b$ it only gives five or six blank lines
        > and then the asterick. Since my data comes out with two astericks,
        > one on each side of it, I tried putting the same for loop around my
        > data collection, so that the program looks like this now:
        >
        > 90 a$ = "$1RB" + chr$(13) :REM chr$(13) is needed for the board to
        > understand the command
        > 97 d$ = "0" :REM just to make sure I know when it prints the string
        > 100 print #1, a$
        > 130 rem macfunction("wait",0.25) : rem and adequate initial delay
        > 140 while : rem These while-loops allows the data to each be acquired
        > in their own string with minimal time lost.
        > 150 input #2,b$
        > 160 wend b$ = "*" :REM An asterick preceeds the data.
        > 170 while : REM To get the data into one string
        > 180 input #2, c$ : REM to get all the data out.
        > 190 d$ = d$ + c$
        > 270 wend c$ = "*" :REM A second asterick should trail the data.
        > 280 print d$
        > ...
        >
        > Now the program runs on in an infinite loop because it never catches
        > that second asterick. So, I'm assuming that first asterick I catch is
        > actually the second one that trails the data.
        >
        > Thanks,
        >
        > Dan
        >
        > --- In chipmunkbasicforum@yahoogroups.com, "rhnlogic" <rhnlogic@>
        > wrote:
        > >
        > > Looks like you never print out the contents of the first b$ input.
        > > Is anything in it?
        > >
        > > --- In chipmunkbasicforum@yahoogroups.com, "revffwplay"
        > <revffwplay@> wrote:
        > > >
        > > > Hi,
        > > >
        > > > I'm having problems communicating to electronics boards using my
        > > > Chipmunk basic program when the baud rate is higher than 1200
        baud. I
        > > > can only get the astericks back that surround the data, but
        never the
        > > > data. I've tried for loops to pick out the data, but I don't get
        > > > anything except the astericks. My data acquisition looks like this
        > > > (and works at lower baud rates, 1200 and below):
        > > >
        > > > ...
        > > > 90 a$ = "$1RB" + chr$(13) :REM chr$(13) is needed for the board to
        > > > understand the command
        > > > 97 d$ = "0" :REM just to make sure I know when it prints the
        string
        > > > 100 print #1, a$
        > > > 130 rem macfunction("wait",0.25) : rem and adequate initial delay
        > > > 140 while : rem These while-loops allows the data to each be
        acquired
        > > > in their own string with minimal time lost.
        > > > 150 input #2,b$
        > > > 160 wend b$ = "*"
        > > > 170 for i = 1 to 5000 : REM Enough loops to obtain all the data
        > > > reproducibly
        > > > 180 input #2, b$ : REM to get all the data out.
        > > > 190 d$ = d$ + b$
        > > > 270 next i
        > > > 280 print d$
        > > > ...
        > > >
        > > > when d$ is printed all I get at 9600 baud is:
        > > >
        > > > 0*
        > > >
        > > > *
        > > >
        > > > instead of:
        > > >
        > > > 0*
        > > > "some number"
        > > > *
        > > >
        > > > Does anyone have any suggestions?
        > > >
        > > > Thanks,
        > > >
        > > > Dan
        > > >
        > >
        >
      • revffwplay
        Okay, thanks, I ll check that. What processor in the iBook? I just tried my program with a G3 iBook recently and I couldn t locate the USB port with the
        Message 3 of 7 , May 17, 2006
        • 0 Attachment
          Okay, thanks, I'll check that.
          What processor in the iBook? I just tried my program with a G3 iBook
          recently and I couldn't locate the USB port with the
          macfunction("serialpath",n) command. All I could find was the modem
          port.

          --- In chipmunkbasicforum@yahoogroups.com, "rhnlogic" <rhnlogic@...>
          wrote:
          >
          > There's still stuff that could be hiding inside the b$
          > unless you print it out byte-by-byte (asc(mid$(b$,i,1))
          >
          > Last time I tested the serial port stuff, I think it
          > was with an iBook plus USB/serial adapter at rates up
          > to 38400.
          >
          > --- In chipmunkbasicforum@yahoogroups.com, "revffwplay"
          > <revffwplay@> wrote:
          > >
          > > No, when I print that initial b$ it only gives five or six blank lines
          > > and then the asterick. Since my data comes out with two astericks,
          > > one on each side of it, I tried putting the same for loop around my
          > > data collection, so that the program looks like this now:
          > >
          > > 90 a$ = "$1RB" + chr$(13) :REM chr$(13) is needed for the board to
          > > understand the command
          > > 97 d$ = "0" :REM just to make sure I know when it prints the string
          > > 100 print #1, a$
          > > 130 rem macfunction("wait",0.25) : rem and adequate initial delay
          > > 140 while : rem These while-loops allows the data to each be acquired
          > > in their own string with minimal time lost.
          > > 150 input #2,b$
          > > 160 wend b$ = "*" :REM An asterick preceeds the data.
          > > 170 while : REM To get the data into one string
          > > 180 input #2, c$ : REM to get all the data out.
          > > 190 d$ = d$ + c$
          > > 270 wend c$ = "*" :REM A second asterick should trail the data.
          > > 280 print d$
          > > ...
          > >
          > > Now the program runs on in an infinite loop because it never catches
          > > that second asterick. So, I'm assuming that first asterick I catch is
          > > actually the second one that trails the data.
          > >
          > > Thanks,
          > >
          > > Dan
          > >
          > > --- In chipmunkbasicforum@yahoogroups.com, "rhnlogic" <rhnlogic@>
          > > wrote:
          > > >
          > > > Looks like you never print out the contents of the first b$ input.
          > > > Is anything in it?
          > > >
          > > > --- In chipmunkbasicforum@yahoogroups.com, "revffwplay"
          > > <revffwplay@> wrote:
          > > > >
          > > > > Hi,
          > > > >
          > > > > I'm having problems communicating to electronics boards using my
          > > > > Chipmunk basic program when the baud rate is higher than 1200
          > baud. I
          > > > > can only get the astericks back that surround the data, but
          > never the
          > > > > data. I've tried for loops to pick out the data, but I don't get
          > > > > anything except the astericks. My data acquisition looks like
          this
          > > > > (and works at lower baud rates, 1200 and below):
          > > > >
          > > > > ...
          > > > > 90 a$ = "$1RB" + chr$(13) :REM chr$(13) is needed for the board to
          > > > > understand the command
          > > > > 97 d$ = "0" :REM just to make sure I know when it prints the
          > string
          > > > > 100 print #1, a$
          > > > > 130 rem macfunction("wait",0.25) : rem and adequate initial delay
          > > > > 140 while : rem These while-loops allows the data to each be
          > acquired
          > > > > in their own string with minimal time lost.
          > > > > 150 input #2,b$
          > > > > 160 wend b$ = "*"
          > > > > 170 for i = 1 to 5000 : REM Enough loops to obtain all
          the data
          > > > > reproducibly
          > > > > 180 input #2, b$ : REM to get all the data out.
          > > > > 190 d$ = d$ + b$
          > > > > 270 next i
          > > > > 280 print d$
          > > > > ...
          > > > >
          > > > > when d$ is printed all I get at 9600 baud is:
          > > > >
          > > > > 0*
          > > > >
          > > > > *
          > > > >
          > > > > instead of:
          > > > >
          > > > > 0*
          > > > > "some number"
          > > > > *
          > > > >
          > > > > Does anyone have any suggestions?
          > > > >
          > > > > Thanks,
          > > > >
          > > > > Dan
          > > > >
          > > >
          > >
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.