SK-Key "Run-Clock" Mode
Guenther Daubach
Posts: 1,321
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
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
Steve
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
Thanks for the insight!
Jim
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
G
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 .
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
G
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
Try to get one with the data cable bundled, or you'll have to build your own. No great hardship, just hassle.
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 .
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
G
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
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
G