cogserial - fullduplex smart serial using interrupt

12346»

Comments

  • @msrobots

    Please look at the above code. Is there an issue with cogserial at 9600 baud?
    Thanks
    “Light thinks it travels faster than anything but it is wrong. No matter how fast light travels, it finds the darkness has always got there first, and is waiting for it.”
    “You only live twice:
    Once when you are born
    And once when you look death in the face”
  • I am getting this error.
    “Light thinks it travels faster than anything but it is wrong. No matter how fast light travels, it finds the darkness has always got there first, and is waiting for it.”
    “You only live twice:
    Once when you are born
    And once when you look death in the face”
  • Hi @pilot0315,

    I have to look into that error, but you might can use my other attempt of a 2-port driver, this one just uses one file and is more in line with FastSpin's drivers.

    Enjoy!

    Mike
    I am just another Code Monkey.
    A determined coder can write COBOL programs in any language. -- Author unknown.
    Press any key to continue, any other key to quit

    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this post are to be interpreted as described in RFC 2119.
  • @msrobots
    Thanks I will look at that.
    “Light thinks it travels faster than anything but it is wrong. No matter how fast light travels, it finds the darkness has always got there first, and is waiting for it.”
    “You only live twice:
    Once when you are born
    And once when you look death in the face”
  • @msrobots

    Thanks for the try but getting the same. Hex spits out hex, dec spits out numbers str spits out gibberish.

    Martin
    “Light thinks it travels faster than anything but it is wrong. No matter how fast light travels, it finds the darkness has always got there first, and is waiting for it.”
    “You only live twice:
    Once when you are born
    And once when you look death in the face”
  • @msrobots

    Same with cogserial
    “Light thinks it travels faster than anything but it is wrong. No matter how fast light travels, it finds the darkness has always got there first, and is waiting for it.”
    “You only live twice:
    Once when you are born
    And once when you look death in the face”
  • pilot0315 wrote: »
    @msrobots

    Thanks for the try but getting the same. Hex spits out hex, dec spits out numbers str spits out gibberish.

    Martin

    you have to do something wrong.

    can you post some code to look at?

    Mike
    I am just another Code Monkey.
    A determined coder can write COBOL programs in any language. -- Author unknown.
    Press any key to continue, any other key to quit

    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this post are to be interpreted as described in RFC 2119.
  • @msrobots


    Sorry for not sending the code sooner. I cannot get anything working at 9600 baud. Tried serveral gps models from parallax all have 9600 baud.
    Have had excellent experience with the P1 doing this in PropC or Spin. I looked at the Cogserial code as well as the fullduplexserial2 and I do not see anything obvious to me. Eventhough I am not an expert in asm language.
    Thanks for the help.

    No rush.
    “Light thinks it travels faster than anything but it is wrong. No matter how fast light travels, it finds the darkness has always got there first, and is waiting for it.”
    “You only live twice:
    Once when you are born
    And once when you look death in the face”
  • as I was thinking it looks like you are using strings wrong.

    Spin does not have types so a string is just a address in memory pointing to some memory location hopefully ending with a byte 0.

    ser.str(string("test",10,13)) should work and output the text "test" followed by a new line.

    It basically defines a 'string' of bytes in memory like

    byte "test",13,10,0 and gives the memory address of that location to the function ser.str(…)

    gpsraw := gpsd.rx
    ser.str(gpsraw)

    can not work

    gpsraw is a long, a memory address where you can access 4 bytes. so your rx receives the lowest byte in gpsraw. As it should do. Say you get a "A" then gpsraw will be the number 65 stored at @gpsraw in memory.

    But this is not a string. It is just a number in one of the 4 bytes described by gpsraw, defined as long.

    ser.tx(gpsraw) will give you the character received...

    Mike



    I am just another Code Monkey.
    A determined coder can write COBOL programs in any language. -- Author unknown.
    Press any key to continue, any other key to quit

    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this post are to be interpreted as described in RFC 2119.
  • @msrobots

    I thank you for your help. I am attempting to port from the code in spin and PropC from P1. So we shall see.
    Again thanks.
    Martin
    “Light thinks it travels faster than anything but it is wrong. No matter how fast light travels, it finds the darkness has always got there first, and is waiting for it.”
    “You only live twice:
    Once when you are born
    And once when you look death in the face”
  • Yeah, if you more familiar with C, use C.

    With fastspin you still can use FullDuplexSerial2.spin, there are examples you define FullDuplexSerial2.spin as a class and can use it from C.

    Enjoy!

    Mike
    I am just another Code Monkey.
    A determined coder can write COBOL programs in any language. -- Author unknown.
    Press any key to continue, any other key to quit

    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this post are to be interpreted as described in RFC 2119.
Sign In or Register to comment.