Shop OBEX P1 Docs P2 Docs Learn Events
Simple_serial speed problem — Parallax Forums

Simple_serial speed problem

Damien AllenDamien Allen Posts: 103
edited 2007-06-06 06:08 in Propeller 1
Please can someone take a look at my code and tell me why I'm unable to communicate above 4800 baud using simple serial. I'm loading the program into the hydra and using the programming connection to connect to my PC. I have used 3 different pieces of modbus testing software which all work fine at 4800 baud or below. I would like to communicate at a bit more than that. I understand that simple_serial can communicate up to 19.2kps. I have also tried fullduplexserial, which I am unable to get working at all. If anyone can point me in the right direction that would be great.

Damo

Comments

  • M. K. BorriM. K. Borri Posts: 279
    edited 2007-05-28 11:32
    Maybe you have an electrical/hardware issue... line noise, something preventing the signal to rise/fall fast enough. I have simpleserial working up to 19.2 and up to 9.6 with the rxtime command added. I'm not an expert but it looks fine from here.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://forums.parallax.com/showthread.php?p=650217

    meow, i have my own topic now? (sorta)
  • Jasper_MJasper_M Posts: 222
    edited 2007-05-28 14:38
    AFAIK the simple serial and fullduplexserial only have 16 character circular buffers, and they overflow very easily. And because you have to read a single byte at a time, it's very hard to keep up with the serial speed.
  • Damien AllenDamien Allen Posts: 103
    edited 2007-05-28 14:46
    I thought simple_serial wasn't buffered, also i'm only recieving 8 bytes of data so I wouldn't think that would be so much of a problem.

    As for electrical noise my hydra is about a metre away from my PC and is surrounded by nothing electrical. The usb lead travels in free air to the PC.

    Damo
  • Jasper_MJasper_M Posts: 222
    edited 2007-05-28 14:54
    ...Hydra? I solved the same problem by just using the COPIO driver that comes with Hydra
  • M. K. BorriM. K. Borri Posts: 279
    edited 2007-05-28 15:00
    simple serial isn't buffered....

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://forums.parallax.com/showthread.php?p=650217

    meow, i have my own topic now? (sorta)
  • Damien AllenDamien Allen Posts: 103
    edited 2007-05-28 15:21
    Surely any comms driver that works on the demoboard should work on the hydra. I have no specific need for simple_serial, any comms driver will do as there arn't any resource limitations as my program is quite small. I would have loved to have written a comms driver straight into the modbus driver itself but I don't have the time or the knowledge.

    I will try the COPIO driver and let you know how i get on.

    Thanks

    Damo.
  • M. K. BorriM. K. Borri Posts: 279
    edited 2007-05-28 18:18
    You can copy and paste the tx and rx routines from simpleserial if you need something basic.... and I still think you have a hardware issue somewhere [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://forums.parallax.com/showthread.php?p=650217

    meow, i have my own topic now? (sorta)
  • Damien AllenDamien Allen Posts: 103
    edited 2007-05-28 18:27
    Hardwarewise i'm not sure what it could be. I have a spinstamp and a propclip which i think i'll try. As far as the communication routines go I may copy and paste them in and extend them with a parity bit so my modbus driver stays within the modbus spec.
  • Tom WalkerTom Walker Posts: 509
    edited 2007-06-05 18:23
    I wonder if it has anything to do with the fact that the Spin Stamp has a 10 mHz crystal...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Truly Understand the Fundamentals and the Path will be so much easier...
  • Damien AllenDamien Allen Posts: 103
    edited 2007-06-06 06:08
    i've not tried it on my spin stamp yet, I've only used it on my hydra.

    By the way has anybody had the chance to try the code??

    Damo
Sign In or Register to comment.