Shop OBEX P1 Docs P2 Docs Learn Events
SX18 debugging — Parallax Forums

SX18 debugging

JavalinJavalin Posts: 892
edited 2005-03-05 01:36 in General Discussion
Hi

Little problem with SX18 - and a few questions:
1)· Does the SX-Tech board support the SX18?
2)· When·i am·debugging the chip having wired it up (correctly I think) based on the SX-tech diagram - it does 1 or 2 steps then freezes.· The debugger shows "sleeping....", and the chip display appears a little·random.· I am using the internal osc at 4mhz

Thanks

James

Comments

  • BeanBean Posts: 8,129
    edited 2005-03-01 12:38
    Try setting the DEVICE to external oscillator while debugging.
    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Check out· the "SX-Video Display Module"

    www.sxvm.com
    ·
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-03-01 13:51
    The SX-Tech board only supports the SX28. We are working on a new set of boards for all SX chips -- stay tuned.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • JavalinJavalin Posts: 892
    edited 2005-03-01 13:56
    Hi Jon,

    Thanks for that. FYI the documentation for the current board implies that you can - but careful check of the pinout's wisely lead me to be cautious.

    ta

    James
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-03-01 15:47
    We used to have a board for the SX18 -- that's probably what the docs are referring to. It didn't sell well and the SX18 is a slow seller, so we discontinued the board.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • JavalinJavalin Posts: 892
    edited 2005-03-01 15:47
    ok - thanks.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-03-01 16:14
    This was discussed in:

    http://forums.parallax.com/showthread.php?p=521642


    or you could use a breadboard and map the appropriate signals over to the sx18 on the breadboard (OSC1, OSC2, VDD, and GND are required, port pins are optional)

    You know the parallax forums search engine is useless when using yahoo produces much better results (searching "forums.parallax.com" then the keyword(s) your looking for)
  • JavalinJavalin Posts: 892
    edited 2005-03-04 13:21
    Hi again,

    Err - not having much joy with these!

    I am using the SX-TECH breadboard with the SX18 connected.· All that is connected at present is VDD,VSS, OSC1 and OSC2.· No IO pins are connected.

    I have tried various DEVICE settings in the code - internal 4MHZ, external etc.· I have tried with and without the resonator (50mhz) plugged in.

    Additonal question :-· What is the DEVICE menu screen used for?· It seems to duplicate the code settings? (attchement shows screen for clarity)

    Thanks for any help!!
    James
    512 x 471 - 55K
  • BeanBean Posts: 8,129
    edited 2005-03-04 14:38
    This was discussed elsewhere, but from what I remember the device screen should be considered as READ-ONLY as the DEVICE line settings will override it.

    Can you post your DEVICE line ? That may be us some insight.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Check out· the "SX-Video Display Module"

    www.sxvm.com
    ·
  • JavalinJavalin Posts: 892
    edited 2005-03-04 14:53
    Hi Bean,

    DEVICE SX18, OSCHS2, TURBO, STACKX, OPTIONX
    irc_cal irc_fast
    freq 4_000_000

    James
  • KenMKenM Posts: 657
    edited 2005-03-04 15:27
    Just for grins try this.

    Note that the watchdog is disabled for debugging

    ifdef __SASM
    ·DEVICE·SX18L, STACKX, OPTIONX
    ·DEVICE·TURBO
    ·IRC_CAL·IRC_FAST
    ·FREQ·4_000_000
    else
    ·DEVICE·SX18AC, OPTIONX
    endif
    DEVICE·TURBO, OSC4MHZ
    ;DEVICE·WATCHDOG
    RESET·START
  • NateNate Posts: 154
    edited 2005-03-04 15:31
    You are probably already aware of this, but the pinout of the SX18 is totally different than the SX28 - Are you porting the Vss, Vdd, OSC1 and OSC2 to the right pins?

    I just mention this because you say you are using the SX-TECH board.....

    Nate
  • JavalinJavalin Posts: 892
    edited 2005-03-04 15:32
    Hi

    Good question - I am aware, and am using the breadboard to mount the chip NOT the socket.

    James
  • Jim PalmerJim Palmer Posts: 23
    edited 2005-03-04 17:51
    I too am unable to get an SX18 running correctly without having the SX key plugged in very close to the OSC1 and OSC2 pins. My theory has been that the clocking the SX-Key produces gets noise over any sort of wire distance. Also, I think that the spec sheet indicates that the clocking source should be as close to the OSC pins as possible.

    I found this out when I was trying to make an extension cord (if you will) for the SX-Key to plug into by project. When I first made it, the wires were 4 inches long. This produced similar results to those you are reporting. I then created one with the wires only 1 inch long and it works. However, on the later, it usually works, but at higher clocking speeds it stops if there is even the slightest twist to it.

    Also in your post you stated that you were running w/ the internal osc at 4MHz. I just wanted to clarify that the internal osc is not used during debugging. The SX-Key generates the signal for that.

    Lastly, here's what I would try. If you have a set 4 connectors spaced .1" apart (like what the SX-Key plugs into), you can insert it directly into the breadboard to connect to pins 13,14,15 and 16. If you don't have the connector, you can use short(1cm) pieces of breadboard wire.

    Then connect pins 5 and 13 to Vss and pin 4 to MCLR. NOTE: you will be tying RB7 to ground with the 4pin connector approach, so make sure your test program is not going to make it output high.

    Check for yourself that I haven't said something stupid, plug in the SX-Key, the power to the Tech board and I bet you get it working.

    Hope this helps and please let us know how it goes
    Jim
  • JavalinJavalin Posts: 892
    edited 2005-03-04 18:27
    Hi Jim,

    Thanks for your Post.

    Yes that got it, my jumper wires are approx 2 inches and at 1MHZ frequency it now works fine!

    Guess I will have to build a small board to test the code at the full 50MHZ!!

    Have a good weekend!

    James
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2005-03-04 18:34
    Jim,

    Seems I had similar problems with an SX-Blitz

    Hmmm....So the "extension" end should be on the SX-Key's RS232 to PC side rather than the SX-Key to the SX18 side ....makes sense.

    What kind of cable are you using to make the extension cord? I would suspect that minimal parasitic capacitance (i.e. no twist, shield, or
    long parallel runs) in this case "might" improve things, although I assume since the SX-Key is driving/synthesizing the signal this should
    not be much of an issue for the distances and frequencies we are talking about. To be safe, I would say that your best bet is to make the
    extension from the SX-PC side instead.


    Another thought..... If you are plugging into an SSB (Solder-less bread board) there is often quite a bit of parasitic capacitance between
    pins and the sub-straight metal plate. I have seen adverse affects at 32kHz because of parasitic capacitance on SSB's. (i.e. Dallas time keeping chips)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe - Mask Designer III

    National Semiconductor Corporation
    (Communication Interface Division)
    500 Pinnacle Court, Suite 525
    Mail Stop GA1
    Norcross,GA 30071

    Post Edited (Beau Schwabe) : 3/4/2005 6:39:30 PM GMT
  • KenMKenM Posts: 657
    edited 2005-03-04 20:15
    I certainly understand the concern of extention wires, but you should see the cluge I have used to debug an SX that was soldered into a board, and using one of those clips that clamp on to the IC.

    I did not have trouble, guess I was very lucky.

    k


    Post Edited (KenM) : 3/4/2005 8:21:05 PM GMT
    658 x 386 - 40K
  • Jim PalmerJim Palmer Posts: 23
    edited 2005-03-04 20:40
    Beau,

    No doubt, I imagine it is better to extend the SX-Key between it and the PC rather than it and the board. I was actually creating an extension for two reasons. First, my project is a little robot a couple of cm high and the wieght of the SX-Key and serial cable made it topple over so that I couldn't test the ground sensors. The second and more important reason was to add power without having to add a power header to my BOT. To do this, I made the extension with a couple of wires tapped in to provide the power to the SX-key and the board. As an aside, I couldn't use the BOT side power as it is only 3.6V and takes me 8 hours to charge.

    I was tempted to try creating the extension cord with CAT-5e twisted pair, but once I had something that worked well enough... well.. you know, it kind-of dropped off the priority list.

    Jim
    750 x 600 - 51K
  • Jim PalmerJim Palmer Posts: 23
    edited 2005-03-04 20:42
    Ken,

    I couldn't get to your picture at first, but now that I can I wonder if yours works because none of the wires run close together in parrallel? Curious.

    Jim
  • KenMKenM Posts: 657
    edited 2005-03-05 01:36
    If I remember, next time I run that funky set up, I will purposely tape the wires together. No twisting together, just bunch them together in parallel and see what happens.

    k
Sign In or Register to comment.