Shop OBEX P1 Docs P2 Docs Learn Events
Help with PC interface and propeller — Parallax Forums

Help with PC interface and propeller

sgt_mathissgt_mathis Posts: 3
edited 2008-11-05 02:46 in Propeller 1
Could someone please help me. I am trying to write a program that allows me to a com port interfacing program like Hyperterm, PuTTY, or the Parallax Serial Terminal program. I wish to use the Prop Plug to facilitate this communication. I have tried using SimpleDebug.spin and FullDuplexSerial.spin but when i write a basic program to constantly send one test character, I get back nothing but garbage. Could someone please help me with this. I can't continue my project until I figure this out. Thanks

Comments

  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-11-04 22:26
    There's some code on this thread (http://forums.parallax.com/showthread.php?p=675748)
    that might be of help to you.

    Tell us a little more about what you are trying to do and share the code you are using.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with a Propeller Protoboard?
    Check out: Introduction to the Proboard & Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card connected? - PropDOS
  • JasonDorieJasonDorie Posts: 1,930
    edited 2008-11-04 22:32
    sgt_mathis said...
    Could someone please help me. I am trying to write a program that allows me to a com port interfacing program like Hyperterm, PuTTY, or the Parallax Serial Terminal program. I wish to use the Prop Plug to facilitate this communication. I have tried using SimpleDebug.spin and FullDuplexSerial.spin but when i write a basic program to constantly send one test character, I get back nothing but garbage. Could someone please help me with this. I can't continue my project until I figure this out. Thanks

    I've done this with no problems. Are you using a crystal or the internal oscillator? The timing is too precise for it to be stable without an external crystal or resonator.

    SimpleDebug, written in Spin, also has a relatively low max speed. I've used it for 9600 bps with an 80mhz clock. It won't do 115,200.

    Jason
  • sgt_mathissgt_mathis Posts: 3
    edited 2008-11-04 22:42
    I am working on a project in which we are trying to make a GPS autopilot system for a model aircraft. I am hoping to use a PC, through the previously mentioned programs, to give the system it's waypoints just prior to takeoff. The test source that i'm using is posted below:

    OBJ

    console : "FullDuplexSerial"

    VAR

    PUB main
    console.start(31, 30, 0, 9600)
    repeat
    console.tx("p")
  • AribaAriba Posts: 2,687
    edited 2008-11-04 22:58
    If that is the whole code, then you work with the internal RCfast clock, which is not precise enough.
    Include something like this at begin:
    CON
    _clkmode = xtal1 + pll16x
    _xinfreq = 5_000_000
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-11-04 23:00
    CON
    _clkmode = xtal1 + pll16x
    _xinfreq = 5_000_000
    
    
    OBJ
    
    console : "FullDuplexSerial"
    
    VAR
    
    PUB main
    console.start(31, 30, 0, 9600)
    repeat
       console.tx("p")
    
    




    Do you have the console line indented like above? If not, you'll only get a single "p"
    What happens if you change the "p" to 65? Do you get a line of A's?

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with a Propeller Protoboard?
    Check out: Introduction to the Proboard & Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card connected? - PropDOS
  • sgt_mathissgt_mathis Posts: 3
    edited 2008-11-05 02:46
    sweet. That worked. Thanks everyone. This will help my project greatly.
Sign In or Register to comment.