Shop OBEX P1 Docs P2 Docs Learn Events
Dual Serial Communication Problem — Parallax Forums

Dual Serial Communication Problem

Chuck MintonChuck Minton Posts: 45
edited 2010-11-17 09:46 in Propeller 1
I am programming a prop to communicate to a serial display that takes packets normally at 115200 baud and I have a serial feed I need to watch at 2400. The program seems to be stumbling when both are implemented. The 115200 one is run in a separate object that uses FullDuplexSerial.
The 2400 piece is running from Parallax Serial Terminal.
Both are started in the base cog.
I am using 4 other cogs, plus the base cog concurrently. It looks like PST and FDS both use a cog and the stacks are set wide apart. So that puts me at 7 cogs used I think.

How can I tell where the clash is happening?
Is this typically a problem?
I have programmed other system with multi baud comm and not a problem (2400, 4800 and 9600) in one prop.

Thanks
/Chuck

Comments

  • T ChapT Chap Posts: 4,223
    edited 2010-11-16 14:21
    You can use the 4port serial object at those speeds easily, takes one cog and is easy to use.

    If you think one of your stacks is running over to the next address in the var declarations, then put a dummy array after the stack in questions, monitor the stack elements with code and PST to see if they are getting affected.
    VAR   
           LONG stack1[24], dummystack[12]
    
    PUB MAIN
         'Do the main work
         pst.dec(dummystack[0])
         pst.dec(dummystack[1])  'etc to view all the elements
    
    

    If any of the dummy elements are getting changed, then your stack is not large enough and is spilling over to the next declaration.
  • Chuck MintonChuck Minton Posts: 45
    edited 2010-11-17 09:39
    Is the intention of the 4port for cog control??

    Tnx for the mechanism to check stacks. That will be useful for sure. Yesterday the only way I could tell it was a cog thing was to close a cog...and well ...it worked. I worked it out by integrating two of the cogs functions together and OK for now. Part of it is I am lazy and the Propeller makes it easier to be lazy ..... it is GREAT!

    So, if the 4port is a cog managment thing That will be good. I attended the first annual Prop Fest and that was my start to programming in 25 years. Have a lot of chtching up to do.
    Thanks T Chap!
    /Chuck
  • Chuck MintonChuck Minton Posts: 45
    edited 2010-11-17 09:46
    found it 4 port .... that will help lots!! Fantastic!
Sign In or Register to comment.