Shop OBEX P1 Docs P2 Docs Learn Events
SK-Key "Run-Clock" Mode — Parallax Forums

SK-Key "Run-Clock" Mode

Guenther DaubachGuenther Daubach Posts: 1,321
edited 2005-02-18 21:53 in General Discussion
Hi All,

Today, I made an intersting experience with the SX-Key.

I was testing a little SX application, handling a UART VP sending out serial data to a PC COM port. As I had only conncted one serial cable to the PC, and did not want to spend too much time, installing another one (you know - creeping on the floor, locating the COM port, trying to figure out where the other end of the cable is located...) in order to use different COM ports, one for driving the SX-Key, and one for capturing the SX serial output with HyperTerminal, I had to go with just one COM port for both.

The usual procedure is:

Loop
Power down the SX system.
Remove the resonator.
Power up the SX system-
Program the SX with SX-Key.
Power down the SX system.
Unplug the serial cable from the SX-Key, and plug it into the SX serial port.
Insert the resonator.
Power up the SX system.
Run Hyperterminal, and check the data being sent from the SX.
jmp Loop

Now, after programming the SX with SX-Key, it came to my mind that the SX-Key can also act as clock device. So, with the serial cable still connected to the SX-Key, I selected "Run - Clock", set the clock to 50 MHz, clicked the "Reset" and finally the "Ok" button to close the Clock window again.

Leaving the power on, I then unplugged the serial connector from the SX-Key, just to notice that the SX continued execution of the program, as some status LEDs continued blinking as expected. I then plugged the serial cable into the SXes serial port. After launching HyperTerminal, I could nicely see the serial data sent from the SX with the SX-Key acting as clock source.

Looks as if the SX-Key simply continues generating the clock signal defined by "Run - Clock", even if the serial cable is no longer connected to it.

Well, this has one drawback: As soon as you un-/re-power the system (or even a "glitch" on the power supply) brings the SX-Key into idle mode, and it stops clock generation. I did not test if the SX-Key also stops clock generation when the SX MCLR* pin is pulled low for a reset.

Nevertheless, this saved me some work during the test phase today, as there was no need to plug/unplug the resonator/SX-Key all the time.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,

G

Comments

  • SteveWSteveW Posts: 246
    edited 2005-02-17 17:12
    Yep - I use mine to supply various clocks to prototype hardware, even if there is no SX anywhere. It works nicely (shame it needs 5V, though - that's getting hard to find).


    Steve
  • RsadeikaRsadeika Posts: 3,837
    edited 2005-02-17 17:42
    First day I got my SX stuff I tried, not knowing any better, something simillar, and yes the sx key did work in place of the resonator. The only concern that I have now is the constant plugging/unplugging of the resonator and/or the sx key. How long before parts start to wear out and have to be replaced, or worse yet I snap off one of the pins on the tech board.
  • pjvpjv Posts: 1,903
    edited 2005-02-17 20:31
    Hi All;

    Please correct me if I'm wrong, but my recollection is that the SX will run for a little while without communication from its host on the PC.

    Peter
  • Jim PalmerJim Palmer Posts: 23
    edited 2005-02-17 21:35
    I can't tell you the number of times I have repeated the loop referenced in the original posting as I usually have some sort of data I want to send back to the PC on the same serial line. This could really prove to be a time saver (and parts saver) by adding a serial A/B switch!

    Thanks for the insight!

    Jim
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2005-02-17 23:37
    pjv said...
    Hi All;

    Please correct me if I'm wrong, but my recollection is that the SX will run for a little while without communication from its host on the PC.

    Peter
    Peter, tonight, I had my SX-Key sitting on my board under test for several hours with the serial cable disconnected, and the SX-Key still keeps clocking my board. Maybe because I'm lucky not to have any "glitches" on the supply voltage because I found out that such events immediately stop the SX-Key's clock generator.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    G
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2005-02-17 23:55
    Rsadeika said...
    First day I got my SX stuff I tried, not knowing any better, something simillar, and yes the sx key did work in place of the resonator. The only concern that I have now is the constant plugging/unplugging of the resonator and/or the sx key. How long before parts start to wear out and have to be replaced, or worse yet I snap off one of the pins on the tech board.
    I've been using my very first SX-Key (one of these "early models" with a short serial cable attached to the Key, and a DB-9 connector attached to the other end of this cable) for more than three years, and it never failed. It passed way after I applied something like 24 Volts to the system under test - this not only "toasted" the SX-Key, but the SX and some other components as well, and the only person I blame about this is me confused.gif .

    In another thread, I reported that I had sent a heavy current across the Vss line of the SX-Key which caused the plastic of the four-pin header plug to melt around the Vss pin. I simply replaced the header plug, and it works like new.

    Hey - why should you ever be in a mood to snap off any pins on the tech board? Should this ever happen, send me the board, and I'll repair it for you smile.gif .

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    G
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2005-02-18 00:00
    Jim Palmer said...
    I can't tell you the number of times I have repeated the loop referenced in the original posting as I usually have some sort of data I want to send back to the PC on the same serial line. This could really prove to be a time saver (and parts saver) by adding a serial A/B switch!

    Thanks for the insight!

    Jim
    Jim,
    the serial A/B switch is a cool idea - instead of un-plugging/plugging the serial cable, this requires a "flick of a switch" only. Nevertheless, when it comes to "hard-core testing", I usually get my Laptop ready to serve one of the two COM ports (provided, I have enough space on my workbench for the Laptop).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    G
  • SteveWSteveW Posts: 246
    edited 2005-02-18 14:15
    If you're short on desk space, Nokia 9000 communicator cellphones are great. They often go for $20 or so on ebay - 6366973990 is an example. Usable keyboard and display, and serial terminals (only up to 19200 baud) are freeware.
    Try to get one with the data cable bundled, or you'll have to build your own. No great hardship, just hassle.

    Steve
  • RsadeikaRsadeika Posts: 3,837
    edited 2005-02-18 15:48
    Thinking of small portable terminals, I looked in my "tech toys" closet, and dug out my Sharp Zaurus (zr-3500x) model. I had forgoten that it has a PC-PC link capabilities. So, for quick and dirty situations I might have to put my Zaurus to work. I wonder how else I can apply the Zaurus in the SX scheme of things.
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2005-02-18 16:42
    Steve,

    good tip - I found one at eBay Germany, currently selling for just one Euro - and it has the serial cable included - I'll go for it.

    The only problem with such a small "terminal" might be that it becomes hidden under all the other stuff on my desktop smile.gif .

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    G
  • SteveWSteveW Posts: 246
    edited 2005-02-18 17:13
    Stick a spare SIM in, and make a call to it [noparse]:)[/noparse]
    Sounds like your desk's about as bad as mine...
    (Ebay's great, though. A big box of LCDs turned up this morning - 20x2, green text on black background, for less than a Euro each. Woo!)

    Steve
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2005-02-18 21:53
    SteveW said...
    Stick a spare SIM in, and make a call to it [noparse]:)[/noparse]
    Sounds like your desk's about as bad as mine...
    (Ebay's great, though. A big box of LCDs turned up this morning - 20x2, green text on black background, for less than a Euro each. Woo!)

    Steve
    That's exactly what I was thinking of - it helped me more than once to locate my "regular" cell phone - provided it was turned on smile.gif .

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    G
Sign In or Register to comment.