Shop OBEX P1 Docs P2 Docs Learn Events
New to Propeller — Parallax Forums

New to Propeller

TimHTimH Posts: 48
edited 2009-05-11 02:12 in Propeller 1
blush.gif·Hello Folks
I'm new to the Propeller and just going through the examples using the PPDB.
I have some PIC assembler, C and PIC Basic Pro experience, but am new to Spin/
I have inspected some of the Objects included in the Propeller Tool and have a couple of, probably simple questions.

I want to send a simple serial byte (or series of bytes)·and want to use the FullDuplexSerial Object.
There seems to be very little documentation on using these Objects ie max baud rate, how do I send a String verses a numeric value verses a single character. Does anyone have a simple example of including this Object.

Comments

  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2009-05-09 17:01
    I believe that one of the educational labs for the Propeller covers th serial or simple serial or PC debug object that can answer your questions on sending text or numeric.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter, E.I.
    www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
    www.tdswieter.com
  • LeonLeon Posts: 7,620
    edited 2009-05-09 17:17
    Simple_Serial.spin has functions for sending/receiving single bytes and strings. They are quite easy to use.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle
  • TimHTimH Posts: 48
    edited 2009-05-09 17:23
    I saw the simple_serial object and it does have some documentation with it, but only baud rates to 19200 are possible - (I assume because it is written only in Spin). The FullDuplexSerial Object seems like a better choice - because I think it would handle more and higer baud rates but cannot see anything about the "specs" on this Object.

    Tim
  • LeonLeon Posts: 7,620
    edited 2009-05-09 17:41
    FullDuplexSerial isn't really any harder to use, and is fairly well-documented. Why not try it? It runs at all the usual baud rates.

    To send a string you simply use str(stringptr). To send a decimal number you use dec(value).

    If you have problems, post your program here and you will get some help.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle

    Post Edited (Leon) : 5/9/2009 5:49:37 PM GMT
  • TimHTimH Posts: 48
    edited 2009-05-09 18:01
    Thanks Leon

    Yes I jumped in and gave it a try and it worked.
    I think I just need to play with the str and dec parameters. Once working at 9600 I will increase up. My max is usually 115,200
    Should be possible with 5Meg Xtal and PLL X16

    Tim
  • LeonLeon Posts: 7,620
    edited 2009-05-09 18:02
    It'll go a lot faster than that, IIRC, with a direct connection. The limit with the Prop Plug is probably lower.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle

    Post Edited (Leon) : 5/9/2009 6:09:01 PM GMT
  • Cluso99Cluso99 Posts: 18,069
    edited 2009-05-09 23:45
    I run to the pc (direct through FT232) at 115200 all the time. Beau has a thread of pushing >1Mbps (think it ws 8Mbps?)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    · Home of the MultiBladeProps: TriBladeProp, SixBladeProp, website (Multiple propeller pcbs)
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: Micros eg Altair, and Terminals eg VT100 (Index)
    · Search the Propeller forums (via Google)
    My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2009-05-10 00:51
    Doesn't Hanno's conduit for the Prop run at 2Mbps? I think that is the upper limit of the IC.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter, E.I.
    www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
    www.tdswieter.com
  • TimHTimH Posts: 48
    edited 2009-05-10 01:10
    Thanks everyone, This was my first post to the propeller forum and good information from all.
    I think I was a little overwhelmed with the new hardware, and software at first but I am now sending serial strings and decimal numbers at 9600 to 115200 baud - no problems. I have been used to working with PIC's and the ever increasing use of hardware USARTS ADC's etc with each new part. In some ways the Propeller is like going back to the early PIC days where everything was done in software except most of the routines have been written for you. I just need to get used to some of the way Spin does things. Then move on to try some assembly.

    Thanks for all the help

    Tim
  • HannoHanno Posts: 1,130
    edited 2009-05-11 02:12
    Howdy!
    Yes, ViewPort allows you to transfer data at up to 2mbps. The FTDI chip used by Parallax supports 3, 2, 1.5, 1mbps and many slower baud rates. I did get 3mbps working, but it's a big pain. At 80MHz, the 2mbps rate is much more doable.
    Hanno

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Download a free trial of ViewPort- the premier visual debugger for the Propeller
    Includes full debugger, simulated instruments, fuzzy logic, and OpenCV for computer vision. Now a Parallax Product!
Sign In or Register to comment.