Loading Files & Data

This section deals with the various methods of getting programs and data into the BV513, this is complicated by the fact that there is more than one method of transferring data and there are three places that it could be transferred to. In addition to this some translation can take place depending on which command is used.

Diagram showing loading methods

This section explains the various options that are available for transferring data into the BV513

Text Transfer (tload)

The 'tload' command will take a text file using the ACK protocol (see box) and either load to RAM or to the SD Card depending on the syntax used.

ACK Protocol:
This is a very simple text transfer protocol that does not rely on any hardware communications hand shake and works in the following way. The BV513 requests a line of text from BV-Comm by sending an ACK (ASCII 6). BV-Comm will send just one line of text and then wait for another ACK request. This gives time for the BV513 to process the line at its own pace. In addition there is a time out on the BV-Comm side that will only wait, approximately 1 second for the ACK request. If it is not received, BV-Comm assumes that no more data is required and terminates the process.

Setting BV-Comm

To use the text transfer with 'tload' BV-Comm must be correctly set up. Use this text settings icon icon to get the text settings dialog box.

text settings dialog boax

Set the dialog box as shown above. This will send the 'tload' command automatically just saving a few keystrokes. The most important part is that the end of line character is set to 6 and checked. The transfer path can be ignored.

The tload command, unlike reload and xload does not clear the program space beforehand so you must remember to use 'new' before loading a file. You could actually do this if you wanted to:

shows new:tload in dialog boax

This will send the new and tload keywords, note they are separated with a colon as Basic requires. The two icons to use for downloading are send and re-send a file.

send and resend icons

The first one is used to send a file that has not been selected yet and the second one is used to resend the selected file, this is very useful for modify - send - modify cycles.

Welcome Example

Just to give an idea of how this is used we will load the welcome.bas file (its in the downloads section).

  1. Set up the text transfer as above
  2. Type new - or use the alternative text set up
  3. Pick the send icon, select the welcome.bas form the open dialog and open it.
  4. Wait for the file to download and return to the okay prompt

using tload screenshot

You can verify that it has downloaded okay by running the program with 'go'.  From a development point of view it is very easy to modify the welcome.bas file and then press the reload icon to check the results.

Loading to SD Card

The 'tload' command can also be used to load text files to the SD Card. Note tload cannot be used for binary files (see xload for that) because of the ACK arrangement and this protocol determines the end of line by either CR or LF. The syntax for loading a text file into the SD Card is:

tload to "filename.ext"

When using this method make sure that the 'Activate transfer options' in the text settings dialog is NOT checked otherwise that text will become part of the text.

Text Translation:
The first command tload on its own will take a text file and semi-compile it into RAM, elements are added and comments are removed so that it can be understood by the Basic interpreter. Using the second form of syntax to transfer to SD Card no translation takes place and a like for like copy of the text is transfered.

Loading from SD Card

The 'load' command has been provided for loading *.bas files from the SD card to the RAM. This will only work with Basic files and translation takes place (see box). Because only basic files are allowed there is no need to specify the .bas extension. If for example a file existed on the SD Card called 'welcome.bas' then "tload welcome" would load the Basic file into ram. The 'tload' command will automatically call new before loading.

Xmodem Loading

Xmodem is an old established protocol that can rapidly transfer text and binary files fro a PC the the BV511. This protocol is used for loading files onto the SD Card only and the syntax is:

xload to "filename.ext"

No translation takes place, this will copy a like for like text or binary file onto the SD Card. It is necessary to use the xmodem dialog for transfers and this is explained below when using the reload command.

Using Reload

The reload command is a combination for xload and load, xload to get the file onto the SD Card and load to get the file form the SD Card to the RAM. In the following example the welocme.bas file will be stored in RAM and on the SD Card so that it can be run immediately and also at a later date form the SD Card.

type:

reload welcome

There is no need for the ‘.bas’ extension, the screen will prompt with ‘ReadyCC’ and the ‘C’ will keep appearing every so often.
Click on the xmodem icon:xmodem icon

xmodem screen
Xmodem Download dialog

Use the browse button to select the ‘welocme.bas’ file form your system, deselect any check boxes with the exception of ‘close on transfer’ as shown in the screenshot. Click the send button and the dialog will close. You should now have something like this:

screenshot after downloading welcome
After downloading "welcome.bas"
To verify that the file is there try:

list ram

This should show that there are three subroutines, ‘wel_device’, ‘wel_devid’ and ‘go’. To see inside, say ‘wel_device’ type:

list ram wel_device

This will show the contents of that subroutine. Now type:

go

and run the program.

The file now exists on SD Card for later use. Although the actual transfer is much faster then loading text files there are a lot more 'clicks' to perform over and above the tload method.