Shop OBEX P1 Docs P2 Docs Learn Events
Using the propeller for serial data question ... — Parallax Forums

Using the propeller for serial data question ...

JMLStamp2pJMLStamp2p Posts: 259
edited 2007-08-19 19:15 in Propeller 1
Hello,

I have been using Basic Stamps for Serial data transmission but would like to start using the propeller
chips for several reasons. My question is this: Do I have to learn assembly language to use the propeller
for serial functions? From what I've read it seems as I would have to learn "Spin" and assembly to fully understand how to read data into the propeller ...

JMLStamp2p

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-08-19 19:15
    You don't have to use assembly language if your data rates are below 20K. For example, Spin can do 19.2KBaud half duplex. If you use one cog for receive and one for transmit, you can do 19.2KBaud full duplex.

    You also don't have to use assembly language yourself if you make use of objects already constructed that use assembly internally. FullDuplexSerial.spin (which comes with the Propeller Tool) is an example of this. It'll do full duplex asynchronous serial up to about 230 KBaud.

    Similarly, there's an SPI master & I2C master that's part of FemtoBasic (in the Propeller Object Exchange) ... mostly written in assembly ... that was written to be used in other programs. Have a look at the comments at the beginning of the sdspiFemto.spin file. The SPI routines were intended to support an SD card, but can be used with other SPI devices since they just do block reads / writes.

    Post Edited (Mike Green) : 8/19/2007 7:20:36 PM GMT
Sign In or Register to comment.