Shop OBEX P1 Docs P2 Docs Learn Events
Propeller as Function Generator — Parallax Forums

Propeller as Function Generator

T ChapT Chap Posts: 4,223
edited 2006-08-09 05:26 in Propeller 1
I want to do some tests to simulate bi-directional serial communication over several different transmission methods, using only one Prop Stick for the test. I read in a post somewhere that the Prop can transmit serially at 400k. If that is the case, can a steady clock be generated on a pin at 400k as well? I want to generate a clock to represent a serial message, but it doesn't need to be anything other than just a clock for my test purposes. At the same time, I want to read that clock back in on another pin, and count the missed pulses (if any), and display the number of misses on a 2x16 display. I want to duplicate this on two more pins to test bi directional speed capabilities and errors.

Pin1 Send clock 1 at 400k, variable down to 2400
Pin2 Read clock 1 and display missed pulses on LCD
Pin3 Send clock 2 at 400k, variable down to 2400
Pin4 Read clock 2 and display any missed pulses on LCD


Is this doable? If so, what is the method to get that high of a rate of pulses out, plus the method to count and compare? Would you count as you output the clock, then compare the count back in, and if there is a shortage, display the number?

Thanks for any suggestions

Comments

  • pjvpjv Posts: 1,903
    edited 2006-08-05 18:14
    Hi Originator;

    As for the Propeller generating and detecting the signals.... sure, it can do it.

    I'm raising a point on your assumption that a simple clock will simulate data for the purpose of testing different communication schemes. For generating the pulses, fine, but detection could be another matter.

    This relates to the detection scheme you are contemplating, as many are susceptible to an unbalance in the number of sequential "ones" or "zeros" transmitted. In other words, varying pulse widths resulting from the data content. A simple clock does not adequately simulate this issue as it is always a nice even width.

    Just a note of caution to you.

    Cheers,

    Peter (pjv)
  • T ChapT Chap Posts: 4,223
    edited 2006-08-05 19:47
    Thanks for the heads up. Any suggestions for a test? Send some strings and compare on the Rx?
  • pjvpjv Posts: 1,903
    edited 2006-08-06 19:34
    Hi Originator;

    As a simple test, I would simply run a loop that increments an 8 bit counter, and transmit/receive the value of the counter each time through the loop.

    That way you know what you should have received.

    The 256 count values should suffice for simulating varying length one/zero combinations.

    Cheers,

    Peter (pjv)
  • T ChapT Chap Posts: 4,223
    edited 2006-08-07 05:01
    Ok great I'll give that a shot. Is there a tutorial anywhere or an existing object that describes what you are suggesting? I am new to the Propeller. Thanks
  • pjvpjv Posts: 1,903
    edited 2006-08-09 03:21
    Sorry, I don't think so....... what a great opportunity for you to whip one up, and learn in the process!!

    Cheers,

    peter (pjv)
  • T ChapT Chap Posts: 4,223
    edited 2006-08-09 05:26
    ----Started new thread with newer subject matter---

    Post Edited (originator99) : 8/9/2006 7:49:37 PM GMT
Sign In or Register to comment.