Shop OBEX P1 Docs P2 Docs Learn Events
Parallax Mem stick — Parallax Forums

Parallax Mem stick

TJHJTJHJ Posts: 243
edited 2008-06-08 02:45 in Propeller 1
So any one got any ideas why I cant seem to get this thing to even power up my Memory Stick. I have tried 3 different sticks, Formatted one in Fat, and Fat32, it never seems to try and turn it on, by lighting up the light in the Memory Stick nothing. All it sits there an does is Flash Red and Green, 3 times, then pause. I am really drawing a blank on this one.
Hyperterminal from memstickdemo.spin just repeats memStick not responding, forever. Any ideas, suggestions or help?

Thanks for all the help always.
TJ

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-06-04 22:45
    How do you have the Memory Stick connected? Remember, you need to have CTS# connected to a logic low (ground).
  • TJHJTJHJ Posts: 243
    edited 2008-06-05 03:07
    ·1 Vss
    ·2 RTS#·············-> P2
    ·3 Vdd (5vdc) -> to Servo Connections
    ·4 RXD receive data···->P0
    ·5 TXD transmit data····->P1
    ·6 CTS#···->·······If direct P3, No response, If·to Ground, Stick lights·up, Still recive the error, Mem Stick Not responding, If to p0, Pulldown to ground Mem Stick Not responding.
    ·7 NC
    ·8 RI# (low to resume)· ->NC
  • Mike GreenMike Green Posts: 23,101
    edited 2008-06-05 03:57
    Make sure you have the receive and transmit pins connected properly. RXD and TXD are relative to the Memory Stick Datalogger. P0 (in your setup) should be data transmitted to the datalogger. P1 should receive data from the datalogger.
  • TJHJTJHJ Posts: 243
    edited 2008-06-05 17:56
    Ok so I am making progress even if slow.

    Upon start up I get 3 blinks on the Mem stick and then soild red, On the Reader I get blinking then locks red.

    I have played with the pin order and I still end up with mem stick not responding.

    So here is the demo I am trying to get to work.

    [noparse][[/noparse]code]

    memStick_demo.spin

    · Bob Belleville

    · A demo for memStick.spin.

    · See memStick_dev.spin for development and more
    · interactive testing.
    ·
    · Parallax "Memory Stick Datalogger" part #27937.

    ..............................

    memStick pinout:
    ······················· i/o
    · 1 Vss
    · 2 RTS#················ i
    · 3 Vdd (5vdc)
    · 4 RXD receive data···· i
    · 5 TXD transmit data··· o
    · 6 CTS#················ o
    · 7 NC
    · 8 RI# (low to resume)· (output prop side)

    · Propeller connections:
    ·
    · TX·· Transmit Data·· --> 27937.4 (RXD)
    · RTS· Request To Send --> 27937.6 (CTS)
    · RX·· Receive Data··· <-- 27937.5 (TXD)
    · CTS· Clear To Send·· <-- 27937.2 (RTS)



    ·_rxpin········· = 0
    ·_txpin········· = 1
    ·_rtspin········ = 2
    ·_ctspin········ = 3

    [noparse][[/noparse]/code]

    So here is how I have it now.

    1 Vss
    2 RTS#··-> Pin 3, 1k Pulldown to ground. ··············
    3 Vdd (5vdc)
    4 RXD receive data -> Pin 1····
    5 TXD transmit data··- > Pin 0·
    6 CTS#····-> Pin 2, 1k Pull down to ground.

    Maybe I am way over thinking this. But I have tired pretty much every combination I can think of. So I think I am having a special moment and missing something basic.

    Thanks for the help.
    TJ

    ·
  • robobeaglerobobeagle Posts: 1
    edited 2008-06-08 02:45
    Hi:

    I don't know that this will help you, but I am having a similar problem trying to drive the 27937 USB IF with a different microcontroller. I'm trying to use an Atmel ATMega168, as implemented in an Arduino-clone board. Following the Parallax app note, I hooked the 27937 up as indicated in the following snippets from a C program:

    <snip>

    // Based on http://www.parallax.com/Portals/0/Downloads/docs/prod/comm/DataloggerTestV1.1.zip
    //
    // Pin name on BBB Pin # BBB Pin Desc Pin num/name on Parallax
    // TX PIN 8 ' Transmit Data --> 27937.4 (RXD)
    // RTS PIN 9 ' Request To Send --> 27937.6 (CTS)
    // RX PIN 10 ' Receive Data <-- 27937.5 (TXD)
    // CTS PIN 11 ' Clear To Send <-- 27937.2 (RTS)

    int rxPin = 10 ;
    int txPin = 8 ;
    int rtsPin = 9 ;
    int ctsPin = 11 ;

    <snip>

    // define pin modes for tx, rx, led pins:
    pinMode(rxPin, INPUT);
    pinMode(txPin, OUTPUT);
    pinMode( rtsPin, OUTPUT ) ;
    pinMode ( ctsPin, INPUT ) ;

    // set the data rate for the SoftwareSerial port
    mySerial.begin(9600);

    // Reset chip
    println ( "Resetting" ) ;
    digitalWrite ( txPin, HIGH ) ;
    digitalWrite ( rtsPin, LOW ) ;
    delay ( 2000 ) ;

    Ok, this defines a uC pin on which to receive data from the 27937 (rxPin, tied to pin 5 on the 27937), a uC pin with which to send data to the 27937 (txPin, tied to pin 4 on the 27937), an "RTS" pin (more on this in a bit), tied to pin 6 on the 27937), and a "CTS" pin, tied to pin 2 on the 27937.

    The C code bit-bangs the Tx and Rx pins to send and receive data. I've used that code (at least the Tx side) successfully with Serial LCD displays in the past, so I think it basically works. Besides, as you'll see in a sec, I can see data coming and going to the 27937 and I still can't get things to work.

    Then I try this code, lifted (transliterated to C from BASIC) off the Parallax demo/test programs:

    <snip>

    // Try to sync with chip
    println ( "Attempting to sync1..") ;
    do
    {
    print ( "." ) ;
    mySerial.print ( "E" ) ;
    print ( " sent E " ) ;
    mySerial.print ( "\r" ) ;
    print ( " sent cr " ) ;
    valRead = mySerial.read ( ) ;
    print ( "read=" ) ;
    print ( valRead, DEC ) ;
    } while ( valRead != '\r' );

    println ( "done" ) ;

    <snip>

    The print's and println's are just for debugging and print messages (via the one and only h/w serial port on the Arudino) on a connected PC. The mySerial.print ( ) is the bit-bang to the 27937, and the mySerial.read ( ) is an attempt to catch the response back.

    Looking at a scope trace as the program runs, I can see data coming and going from the uC to the 27937. I just can't figure out how the flow control (if any) is supposed to work.

    So my symptoms look like yours -- Reset, light flashes on USB stick, red and green alternate on 27937, then 27937 stays red. My program on the uC never sees the response from the 27937, however, since it is sent when the uC is not listening. I had thought that I could use rtsPin (connected to CTS, pin 6 on the 27937) to prevent this, but even though it is called "CTS", it doesn't seem to provide the flow control functions I would expect -- it looks like a Chip Select pin or something. And what's with the "reset" sequence with RTS low and TX high? Looking at the logic levels with the scope again, I don't even seem to be able to drive CTS high with the uC -- it pulls down as if it were an output, not an input.

    So I think that I may be having the same problem as TJHJ, but on a completely different processor. And I think it is because I am not understanding/misunderstanding just what RTS and CTS do on the Parallax board.

    Maybe this post will stir some ideas.

    Thanks for your patience in plowing through a long post.

    Jerry
Sign In or Register to comment.