Shop OBEX P1 Docs P2 Docs Learn Events
In-system programming — Parallax Forums

In-system programming

peterzpeterz Posts: 59
edited 2008-09-26 23:22 in General Discussion
I have the SX28 attached to my board.
Now I want to·be able to use· in-system programming.

The first thing I did is add ·SX-Key compatible pins on the board.
As·on-board clocking I am using a 25Mhz crystal.

My concern is: what should I do with the on-board clock when I am going to program the device using SX-Key?

Should I remove the on-board clock·?

How people deal with this?
Do you use any kind of jumper settings or something to disable temporary the on-board clock or you remove physically the clock source?

If the answer is to remove the on-board clock, is it safe to·connect a crystal using·a socket?

I have taken a look at SX Protoboard that allows a lot of clock configurations but in the manual there is no indication on how to deal with this issue.





·

Comments

  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-09-25 02:32
    You can leave·a crystal in place, it's OK.·

    Only an external oscillator has to be taken out of circuit when programming a SX.
  • ZootZoot Posts: 2,227
    edited 2008-09-25 03:26
    Also, you can not debug with a crystal/resonator in place; you can only program the SX. If you want to debug, you need to remove the crystal/resonator.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST

    1uffakind.com/robots/povBitMapBuilder.php
    1uffakind.com/robots/resistorLadder.php
  • VonSzarvasVonSzarvas Posts: 3,598
    edited 2008-09-25 12:38
    peterz,

    This is how I did it on a pcb once... photos attached. This designed enables the programming port and resonator to share the same place on the pcb.

    You can see the resonator is soldered into a 4-way sil header, which then plugs into another 4-way header that is soldered onto the pcb. That same "on-board" sil header is useful for holding our modified programmer pins against. It means "in the field" you can unplug the sil with the resonator in, hold the programmer against the pcb header pins to reprogram, then plug the resonator back in. You can also replace the resonator easily should that be necessary.

    The programmer pin adapter was necessary as the SX-Key pins are in a different order to the resonator.

    Also, you could just plug the resonator directly into the first sil row, without soldering it. It seems to also be stable, but I am not sure how vibration-proof that may be in the long term; depends on your application I guess... The double sil thing just seemed a bit "stronger".

    One note is that you may not be able to debug if the cable length of the homemade adapter is too long, although for programming the devices the sx-key is very tolerant and 50-60cm is fine (as with my creation). If you do need to debug with this method, you will want the cable absolutely as short as possible.

    Best of luck, Max.


    Edited: Although it might be obvious, the pin connections on the 4-sil pad ringed in red on the pcb image are: (left-to-right) 5v - osc1 - gnd - osc2. PLEASE do not mix up those connections!
    .

    Post Edited (Maxwin) : 9/25/2008 4:18:07 PM GMT
    1035 x 868 - 52K
    387 x 193 - 21K
    367 x 383 - 24K
    171 x 189 - 9K
    403 x 696 - 34K
  • Shawn LoweShawn Lowe Posts: 635
    edited 2008-09-25 14:20
    Max-
    That is a pretty good idea!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Shawn Lowe


    When all else fails.....procrastinate!
  • PJMontyPJMonty Posts: 983
    edited 2008-09-26 23:22
    It's a good idea except for the cable length that Max mentions. When debugging at high speed (say 50 MHz), the SX-Key is sending a 50 MHz clock across that extra set of headers and cable, adding capacitance and potentially causing the entire thing to not work. This is a particular problem when trying to debug.

    A far better solution with a serial (not USB) SX-Key is to plug the SX-Key into the board it is controlling, but create a ribbon cable based DB9 connector to connect it to serial cable plugged into the PC. The fear most folks have is the weight of the bulky serial cable pulling on the SX-Key and the header it is attached to. A ribbon cable adaptor will put little to no strain on the SX-Key, nor will it cause electrical problems since it is simply carrying the serial communications between the PC and the SX-Key.

    Buy a piece of ribbon cable and two IDC style DB9 connectors and you're set.

    Here are the two examples of connectors I am talking about:

    www.mouser.com/Search/ProductDetail.aspx?qs=vjnyqxV37zV5teAQnFeGVQ%3d%3d

    www.mouser.com/Search/ProductDetail.aspx?qs=MS1VvQIQhGdHth2aLs5spg%3d%3d

    Thanks,
    PeterM

    Post Edited (PJMonty) : 9/26/2008 11:27:27 PM GMT
    801 x 601 - 68K
Sign In or Register to comment.