Shop OBEX P1 Docs P2 Docs Learn Events
Two serial ports one cog — Parallax Forums

Two serial ports one cog

electric550electric550 Posts: 122
edited 2009-06-10 02:01 in Propeller 1
Has anybody run more than one serial port in a single cog, simultaneously? Or should I expect to be using two cogs to have two serial ports at 115200?

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-06-09 20:48
    Transmitting, receiving, or both? If both, full duplex?

    -Phil
  • TimmooreTimmoore Posts: 1,031
    edited 2009-06-09 20:55
    There is a 4 port driver on obex - 4 ports at 115000
  • electric550electric550 Posts: 122
    edited 2009-06-09 21:03
    Serial line one would need to send out high data rate sensor data, and read in low data rate commands...say 3 times a second
    Serial line two would need to send out low data rate sensor data, and receive low data rate commands...say 3 times a second


    possibly another thing...the data being sent OUT is very similar. Is it possible to transmit the serial data out on two pins at the same time? That way minimal extra processing would go on. The RX lines would still need to be different because they would be sending different data.

    So I would say that it could get by with half duplex, although full duplex would be nice.

    I guess hooking up two serial ports to one pin on the prop would allow for data to be sent out on both, but I would like to avoid that if possible.
  • electric550electric550 Posts: 122
    edited 2009-06-09 21:04
    That sound very interesting I will have to take a look at that thanks!
  • electric550electric550 Posts: 122
    edited 2009-06-09 22:00
    Yep that is just what I was looking for I made another post about xtal and clock speed but it looks like it is indicating that they used a 6MHZ crystal for the code. I assume that the code runs on a board with 5Mhz xtal? Anyways hopefully other post will discuss this topic a bit more. Thanks Again!
  • TimmooreTimmoore Posts: 1,031
    edited 2009-06-09 22:16
    Yes, it works fine at 5Mhz. It calculates the delays for waitcnt based on the clock speed.
  • Mike HuseltonMike Huselton Posts: 746
    edited 2009-06-10 02:01
    Thanks, Tim. It worked for me, also. I just used the code last week.

    Great job!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    JMH
Sign In or Register to comment.