In SX Microcontrollers, SX/B Compiler and SX-Key Tool, g_daubach wrote: Hey all, I feel, some explanation is in place here: The FREQ directive in an SX assembly code is a special information for the IDE how to control the SX-Key. The frequency specified with this directive will be generated by the SX-Key when you launch a debug session. It also specifies the clock frequency, the SX-Key will generate when you select "Run - Run" from the menu. Think of the SX-Key as an external clock generator connected to the SX OSC1 pin, feeding the clock signal into the SX. Usually, you would specify a frequency identical to the frequency of the clock generator (either the internal clock, and external RC network, an X-tal, a resonator, or a separate clock generator) you will use later, when you are going to run the SX stand-alone, i.e. w/o the SX-Key attached. Nevertheless, you may, for example, include a FREQ 50_000_000, and attach a 5 MHz resonator later, but in this case, your program will run slower by the factor of 10 in stand-alone mode, compared to the debugging session. On the other hand, the OSCxx directive is ignored when you use the SX-Key to clock the device under test. This directive controls the type of clock device for stand-alone mode, i.e. the internal RC clock (not very stable), or the gain of the internal SX clock driver for external clock devices, like X-Tals and resonators. Which gain you need to select, depends on the clock frequency you are going to use, and the type of the clock device. You can find more information about this settings in the SX data sheets. None of these settings and directives should influence the operation of the debugger. When you select "Run Debug", and (after the Erase/Program dialog), the debug window comes up showing "Running" instead of "Idle" in the status information, you either have connected some external clock device to the OSC1 and OCS2 pins in parallel to the SX-Key, or you have programmed the SX using the "Run Program" option before, and started the debugger via "Run Debug (reenter)", or the SX-Key is defective. Usually, you can't "fry" an SX-Key by plugging it on the four header pins in reverse orientation but if you plug it on the pins with an offset, i.e. only three or two pins connect to the SX-Key, it most likely goes up to "Semiconductor Heaven". So always turn off power before attaching the SX-Key, and double-check its orientation, and if it sits on all four header pins before applying power. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=150536#m150911 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)