Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
BASCOM AVR, help reference (2007).PDF
Скачиваний:
288
Добавлен:
12.08.2013
Размер:
17.02 Mб
Скачать

© MCS Electronics, 1995-2007

So only the basic programming options are visible.

The USB-ISP programmer is very quick and supports all options that the Sample Electronics and STK200 programmers support.

MCS Bootloader

The MCS Boot loader is intended to be used with the$LOADER sample.

It uses the X-modem Checksum protocol to upload the binary file. It works very quick. The Boot loader sample can upload both normal flash programs and EEPROM images. The Boot loader sends a byte with value of 123 to the AVR Boot loader. This boot loader program then enter the boot loader or will jump to the reset vector (0000) to execute the normal flash program.

When it receives 124 instead of 123, it will upload the EEPROM.

When you select a BIN file the flash will be uploaded. When you select an EEP file, the EEPROM will be uploaded.

The Boot loader has some specific options.

page -89-

© MCS Electronics, 1995-2007

You can choose the boot size which is 1024 for the BASCOM $LOADER example.

Since this space is used from the normal flash memory, it means your application has 1024 less words for the main application. (A word is 2 byte, so 2KB less)

The boot loader is started when the chip is reset. Thus you need to reset the chip after you have pressed F4(program). But when you have connected the DTR line to the chip reset (with a MAX232 buffer) you can reset the chip automatically. You do need to set the 'Reset via DTR' option then.

By choosing 'Close programmer window when ready' the window will be closed when the loader returns 0.

In all other cases it will remain opened so you can look at a possible cause.

After you have pressed F4 to following window will appear :

As you can see, the loader sends a byte with value of 123.

You need to reset the chip, and then you see that the loader returned 123 which means it

page -90-