Shop OBEX P1 Docs P2 Docs Learn Events
drive the spinneret with an external propeller — Parallax Forums

drive the spinneret with an external propeller

lfreezelfreeze Posts: 174
edited 2013-06-06 12:22 in Accessories
Please help,

I need many more pins and processing power (RAM) for my project.
I want to use an external propeller to write to the sd card mounted on the spinneret board.
In order to implement this, I am considering soldering/hacking the spinneret board by adding
four wires to the sd card socket.

Data serial out sd connector 7
Data serial in sd connector 3
Clk sd connector 5
CS sd connector 2

These four wires will be connected to an external propeller

This arrangement will result in a parallel connection between the propeller chip on the Spinneret board
and the new external propeller. Communication between the two
Props will be controlled by the rtc on the spinneret board. I will stop the http service
While the sd card is being written to, then resume it when the write is finished.
During the write part of the function, I will make the four parallel pins on
The spinneret inputs.

I’m way over my head with this and I am concerned that it will result in a large cloud
Of smoke.

Is what I am proposing possible? Are there any special cautions other than the usual
Soldering issues that I should be aware of? Is there another way to accomplish this
Using J1 on the spinneret board ?
Thanks in advance……

Larry

Comments

  • NWCCTVNWCCTV Posts: 3,629
    edited 2013-06-04 17:27
    This is something I have been wondering about myself. I am thinking it is doable but I was thinking it might be necessary to have resistors between the SD card and the prop pin side. I am by no means an expert here so hopefully someone else can chime in. I will take a look at the Prop BOE board schematic to see what, if any resistor is used and maybe that will shed some light on the idea. Edit: It looks like pins 22,24 and 25 go out to a 100K resistor. Whether or not this is required I do not know. Could someone please clarify?
    1024 x 604 - 36K
  • RforbesRforbes Posts: 281
    edited 2013-06-05 13:27
    I connect 10 and 8 on the Spinnerets J1 connection tied directly to J28 and J27 on the the quickstart (these are io pins 27 and 26) and then use the "Full-Duplex_COMEngine" by Kwabena W. Agyeman from the object exchange to talk back and forth. The data I send from the quickstart is stored in a buffer on the Spinneret and then written to the SD Card during various conditions. It's not the fastest method, or even the most tech savvie one but it works.

    It might be enough to do what you want. Good luck!

    Robert
  • lfreezelfreeze Posts: 174
    edited 2013-06-05 18:05
    Thanks for the suggestion. It certainly looks better than attempting a soldering
    Iron solution. How do you buffer the data being sent to the spinneret? I’m thinking of
    Sending it as a variable and then writing it to the SD card. I think I can do this with
    Full duplex serial. Was there a specific reason you used “Full-Duplex_COMEngine” .
    I searched for “Full-Duplex_COMEngine”, but was unable to find it in the obex.
    Thanks for the help.
    Larry
  • LtechLtech Posts: 370
    edited 2013-06-06 01:06
    I just use the tx/rx (30/31) to make a serial connection...
  • Mike GMike G Posts: 2,702
    edited 2013-06-06 05:02
    I just use the tx/rx (30/31) to make a serial connection...
    Me too... And that's setup by default. It does make debugging a little more complicated as you lose a PC debug port.
  • RforbesRforbes Posts: 281
    edited 2013-06-06 05:13
    Larry,

    Full duplex serial will work too. However, the Full-Duplex_COMEngine driver will work much faster than full duplex serial and has a greater variety of useful methods built in. It's here http://obex.parallax.com/object/246 and this Author also wrote the SD Card driver that works beautifully with the spinneret.

    To send a lot of data between the quickstart and spinneret, this might help you get started:

    1- Create a buffer on both your quickstart and the spinneret. Perhaps 512 bytes to start with.
    DAT
    MyBuffer      byte    $0[512],0
    

    2- Fill this buffer on your quickstart by whatever means you choose. When you've put all the data you can in it, transmit it to the spinneret.
    pub Transmit | bts  'bts= bytes to send
    
         bts:=strsize(@Mybuffer)
         
         serial.writelong(bts)
         serial.writedata(@Mybuffer,bts)
    

    3- On the spinneret side, receive the buffer data.
    Pub Receive | btr   'btr= bytes to receive
    
           btr:=0
    
           repeat while serial.receiverEmpty
    
           btr:=serial.readLong
           serial.readData(@MyBuffer,btr)
           serial.receiverFlush
    

    This type of set up can be modified with start/stop delimiters, and all sorts of other stuff. It's not the greatest example but it should get you started. There are other comms drivers on the obex, and some of them are REALLY fast but I like this one because it's very similar to the SD Card driver in it's syntax.

    Please note in my earlier response- you don't have to use the same pins I use. Any available pins will work equally well, so long as they aren't being used for anything else.
  • RforbesRforbes Posts: 281
    edited 2013-06-06 05:17
    Mike and LTech - Right on! I did that for a bit, but when I changed pins it let me use PST on either propeller, by just clicking back and forth between the comm ports used in pst. So it was helpful for debugging and the "ooh and ahh" factor watching my little 1's and 0's zing back and forth. :)
  • lfreezelfreeze Posts: 174
    edited 2013-06-06 12:22
    Many Thanks Robert, I had not considered using a buffer, the example you
    Provided will get me going in the right direction. I was able to find some
    Old code I had written for prop to prop communication. I will modify it
    With buffers and then incorporate it into the HTTPserver.

    Larry
Sign In or Register to comment.