This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

SPI

It should be fairly straightforward to write and read a 25xxx eeprom thru the SPI bus using the pc serial port with Keil software.
But nowhere do I find the DB-9 to SPI connections. Which pins connects to sck, mosi, miso,cs ?
Can you help?
Thanks,
John

Parents
  • Either way it appears to be a dead end for me. He wants $995 for the schematic. Hell, thats more than I'm planning on spending on putting this thing into prototype production.
    Was gonna post this at the 8052.com but Ill run it up here:

    Here's my problem:
    I'm designing the hardware that allows program hex code to be loaded to an external eeprom
    (25230 type) that is used in conjunction with a Nordic nRF9E5 chip. The nRF9E5 contains an
    8051 type mpu and requires it's program code to reside in the external eeprom.
    The eeprom uses the SPI bus.
    I want to use a windows based pc serial port. Actuall the usb but a 232 to usb translator
    chip and virtual comm port. But that part is understood.
    So, since there is no standard for this type of thing, just which db9 pins connect to sck, mosi, miso
    is determined by the software that loads the hex.
    So far Ive only found a nice windows app that costs $995 USD. Out of the question.
    Any help will be greatly appreciated.
    One other thing. Has anyone any familiarity with dss hacking a few years back ?
    As I recall the hu card contained an 8051 and 8k eeprom and was programmed via an iso7816 programmer thru the serial port. Wasnt this really an SPI interface ?
    john

Reply
  • Either way it appears to be a dead end for me. He wants $995 for the schematic. Hell, thats more than I'm planning on spending on putting this thing into prototype production.
    Was gonna post this at the 8052.com but Ill run it up here:

    Here's my problem:
    I'm designing the hardware that allows program hex code to be loaded to an external eeprom
    (25230 type) that is used in conjunction with a Nordic nRF9E5 chip. The nRF9E5 contains an
    8051 type mpu and requires it's program code to reside in the external eeprom.
    The eeprom uses the SPI bus.
    I want to use a windows based pc serial port. Actuall the usb but a 232 to usb translator
    chip and virtual comm port. But that part is understood.
    So, since there is no standard for this type of thing, just which db9 pins connect to sck, mosi, miso
    is determined by the software that loads the hex.
    So far Ive only found a nice windows app that costs $995 USD. Out of the question.
    Any help will be greatly appreciated.
    One other thing. Has anyone any familiarity with dss hacking a few years back ?
    As I recall the hu card contained an 8051 and 8k eeprom and was programmed via an iso7816 programmer thru the serial port. Wasnt this really an SPI interface ?
    john

Children
  • dead simple

    If you buy a Keil MCB900 board (<$50 at discount) and connect it to a zif socket for the eeprom on the patchboard.

    The LPC93x has HW SPI and a UART (the MCB900 even has the DB9 socket and the transciever on it).

    Then you get most of the code generated by using the CodeArchitect for LPC932, free from http://www.esacademy.com.

    So, <$50, a ZIF socket and a day of coding

    How dat?

    Erik

  • Thanks, dat be worth lookin into fer sure.
    which I will do almost immediately !

  • John,

    Please accept my profound apologies for confusing the issue. I had taken you to mean that you wanted to program the EEPROM in-circuit from the PC serial port without extra fixturing.

    Sorry,

    /Dan

  • FWIW, I happen to have used TD<->SCK, DTR<->MOSI, and CTS<->MISO through RS-232 transceivers for some bit-banged applications.

    That's a thought. We've used the parallel port on a PC to bitbang a SPI bus, but this sounds like a cleaner set of connectors and cables.

  • Thats ok Dan, I didnt explain the problem very well in the first place.
    Im confused by what Eric said.
    The Keil MCB900 board and LPC93x are for Philips products. I followed the logical steps to choose a board for the nrf9e5 chip and came up with MCBX51 EVALUATION BOARD $ 295.00 Different board - very different price.
    Actually all that I need is the DB9 to spi buss connections that CodeArchitect for LPC932 uses since Im designing the pcb.
    Could you please elaborate ?
    Finally, "FWIW, I happen to have used TD<->SCK, DTR<->MOSI, and CTS<->MISO through RS-232 transceivers for some bit-banged applications. " Isnt this going to depend on the software ?

  • Actually all that I need is the DB9 to spi buss connections that CodeArchitect for LPC932 uses since Im designing the pcb.
    No such thing
    the DB9 connect to the UART which get the data IN, the SPI pins connect to the socket which get the data out. what's between is code.

    Erik

  • Ok. then I need the db9 to uart connections and the uart to eeprom connections and the software that drives the whole thing.
    Are you saying that The Keil MCB900 board and LPC93x and CodeArchitect for LPC932 will provide this ?
    What about the part where Keil says to use MCBX51 EVALUATION BOARD ?

  • 'Finally, "FWIW, I happen to have used TD<->SCK, DTR<->MOSI, and CTS<->MISO through RS-232 transceivers for some bit-banged applications. " Isnt this going to depend on the software ?'

    Yes, my software is structured so that one can pretty much move RS-232 to SPI signal assignments around to suit their needs (assuming one does not violate the "directions" of the RS-232 signals).

    In my case, the client wanted to use a standard DB-9 serial cable from PC to target to both communicate normally between PC and target application, and perform in-system target MCU (re)programming using SPI without any other special external hardware.

  • Are you saying that The Keil MCB900 board and LPC93x and CodeArchitect for LPC932 will provide this ?

    CodeArchotect has nothing to do with actual connections, that is not "code". The MCB-900 board connect a standard configured DB9 through a transciever to the proper pins on the LPC.

    Erik

  • Could you define standard configured DB9 please ?

  • Well,well,well. I seemed to have overlooked the uart in the grand scheme of things. I
    see what you mean now.
    The programming software is independant of the rs232 conections. They are defined by the 232 standard and the uart.
    All that is unclear now is the uart to spi buss connections.

  • "All that is unclear now is the uart to spi buss connections."

    After reading the exchanges in this thread, I am still somewhat unclear regarding your requirements.

    • Are you designing your own PCB that incorporates an nRF9E5 and EEPROM?
    • Taking the EEPROM totally out of the equation for this question, will the application running in the nRF9E5 need to communicate via the MCU's UART and RS-232 to provide some user interface or debug output to a terminal emulator or anything similar? That is, again taking the EEPROM totally out of the equation for this question, is there any reason whatsoever that your PCB would require an RS-232 driver/receiver?
    • Does your design require (re)programming of the EEPROM in-circuit without removing it from your PCB?
    Your answers may lead to further questions.

  • Are you designing your own PCB that incorporates an nRF9E5 and EEPROM?

    Actually 2 pcbs. One contains the nrf9E5, eeprom and connectors for the adc and i/o port. This plugs into the other which contains a uart and a serial to usb translator. So you can load your app code to the eeprom via the pc usb and then plug it into the app circuit.

    Taking the EEPROM totally out of the equation for this question, will the application running in the nRF9E5 need to communicate via the MCU's UART and RS-232 to provide some user interface or debug output to a terminal emulator or anything similar?


    I dont think that is necessary. C

    That is, again taking the EEPROM totally out of the equation for this question, is there any reason whatsoever that your PCB would require an RS-232 driver/receiver?

    Just to program the eeprom.

    Does your design require (re)programming of the EEPROM in-circuit without removing it from your PCB?

    The eeprom is a smd. Have to plug the board into the programmer to reprogram it.
    So really all I need is a serial eeprom programmer running thru the pc serial port. And software to flash the eeprom and compile the code and all that.
    Its an evaluation board and a programmer with expandable i/o interfaces.

  • "... the other which contains a uart and a serial to usb translator. So you can load your app code to the eeprom via the pc usb and then plug it into the app circuit."

    Then if you are using something like an FTDI FT2232C http://www.ftdichip.com/Products/FT2232C.htm you can dispense with its USB-to-UART functionality and use its USB-to-SPI mode http://www.ftdichip.com/Projects/MPSSE/FTCSPI.htm or in its "Bit-Bang IO" mode to program your EEPROM.