Shop OBEX P1 Docs P2 Docs Learn Events
Updating the SX28AC on a board — Parallax Forums

Updating the SX28AC on a board

skinnydudeskinnydude Posts: 20
edited 2005-07-19 05:50 in General Discussion
Ok, I got the SX28AC/DP to work with the pesky card reader that the Basic Stamp couldn't read.· Now what I want to do is build a board with the SX28AC/SS and connect some of the I/O pins to a card reader and some other I/O's to a serial port to transfer the data to a PC.· Also, if possible, I want to be able to update the code (in case there's any firmware bugs)·on the chip itself through a serial port or some other method via the PC without using the SX-Key.· Is there any way to do this fairly inexpensively?

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-07-14 23:09
    I don't think so -- use a ceramic resonator as your clock (if using an external source) and add a programming header for your SX-Key. There's no way to change the program in theSX except through the key.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • skinnydudeskinnydude Posts: 20
    edited 2005-07-15 19:21
    Ok, I want to be able to do it with each device built, but according to this
    http://www.parallax.com/detail.asp?product_id=552-00007
    the key is $79 each.· I read in the manual that there is an SX-Blitz which is "designed to be a lower-cost device for programming the SX chips only."· Is there a way for me to build one of these on the board, or how much would they cost if I were to buy from parallax?· I need to build a lot of these card readers and would like to be able to remotely update the code on the chip.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-07-15 19:25
    No. And the SX-Blitz was discontinued a long time ago with the price of the SX-Key dropped to the price of the SX-Blitz (the "key" used to be almost $200 -- we dropped it to encourage more users).

    Your project "feels" more like a BASIC Stamp application: the interpreter engine is solid and the user program can be updated by changing the EEPROM. Maybe you could combine the two: use a stock BS2 for your core application and an SX as a dedicated slave that handles your card reader.

    Or... you could put an SX28DP in a socket and change that chip when you want to do a firmware upgrade.·

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-07-15 19:30
    You may be able to convice Parallax to sell you the individual components (such as the programmed SX chip) that are used on an SX-Key, so that you can incorporate the SX-Key functionality on the PCB. But this poses its own issues, since the SX-Key uses the OSC1 and OSC2 pins to program the SX, you will need to devise a circuit to switch between the oscillator and the SX-Key (not as simple as it may seem, especially the logic to determine when you need to switch). Even if you purchase individual SX-Keys or SX-Blitzs for each board, you will still have to design this switching function. Have you thought of how you will update the program remotely? This is another big can of worms. To the point, this functionality you seek is an advanced topic and requires considerable design skills.

    Well, Jon seems to indicate that individual components on the SX-key are not availible for sale.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-07-15 19:34
    I don't think so -- the information for programming the SX in place is available from Ubicom. There are SX programmers on the market, in fact, one open source programmer was discussed in the Sandbox forum a while back.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-07-15 19:37
    If you are really determined to do this, you can re-invent the SX-Key wheel. This document show the process of programming an SX chip. Or find the other programmers availible as Jon just indicated.
  • KenMKenM Posts: 657
    edited 2005-07-15 20:00
    http://www.semis.demon.co.uk/Sx/SXmain.htm

    And I should have mentioned the information above was obtained from sxlist.com


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Ken

    Post Edited (KenM) : 7/19/2005 7:02:55 AM GMT
  • James NewtonJames Newton Posts: 329
    edited 2005-07-15 21:16
    Jon Williams (Parallax) said...
    There's no way to change the program in theSX except through the key.

    http://www.sxlist.com/techref/ubicom/devprogs.htm·lists several ways of program an SX that does not involve the key.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ---
    James Newton, Host of SXList.com
    james at sxlist,com 1-619-652-0593 fax:1-208-279-8767
    SX FAQ / Code / Tutorials / Documentation:
    http://www.sxlist.com Pick faster!



  • skinnydudeskinnydude Posts: 20
    edited 2005-07-18 14:28
    Thanks, that website looks like it's just what I needed!
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-07-18 15:31
    Remember what I said about mixing an on-board programmer and oscillator, to my knowledge all SX programmers require you to manual switch out which is connected to the SX, since you theoretically won't have physical access you will have to find a way to make that manual process automatic (no sense in creating an on board programmer if the board is incapable of running the program you download).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • James NewtonJames Newton Posts: 329
    edited 2005-07-18 22:20
    Paul has a good point there... I don't think you can program and then run an SX without switching between an osc and the programmer....

    ....however, there is no reason why the programmer can't also BE the oscillator. Of course, this may limit the top speed of the SX depending on how fast a signal the programmer can generate.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ---
    James Newton, Host of SXList.com
    james at sxlist,com 1-619-652-0593 fax:1-208-279-8767
    SX FAQ / Code / Tutorials / Documentation:
    http://www.sxlist.com Pick faster!



  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-07-19 03:38
    Because a loop is required for the infinite generation of an oscillator signal, a 50% duty oscillation would be a minimum 8 cycles which means a maximum of 6.25 MHz operating speed for the target SX·if your programmer is running at 50 MHz or 1/8th the programmer speed.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • kjennejohnkjennejohn Posts: 171
    edited 2005-07-19 05:50
    Paul Baker's earlier link to Ubicom's guide to ISP programming (plus parallel) suggests you CAN program the processor in place with the crystal, caps and resistor in circuit. I don't see why the PC can't be set up to do all this through the parallel port. Maybe even the serial port, using all available signals.
    Or, if you go to a host/slave(s) situation using a simple two-wire serial communications, consider using two processors on each board. One has an 'odd' address, the other being 'even'. Each has it's own job, and they share a common communications path to a host or master of some kind, but each *can be used to program the other*! If proc0 needs a code update, the host (PC?) forces it into reset, then gets proc1 to reprogram it. When done, a verify is done (?), proc1 is released from its programming chores, and the reset on proc0 is released. Everything is now up and operating.

    Hey, for what it's worth...
    kenjj
Sign In or Register to comment.