Shop OBEX P1 Docs P2 Docs Learn Events
Programming by a UART Device other than the clip? — Parallax Forums

Programming by a UART Device other than the clip?

SteelSteel Posts: 313
edited 2007-08-08 01:54 in Propeller 1
Is it possible to program the Propeller by any UART device that talks at 115.2K?

I am just wondering, because I will have an RF Module as part of my project that has an RX/TX at 115200, and on the other end, I will have a matching module connected to the PC's RS232 port.

I don't see any problems, but I just wanted to make sure...would I be able to hook up the RF module, and program the Propeller over RF?

I just think it would be really cool to be able to update firmware while the product is in the field.

·

Comments

  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-08-07 23:54
    Only if it appears as a COM port to your system and there is a DTR signal which can serve as the reset signal for the Propeller.

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

    Parallax, Inc.
  • Mike GreenMike Green Posts: 23,101
    edited 2007-08-08 00:18
    Generally wireless programming doesn't work because of transmission delays. The programming protocols for both the Propeller and the Stamps are very timing dependent and most wireless links have potential delays or potentially high error rates. xBee and WiFi have unpredictable delays since they are packetized and there are automatic retries on error. You really need to download the whole program via the wireless link to some kind of intermediate processor, then use that to program the Propeller or Stamp.

    You could write your own Propeller program to download a program from a file on a PC to another block of EEPROM or to an SD card file, then load and run that once it's downloaded correctly, but you couldn't do this directly from the Propeller Tool or the Stamp Editor.
  • AribaAriba Posts: 2,685
    edited 2007-08-08 00:48
    Mike
    Is it also possible to write my own downloader that uses no SD card or EEPROM to store the file, but only the HubRAM ?
    I think about an Assembly code that runs in a new Cog and downloads a serially received program into the HubRAM beginning from Address $0000. But, when the whole code is downloaded, how can I start this code? Is it possible to start a new Spin-cog (with start address $10) from the Assembly Cog and then stop the Assembly cog, or is there another way?

    Andy
  • Mike GreenMike Green Posts: 23,101
    edited 2007-08-08 01:14
    If you can write a small, short downloader, you could certainly download to the upper end of RAM, then start it using a little assembly routine to copy it starting at location zero and start a Spin interpreter. If you write the whole downloader in assembly, then you could completely fill the Hub RAM with the new program and then start it. Chip posted some assembly code quite a while ago to do this and it's incorporated into the Propeller OS and FemtoBasic as part of the I2C/SPI driver. This loads a Spin program from EEPROM or an SD card, then starts the Spin interpreter in the same cog that's doing the downloading.

    The main issue is that you'd need something on the PC end as well. You can't use the Propeller Tool because of the timing issues which apply to both sides (the Propeller and the Propeller Tool).
  • AribaAriba Posts: 2,685
    edited 2007-08-08 01:54
    Thank's Mike

    The PC Application is not the problem for me (http://forums.parallax.com/showthread.php?p=665055 10. posting).

    "Some assembly code that starts the Spin interpreter in the same cog that's doing the downloading." This is exactly what I need.
    I will make a search for Chips posting, and will have a look to the sdspiFemto.spin (I have used this before to start programs from SD card).

    Cheers
    Andy
Sign In or Register to comment.