Shop OBEX P1 Docs P2 Docs Learn Events
newbie questions on FemtoBasic — Parallax Forums

newbie questions on FemtoBasic

InterplanetarianInterplanetarian Posts: 2
edited 2009-08-13 19:11 in Propeller 1
I've got FemtoBasic running on a USB Prop and I'm typing test pgms in via the Parallax Serial Terminal.

1) I'm using basic to get aquainted with the Prop but I lose the program after ever power cycle. Is there a way to download a basic text file from my PC so that I can edit externally and then retry?

2) Can basic write to a VGA screen that I've got plugged into the Prop? VGA_Demo.spin works fine.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-08-13 15:34
    1) You can save a program by using the SAVE command and reload it after a reset by using the LOAD command. Downloading a new Prop program using the Propeller Tool will erase the saved FemtoBasic program.

    You could attach an SD card to your Prop and store (and load) PC-compatible text files from the SD card also using the SAVE and LOAD commands. The FemtoBasic documentation describes what SD card pins go where. SparkFun has a nice little SD card socket that can be used with some jumper wires on a Prop Demo Board to do this.

    2) FemtoBasic comes in two versions (in the same archive), one for use with a TV and one for use with a VGA display. It's just a matter of changing a couple of lines of code at the beginning and recompiling. That's been done for you and all the various binary versions are provided pre-compiled. Just use the Propeller Tool to load the VGA version.

    FemtoBasic is the stand-alone version made for use with a PS/2 keyboard and either a TV or VGA display. If you're using PST, you're probably using BoeBotBasic or DongleBasic which are versions that use the programming connection to your PC as the "console". If you're using one of those, you can use a different terminal emulator that has the ability to either capture the displayed text to a file or "type" the contents of a file as if it came from a keyboard. This could be used so you could edit programs using a PC editor. That works, but you have to have a terminal emulator that does this.

    Post Edited (Mike Green) : 8/13/2009 3:41:34 PM GMT
  • InterplanetarianInterplanetarian Posts: 2
    edited 2009-08-13 17:54
    Mike,

    Thanks for the quick response.

    I missed the SAVE to local EEPROM - I had been thinking it only applied to the SD drive (which I don't have).

    The FemtoBasic I was running was version 2.004. After your hints I went to the object exchange and got 3.007.
    Works like a champ - VGA and kbd came right up.

    Dave
  • Mike GreenMike Green Posts: 23,101
    edited 2009-08-13 19:11
    If you're using a Protoboard or other Propeller board with a larger EEPROM than 32K, the SAVE / LOAD to local EEPROM works with any EEPROM address. In particular, you can save Basic programs to multiple areas in the EEPROM, for example 4K multiples starting at $8000. You have to remember what's where and you have to allow enough space for the size of the program. SAVE and LOAD round up to the nearest 64 byte boundary before storing the program (because of EEPROM page sizes.
Sign In or Register to comment.