Shop OBEX P1 Docs P2 Docs Learn Events
Code for 2nd Prop on Protoboard? — Parallax Forums

Code for 2nd Prop on Protoboard?

RaymanRayman Posts: 14,243
edited 2008-10-02 02:11 in Propeller 1
Looks like I'll need a second Prop to do a good job with my Chess program...
(One for graphics and I/O and one for game code.)

I'm thinking about soldering a DIP Prop onto a Protoboard.· I'd like to use the upper 32kB of the 64kB I2C EEPROM to store the code for the second Prop.· But, I'll need code to program that from the PC and to load the second Prop with it.

Anybody already done this?

Comments

  • RaymanRayman Posts: 14,243
    edited 2008-09-30 16:34
    Thanks. I know about that one, but still need to transfer binary from PC to upper 32kB of EEPROM...
  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-09-30 16:44
    How about: http://forums.parallax.com/showthread.php?p=628778

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • Ken PetersonKen Peterson Posts: 806
    edited 2008-09-30 16:51
    I don't know if there's any way to fool the EEPROM into putting its upper half on the right I2C address for the normal prop bootloader to work. I was looking into this a while back and sort of gave up.

    Another option might be to have both props run the same program image, and differentiate their roles based on a pin state. You could then have one prop boot and then bring the second one out of reset. If you need lots of HUB RAM then you will have to figure out a way to reclaim it from the unused program code.

    [noparse][[/noparse]edit]

    Come to think of it, I think FemtoBASIC has a way of re-booting the chip from the upper half of memory.

    [noparse][[/noparse]/edit]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"I have always wished that my computer would be as easy to use as my telephone.· My wish has come true.· I no longer know how to use my telephone."

    - Bjarne Stroustrup

    Post Edited (Ken Peterson) : 9/30/2008 4:57:21 PM GMT
  • Mike GreenMike Green Posts: 23,101
    edited 2008-09-30 16:55
    You can use DongleBasic (or FemtoBasic). Download the new program to EEPROM (1st 32K), then download DongleBasic to RAM. Use the COPY statement to copy from the 1st 32K to the 2nd 32K (or to any other EEPROM you might attach to pins 28/29 or any other pair of pins).

    You can use the I2C routines from FemtoBasic to download from any EEPROM. Take a look at the comments at the beginning of sdspiFemto.spin.
  • Ken PetersonKen Peterson Posts: 806
    edited 2008-09-30 16:58
    I was just going to say "Ask Mike Green...he can probably help you."

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"I have always wished that my computer would be as easy to use as my telephone.· My wish has come true.· I no longer know how to use my telephone."

    - Bjarne Stroustrup
  • hippyhippy Posts: 1,981
    edited 2008-09-30 17:42
    Chip has released the ROM bootloader source so you could mod that to write to the upper 32KB. That way you can use the PropTool to download the second image.

    You'd need a means of launching that downloader as required but if you put a switch on the DTR/RESET signal to the master Prop you can use the PropPlug as you normally would. If you wanted to get really fancy you could use an extra I/O line, switch DTR between RESET and that and leave a cog running in the background to do the download.

    Going all out, you could write your own downloader which loads a chip downloader to RAM which then programs up the top and bottom 32KB from two images, re-boots both when done.
  • RaymanRayman Posts: 14,243
    edited 2008-09-30 21:37
    Thanks guys! Some good advice here...

    Since I'm very busy/lazy, I'll probably just try Mike's "DongleBasic" since it sounds like it'll do the job without any code work on my part.
  • rjo_rjo_ Posts: 1,825
    edited 2008-10-02 02:11
    Rayman,

    This is something that almost everyone considers eventually. When you get it ship shape, please consider putting the raw form into the OBEX.

    Thanks,

    Rich
Sign In or Register to comment.