SX Key and Debugger
cory33
Posts: 4
Hello,
I am new to SX chips and developement...
I have done some microcontroller programming in assembly and basic..in the past
I purchased an SX key (usb)·with tech board / kit......
I am just starting out and I have had no problems programming some of the basic intro programs on to the chip.
However, when I try to run the debugger (loading the debug demo program) and just try to·step through to get a feel for things, the SX chip sits in "sleeping" mode....I am unable to step or run through anything, and all I can do is reset the program....
I am probably missing something simple...??
anyone?
·
I am new to SX chips and developement...
I have done some microcontroller programming in assembly and basic..in the past
I purchased an SX key (usb)·with tech board / kit......
I am just starting out and I have had no problems programming some of the basic intro programs on to the chip.
However, when I try to run the debugger (loading the debug demo program) and just try to·step through to get a feel for things, the SX chip sits in "sleeping" mode....I am unable to step or run through anything, and all I can do is reset the program....
I am probably missing something simple...??
anyone?
·
Comments
No...it specifies that the USB generates the oscillator..
When I do a read device after I have programmed the chip..
it shows ---Crystal-HS1
Before you can Debug,·click on the clock icon in the SXB ide, with the SX-key in·place. Then set the value, equal to your resonator.·Now you will be able to program and debug with the "bug" (spider) icon.
This Nuts n Volts artical has a good DeBug example in it (the BREAK_NOW· subroutine).
However, the clock freq is set to 50Mhz in the debugdemo program·..
After I program the chip.....I check the clock and it·matches at 50Mhz..?
I do not have an external resonator installed....??
I have also tried debuging other programs and I get the same results
just sits in "sleeping" when I attempt to step through the program????
Can you list step by step exactly what you are doing when trying to debug? I mean a list like this:
etc, etc
If you provide a detailed description of each step you take, it's possible for someone to spot the problem.
Thanks,
PeterM
I have the SX tool Kit 45180 with SX key (usb) and I have installed SX editor
3.2.9.2h beta..I can load and run programs but the debugger doesn't work.
I plug the USB cord into my SXKEY
and then·into my laptop...
and SXKey into the tech board...
I power up the tech·board..
(no external oscillator installed)
I run the editor....
I open the following program (below)...Debug_demo.src (from sample programs provided)
I select debug (ctrl-d)...
It shows that it is erasing and then programming...
the debug screens open up and the status window shows "idle" at the top
I select step, walk, or run...
and they all cause the sx28 to go from·idle to "sleeping" at the top
If I reset the board...it goes back to idle......
I have tried other basic programs with the same result...
I have tried other computers and other USB ports with the same result..
Parallax sent me a new SX key.... and it does the same thing..
I have been able to just simply run programs and they appear to work..
but I won't be able to get to far with any programming on my own if the debugger doesn't work..
;=======================================================================
;TITLE:········ debug_demo.src
;
;PURPOSE:······ Modifies three registers to demonstrate the SX-Key's
;·············· debug display.· Use Run -> Debug (or CTRL+D) to program
;·············· the SX, then click the Step or Poll button to see the
;·············· results.
;
;AUTHOR:······· Parallax, Inc.
;
;REVISIONS:
;· 06/09/98·Original release.
;· 09/17/04·Updated to support SASM.
;
;CONNECTIONS:
;· None.
;
;DETAILS:
;· Program the SX chip using the Run -> Debug (or CTRL+D) option.· Then
;· click the Step button to step through each instruction (taking note
;· of the changes on screen) or use the Poll button to run full speed
;· with updates to the display every loop iteration.· The Watch window
;· shows the values of registers IncReg, DecReg and NotReg in decimal.
;· NOTE: You must disconnect any crystal or resonator from the SX chip
;· in order to properly debug since the SX-Key will need to provide the
;· clock signal.
;=======================================================================
;
DEVICE DIRECTIVES
··DEVICE··SX28,OSCHS2,TURBO
IFDEF·__SASM· ;SASM Directives
··DEVICE··STACKX,OPTIONX
··IRC_CAL··IRC_SLOW
ELSE··;Parallax Assember Directives
··DEVICE··STACKX_OPTIONX
ENDIF
··RESET··Main
;
VARIABLES
IncReg··EQU·8···;The register to increment
DecReg··EQU·9···;The register to decrement
NotReg··EQU·10···;The register to invert
;
DEBUG SETTINGS
··FREQ·50_000_000
;Create watch window to display values of registers in unsigned decimal.
··WATCH·IncReg,8,UDEC
··WATCH·DecReg,8,UDEC
··WATCH·NotReg,8,UDEC
;
MAIN PROGRAM
Main
;Increment IncReg, decrement DecReg and invert NotReg in a loop.
··inc·IncReg···;Increment IncReg
··dec·DecReg···;Decrement DecReg
··not·NotReg···;Invert NotReg
··break····;Break to update display
··jmp·Main···;loop
·