Projekt Project
Hardware Hardware
Bedienung Operation
BASIC (1) BASIC (1)
BASIC (2) BASIC (2)
BASIC (3) BASIC (3)
Interna Internals
Beispiele Examples
Erweiterungen Extensions
Bibliotheken Libraries
Treiber Driver
Programme Programs


Bezugsquellen: Where to buy:
Bausatz Kit
Leerplatine Empty board

AVR-ChipBasic2: Bedienungsanleitung AVR ChipBasic2: Manual

V1.45 (c) 2006-2012 Jörg Wolfram V1.45 (c) 2006-2012 Jörg Wolfram




1 Rechtliches 1 Disclaimer

Das Programm unterliegt der GPL (GNU General Public Licence) Version 3 oder höher, jede Nutzung der Software/Informationen nonkonform zur GPL oder ausserhalb des Geltungsbereiches der GPL ist untersagt! The program uses the GPL (GNU General Public License) version 3 or later, any use of the software / information nonconformist to the GPL or outside the scope of the GPL is prohibited!
Die Veröffentlichung dieses Projekts erfolgt in der Hoffnung, daß es Ihnen von Nutzen sein wird, aber OHNE IRGENDEINE GARANTIE, auch ohne die implizite Garantie der MARKTREIFE oder der VERWENDBARKEIT FÜR EINEN BESTIMMTEN ZWECK. The publication of this project is done in the hope that it will be useful, but WITHOUT ANY WARRANTY. Without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
Alle im Text genannten Marken sind Eigentum des entsprechenden Inhabers. All in the text above are trademarks of the respective owners.

2 Die Tastatur 2, the keyboard

Die vorliegende Version benötigt eine Tastatur mit deutschem Layout. This version requires a keyboard with German layout. Die Tastaturbelegung kann aber mittels Binär-Programm geändert werden. The keyboard layout can be changed by means of binary program. Das aktuell eingestellte Layout wird im Hauptmenü im unteren Bildschirmbereich angezeigt. The currently selected layout is displayed in the main menu on the bottom screen. Zur einfacheren Bedienung gibt es am unteren Bildrand 5 farbige Felder mit Funktionen, die den Tasten ESC sowie F1...F4 entsprechen. For ease of operation there at the bottom 5 colored boxes with features that correspond to the ESC and F1 ... F4. Mit einem Aufkleber etc. auf der Tastatur lassen sich so die wichtigsten Tasten schnell finden. With a sticker on the keyboard, etc. can thus quickly find the most important keys.


Daneben gibt es noch ein paar Tastenkombinationen, die zum Teil auch vom PC her bekannt sein dürften: There are a few keyboard shortcuts that in some cases are expected to be known from the PC:

  • CTRL+ALT+DEL startet komplett neu, dabei werden alle Variablen und auch das Array gelöscht CTRL + ALT + DEL will start from scratch, here are all the variables and the array deleted
  • CTRL+C unterbricht das Programm zum nächstmöglichen Zeitpunkt CTRL + C interrupts the program as soon as possible
  • CTRL(rechts)+P sendet einen Screenshot an die serielle Schnittstelle CTRL (right) + P sends a screenshot to the serial port
  • F12 unterbricht das Programm und ruft den Monitor auf, funktioniert NUR in den Videomodi 0 und 5 F12 to pause the program and calls on the monitor works ONLY in the video modes 0 and 5
Wenn das laufende Programm beendet ist oder unterbrochen wurde (Abbruch oder Fehler), ändert sich die Farbe des Bildschirmes in eiun rot-weisses Streifenmuster. If the current program is ended or interrupted (abort or error), the color of the screen changes to eiun red and white stripe pattern. Mit der ESC Taste gelangt man wieder zurück zum Editor bzw. zum Hauptmenü. Use the ESC key to go back to the editor or to the main menu. An dieser Stelle ist es auch möglich, noch einen Screenshot zu senden. At this point it is possible to still send a screenshot.

3 Das Hauptmenü 3 The Main Menu

Nach jedem Einschalten oder Reset wird für ca. 3 Sekunden der Intro-Screen angezeigt. After each power-up or reset for 3 seconds of the intro screen is displayed. Danach wird zum Hauptme- nü gesprungen, ausser Autostart ist aktiviert. Then to the main menu is bound is enabled except autostart. In diesem Falle wird das eingestellte Programm automatisch gestartet. In this case, the set program will start automatically. Der Intro-Screen kann jederzeit durch einen Tastendruck (außer Shift, CTRL, ALT) abgebrochen werden, in diesem Falle wird eine eingestellte Autostart-Funktion nicht ausgeführt. The intro screen can be terminated at any time by pressing a button (except Shift, CTRL, ALT), in this case, a set autostart function is not executed. Ein Sonderfall ist, wenn ein LOADER-Programm installiert ist. A special case is when a Loader program installed. In diesem Fall wir vor Ausführung des Autostart-Programmes das LOADER-Programm aufgerufen. In this case we called prior to execution of the startup program, the LOADER program. Weiterhin kann durch Drücken der rechten Shift-Taste in einen kleinen "Keyboard Monitor" gewechselt werden, in dem die empfangenen Scancodes angezeigt werden. Furthermore, by using the right shift key in a small "keyboard monitor" to be changed, in which the received scan codes. Verlassen werden kann dieser Modus nur durch einen Neustart. You can exit this mode by restarting.



In einem "Fenster" sind die 8 Programme sowie 3 zusätzliche Funktionen als Symbole angeordnet, darunter die Bezeichnung bzw. der Programmname. In a "window" to 8 programs as well as 3 additional features are arranged as icons, including the name or the program name. Mit den Cursortasten kann das invertiert dargestellte Feld verschoben werden, mit der Enter-Taste wird das unter dem invertierten Feld liegende Programm gestartet oder die entsprechende Funktion aufgerufen. Using the cursor keys, the inverted field shown to move, with the Enter key is directed beneath the inverted field program started, or call the appropriate function. Die Farbe des Symbols gibt Auskunft über die Art des Programmes, bei Binärprogrammen wird zusätzlich das Aussehen des Symbols in der Programmdatei festgelegt. The icon provides information about the type of program is also in binaries the appearance of the symbol defined in the program file.


Farbe Color Programmtyp Program Type
weiss white BASIC-Programm BASIC program
grün green Als Text gespeichertes Programm Program stored as text
gelb yellow Binär-Programm Binary Program
cyan cyan Bibliothek Library
magenta magenta Video-Treiber, kann nur auf Programmplatz 8 genutzt werden Video drivers can only be used to channel 8
rot red Loader-Programm, kann weder editiert noch gestartet werden Loader program can be edited or lease started


Darunter gibt es noch eine Anzeige für den Systemstatus. Among them, there is a display for system status. Ganz links Zeile steht der MCU-Typ, entweder 644 für den ATMega644 oder 644P für den ATMega644P. Leftmost line shows the MCU type, either 644 for the ATmega644 or 644P for ATmega644P. Daneben wird das aktive Videosystem (PAL oder NTSC) angezeigt. In addition, the active video system (PAL or NTSC) is displayed. Rechts steht die Kurzbezeichnung für die aktive Tastaturtabelle. Right is the short name for the active keyboard table. Um die Tastaturtabelle zu ändern, muss ein entsprechen- des (Binär-) Programm geladen und gestartet werden. To change the keyboard table has a corresponding load of the (binary) program and launch. Zum Beispiel kann mit dem Programm "kbd_us.bin" das Tasta- turlayout auf US-englisch umgestellt werden. For example, with the program "kbd_us.bin" the keyboards turlayout be converted to U.S. English. Dazu wird das Programm entweder per XMODEM übertragen oder vom Disk-Modul geladen. This program is either transmitted via XMODEM or from the disk module loaded. Nachdem das Programm mit der F4-Taste gestartet wurde, ändert sich antsprechend die Anzeige im Systemstatus. After the program was launched with the F4 button, the display changes antsprechend in system status. In der untersten Zeile stehen die möglichen Kommandos, die Farben entsprechen den Tasten ESC und F1...F4 und haben folgende Funktionen: In the bottom row are the possible commands, the colors correspond to the ESC and F1 ... F4 and have the following functions:

Keine Funktion No function
Bei Programmen wird der Editor aufgerufen For programs, the editor called
Speichert das Programm auf einem Dataflash-Modul The program stores data on a flash module
Lädt das Programm von einem Dataflash-Modul Loading the program from a data flash module
Startet das Programm Starts program


3.1 Programm editieren (F1) 3.1 Program Edit (F1)

Ruft den eingebauten Editor auf und lädt das gewählte Programm. Calls the built-in editor and loads the selected program. Dies funktioniert nur bei BASIC und leeren Programmen. This only works with BASIC programs and empty. Binärprogramme und Binärbibliotheken lassen sich nicht editieren. Binary libraries and binaries can not be edited. % %

3.2 Programm speichern (F2) Save 3.2 Program (F2)

Diese Funktion bezieht sich auf das gerade ausgewählte Programm. This function refers to the currently selected program. Wird sie aufgerufen und ist kein formatierter Dataflash angeschlossen, erscheint nur eine Fehlermeldung. If invoked, and is not formatted DataFlash connected, only an error message. Wenn ein formatierter Dataflash angeschlossen ist, kann der Platz, wohin die Datei gespeichert werden soll mit der Dateiauswahlbox bestimmt werden: When a formatted data flash is connected, the place where the file is stored are determined by the file selection box:



Dabei ist zu beachten, dass nur auf leere Plätze oder auf BAS / AVR Files geschrieben werden kann. It should be noted that only blank spaces or on BAS / AVR files can be written. Mit der Taste ESC kann die Auswahl auch abgebrochen werden. Use the ESC key, the selection will also be canceled. Bevor ein File überschrieben wird, muß dies nochmals mit "Y" bestätigt werden. Before a file is overwritten, this must be confirmed again with "Y".

3.3 Programm laden (F3) 3.3 Program Load (F3)

Diese Funktion bezieht sich auf das gerade ausgewählte Programm. This function refers to the currently selected program. Wird sie aufgerufen und ist kein formatierter Dataflash angeschlossen, erscheint die oben gezeigtee Fehlermeldung. If invoked, and is not formatted DataFlash connected, the above error message gezeigtee. Wenn ein formatierter Dataflash angeschlossen ist, kann das Programm mit der Dateiauswahlbox bestimmt werden: When a formatted data flash is connected, the program will be determined by the file selection box:



Dabei ist zu beachten, dass nur BAS und AVR Files gelesen werden können. It should be noted that only BAS and AVR files can be read. Das gewählte File wird ohne nochmalige Nachfrage in den Flash des Controllers kopiert. The selected file will be copied without further prompting the flash of the controller. Mit der Taste ESC kann die Auswahl auch abgebrochen werden. Use the ESC key, the selection will also be canceled.
Mit den 3 Symbolen in der dritten Zeile können der Flashmanager, die Config-Page und ein Programminfo angezeigt werden. With the 3 symbols in the third row of the flash can managers Config Page and a program info are displayed. Näheres dazu in den entsprechenden Abschnitten. Look that up in the appropriate sections.


3.4 Programm starten (F4) 3.4 Program start (F4)

Startet das gewählte Programm. Starts the selected program. Dies funktioniert sowohl bei BASIC als auch nativen AVR Programmen. This works on both BASIC and native AVR programs. Nach Beendi- gung oder Abbruch des Pogrammes (Fehler, CTRL-C) erscheint am Rand ein rot-weisses Streifenmuster. After cessation or termination of Pogrammes (error, CTRL-C) on the edge appears a red and white stripe pattern. Mit der ESC Taste wird wieder zum Menu zurückgekehrt. Use the ESC key is returned to the menu. An dieser Stelle kann auch noch ein Screenshot gemacht werden, allerdings wird dabei die Randfarbe generell als schwarz ausgegeben. At this point can also make a screenshot, but this is the border color output generally considered black. Dies gilt auch, wenn ein Programm aus dem Editor heraus gestartet wird. This applies even if a program is started from within the editor.
[1cm] Die Tasten F1...F4 haben eine Zweitfunktion, wenn zusätzlich die linke CTRL oder STRG Taste gedrückt wird. [1cm] The keys F1 ... F4 have a second function, if in addition the left CTRL or CTRL key is pressed. Die Texte in den 5 Farbfeldern ändern sich dementsprechend: The texts in the 5 color fields will change accordingly:

Kopiert das Programm auf einen anderen Programmplatz Copies the program to another program position
Sendet das Programm via X-Modem The program sends via X-modem
Empfängt das Programm via X-Modem Receives the program via X-modem
Löscht das Programm Deletes the program


3.5 Programm kopieren (CTRL+F1) 3.5 Program Copy (CTRL + F1)

Um ohne ein Dataflash-Modul verschiedene Programmversionen zu testen lässt sich jedes Programm an einen der 8 Programmplätze kopieren. To test without a data flash module different program versions can be any program to copy any of the 8 program slots. Das Kopierziel lässt sich mit den Cursortasten auswählen, mit der ENTER-Taste wird ohne nachzufragen kopiert und mit der ESC-Taste wird der Vorgang abgebrochen. The copy destination can be selected with the cursor keys, the ENTER key copied without question and with the ESC key will cancel the operation.



3.6 Programm senden (CTRL+F2) 3.6 Program Send (Ctrl + F2)

Mit dieser Funktion lässt sich ein Programm im Binärformat via X-Modem senden. This function allows you to send a program in binary format via X-Modem. Damit kann zB ein Programm zum AVR-Handheld übertragen werden. Thus for example, a program for AVR Handheld transmitted. Für native AVR-Programme ist dies auch der einzige Weg zur Datenübertragung in Senderichtung, da AVR Programme nicht editiert werden können. For native AVR programs, this is the only way to transfer data in the transmit direction, as AVR programs can not be edited. Zum Ablauf ist zuerst das Senden zu aktivieren und anschließend auf der Empfängerseite die Übertragung zu starten. To flow, first sending to activate and then start on the receiving end the transfer.

3.7 Programm empfangen (CTRL+F3) Received 3.7 Program (CTRL + F3)

Mit dieser Funktion lässt sich ein Programm im Binärformat via X-Modem empfangen. This function allows a program in binary form via X-modem receive. Für native AVR-Programme ist dies auch der einzige Weg zur Datenübertragung in Empfangsrichtung, da AVR Programme nicht editiert werden können. For native AVR programs, this is the only way to transfer data in the receive direction, as AVR programs can not be edited. Zum Ablauf ist zuerst die Senderseite zu aktivieren und anschließend mit CTRL+F3 die Übertragung zu starten. To drain out the transmitter side is to be activated and then start with CTRL + F3 to transfer.

3.8 Programm löschen (CTRL+F4) 3.8 Program Delete (CTRL + F4)

Native AVR Programme lassen sich nicht mittels Editor löschen, dies kann aber mit der Tastenkombinatiion CTRL+F4 geschehen. Native AVR programs can not delete using the editor, but this can happen with the Tastenkombinatiion CTRL + F4. Nach einer Sicherheitsabfrage wird dann das Programm gelöscht. After a security check then the program is canceled. Selbstverständlich können auf diesem Wege auch BASIC Programme gelöscht werden. Of course, in this way can also BASIC programs are deleted.



3.9 Binärprogramme, Bibliotheken und Treiber 3.9 binaries, libraries and drivers

Binärprogramme, zu denen auch Bibliotheken und Treiber gehören, lassen sich auf jeden der 8 Programmplätze laden. Binaries, including libraries and drivers are, can load on each of the 8 program slots. Treiber funktionieren jedoch nur, wenn sie auf Programmplatz 8 geladen werden. Drivers will only work if they are loaded on program 8th.

4 Der Flashmanager 4 The Flash Manager

Der Flash-Manager (Symbol DFLASH im Hauptmenü) funktioniert natürlich nur dann, wenn auch ein Dataflash-Modul angesteckt ist. The Flash Manager (DFLASH icon in the main menu) only works when a data flash module is plugged. Ansonsten gibt es nur die Möglichkeit zum Rescan und Abbruch. Otherwise there is only the option to rescan and demolition.
Wurde ein Dataflash-Modul (es funktionieren nur 4 und 8 MBit Bausteine der serie AT45) erkannt, wird auf gültige Formatierung getestet. If a data flash module (it will only 4 and 8 Mbit blocks the AT45 series) is detected, testing for valid formatting. Formatieren?? Formatting? Ja das gibt es hier auch, neben dem Blockstatus werden auch solche Dinge wie Schreibzähler angelegt. Yes, there are also, in addition to the block status are also such things as write counter created. In der untersten Zeile stehen die möglichen Kommandos, die Farben entsprechen den Tasten ESC und F1...F4 und haben folgende Funktionen: In the bottom row are the possible commands, the colors correspond to the ESC and F1 ... F4 and have the following functions:

Rückkehr zum Hauptmenü Return to main menu
Zeigt den Belegungszustand des Filesystems an Displays the allocation status of the file system
Speichert alle Programme auf das Dataflash-Modul Saves all programs on the data flash module
Lädt alle Programm vom Dataflash-Modul Invites all program data from flash module
Testet den Dataflash erneut (zB nach Wechsel) Tests the data flash again (eg after change)


4.1 Info (F1) 4.1 Info (F1)

Die freien Dateien/Blöcke werden gezählt und in einer Infobox angezeigt. The free files / blocks are counted and displayed in a message box.



4.2 Backup (F2) 2.4 Backup (F2)

Wenn ein formatierter Dataflash angeschlossen ist, kann der Speicherplatz mit der Dateiauswahlbox bestimmt werden: When a formatted data flash is connected, the space will be determined by the file selection box:



Dabei ist zu beachten, dass nur auf leere Plätze oder auf BUP Files geschrieben werden kann. It should be noted that only blank spaces or BUP files can be written. Mit der Taste ESC kann die Auswahl auch abgebrochen werden. Use the ESC key, the selection will also be canceled. Bevor ein File überschrieben wird, muß dies nochmals mit "Y" bestätigt werden. Before a file is overwritten, this must be confirmed again with "Y". Beim Backup werden alle Programme in eine Datei geschrieben. When backing up all programs are written to a file. In der Fileselect-Box wird bei BUP-dateien immer der Programmname des ersten Programms angezeigt. In the file select box at BUP files always the program name of the first program is displayed.

4.3 Restore (F3) Restore 4.3 (F3)

Wird sie aufgerufen und ist kein formatierter Dataflash angeschlossen, erscheint die oben gezeigtee Fehlermeldung. If invoked, and is not formatted DataFlash connected, the above error message gezeigtee. Wenn ein formatierter Dataflash angeschlossen ist, kann das zu lesende Backup mit der Dateiauswahlbox bestimmt werden: When a formatted data flash is connected, it can be determined to be read back to the file selection box:



Dabei ist zu beachten, dass nur BUP Files gelesen werden können. It should be noted that only BUP files can be read. Das gewählte File wird ohne nochmalige Nachfrage in den Flash des Controllers kopiert. The selected file will be copied without further prompting the flash of the controller. Mit der Taste ESC kann die Auswahl auch abgebrochen werden. Use the ESC key, the selection will also be canceled.
Mit der Taste CTRL oder STRG können zusätzliche Funktionen ausgewählt werden, wobei nicht immer alle Funktionen verfügbar sind (zB wenn kein Dataflash-Modul vorhanden oder dieses nicht formatiert ist. With the CTRL or CTRL Additional functions can be selected, all functions are not always available (eg, if no data flash module does not exist or this format.

Löscht eine Datei Deletes a file
Formatiert das Dataflash-Modul Formats the data flash module


4.4 Delete (CTRL + F1) 4.4 Delete (CTRL + F1)

Mit dieser Funktion können beliebige Dateien auf dem Dataflash-Modul gelöscht werden. This feature allows arbitrary files to be deleted from the data flash module. Dazu wird wieder die Dateiauswahlbox angezeigt. To back the file dialog appears. Wird eine Datei gewählt, erscheint noch eine Abfrage, ob die Datei auch wirklich gelöscht werden soll. When a file is selected, yet you will be asked if the file should be really deleted. Mit der ESC Taste kann abgebrochen werden. Use the ESC key to cancel.

4.5 Format (CTRL + F4) 4.5 format (CTRL + F4)

Normalerweise sollte ein Dataflash-Modul nur einmal formatiert werden. Normally, a data flash module is formatted only once. Denn beim Formatieren werden auch vorhandene Schreibzähler mit zurückgesetzt. For formatting and existing write counter with reset.

5 Das Konfigurationsmenü 5 The configuration menu

Auf der Config-Page können verschiedene Einstellungen vorgenommen werden. On the config page, various settings can be made.



Im unteren Bereich des Bildschirms ist eine 8-stellige Checksumme zu sehen. In the bottom of the screen, an 8-digit checksum is seen. Diese steht auch in der LIESMICH Datei und sollte natürlich (insbesondere nach dem Clonen) übereinstimmen. This is also in the README file, and of course you should (especially after the cloning) match. Die im Bild dargestellte Checksumme stimmt nicht unbedingt mit der realen überein, das liegt daren, dass nicht bei jeder neuen Version alle Bilder in der Dokumentation aktualisert werden. The picture shows checksum does not necessarily coincide with the real, which is legendary, that not every new version of all the images are updated in the documentation.

5.1 Die Belegung der Funktionstasten 5.1 The assignment of function keys

Die gerade aktive Funktion ist invertiert dargestellt, die Auswahl erfolgt über die Cursor-Hoch und Cursor-Runter Tasten. The currently active function is highlighted, the selection is made by the high-cursor and cursor-down keys. In der untersten Zeile stehen die möglichen Kommandos, die Farben entsprechen wieder den Tasten ESC und F1...F4 und haben folgende Funktionen: In the bottom row are the possible commands, the colors again correspond to the ESC and F1 ... F4 and have the following functions:

Config-Page wieder verlassen ohne die Änderungen zu speichern Config Page leave without saving changes
Ausgewählte Einstellung ändern Selected setting change
Einstellungen speichern und Reboot Save the settings and reboot


5.1.1 Exit (ESC) 5.1.1 Exit (ESC)

Mit dieser Taste werden die aktuellen Einstellungen verworfen und zum Hauptmenü zurückgekehrt. With this button, the current settings are rejected and returned to the main menu.

5.1.2 Change (F1) 5.1.2 Change (F1)

Mit jedem Tastendruck ändert sich die aktuell ausgewählte Einstellung. With each press changes the currently selected setting.

5.1.3 Serielle Geschwindigkeit 5.1.3 Serial Rate

An dieser Stelle kann die Geschwindigkeit der seriellen Schnittstelle zwischen 1200 und 2400 Bps umgeschaltet werden. At this point, the speed of the serial interface 1200-2400 bps are switched. Mit dem BASIC-Befehl BAUD kann die Geschwindigkeit im Programm temporär verstellt werden, nach Ende des Programmes wird wieder auf den hier eingestellten Wert zurückgestellt. With the BASIC command BAUD speed can be adjusted in the program temporarily, after the end of the program will be set back to the value set here.

5.1.4 I2C-Geschwindigkeit 5.1.4 I2C speed

Hier kann die Geschwindigkeit der I2C-Schnittstelle zwischen 100 und 400 kHz umgeschaltet werden. Here, the speed of the I2C interface are switched 100-400 kHz. Die meisten I2C-Bausteine kommen mit 400kHz zurecht, aus Kompatibilitätsgründen kann auch die langsame Geschwindigkeit genutzt werden. Most I2C devices cope with 400kHz, for reasons of compatibility can also be used to slow speed.

5.1.5 SPI-Geschwindigkeit 5.1.5 SPI speed

Hier kann die Geschwindigkeit der SPI-Schnittstelle zwischen 156 kHz und 5 MHz umgeschaltet werden. Here, the speed of the SPI interface between 156 kHz and 5 MHz are switched.

5.1.6 EEPROM Adresse 5.1.6 EEPROM address

Hiermit lässt sich die EEPROM-Adresse für das Daten-EEPROM einstellen (XPOKE/XPEEK). This allows to build the EEPROM address for the data EEPROM set (XPOKE / XPEEK).

5.1.7 Zeilenende 5.1.7 End of Line

Mit dieser Taste kann die Art des Zeilenendes für die serielle und parallele Schnittstelle festgelegt werden. This key is the way the end of line for the serial and parallel port are set. Möglich sind LF only (Unix/Linux), CR only (Mac) und CR+LF (Windows). Are only possible LF (Unix / Linux), CR only (Mac) and CR + LF (Windows).

5.1.8 Serielles Interface - Typ 5.1.8 Serial Interface - Type

Möchte man zB einen anderen RS232 Pegelwandler als die vorhandene Schaltung verwenden, kann dies hier umgeschaltet werden. Simple ist die original-Schaltung, mit Standard funktionieren RX und TX wie bei jedem anderen UART. If you want to use a different example than the existing RS232 level converter circuit, this can be changed here. Simple is the original circuit, with Standard RX and TX work like any other UART.

5.1.9 Serielles Interface - Eingangspin 5.1.9 Serial Interface - input pin

Da die ursprüngliche Beschaltung der seriellen Schnittstelle schon den TX1-Pin (PD3) des ATMega644P belegt, gibt es hier die Möglichkeit, den Eingangspin der seriellen System-Schnittstelle zwischen PD1 (notwendig für ATMega644P) und PD3 (Kompatibilitätsmodus) umzuschalten. Since the original wiring of the serial interface already the TX1 pin (PD3) of the ATmega644P is, there is the possibility of the input pin of the serial system interface between PD1 (necessary for ATmega644P) and PD3 (compatibility mode) switch. Die Umschaltung ist für beide Typen möglich, allerdings lässt sich die zweite serielle Schnittstelle des 644P im Kompatibilitätsmodus nicht benutzen. Switching is possible for both types, however, can the second serial port of the 644P not use compatibility mode.

5.1.10 Autostart 5.1.10 Startup

Wenn im Intro-Screen keine Taste gedrückt wird, kann ein Programm automatisch gestartet werden. If the intro-screen button is not pressed, a program can be launched automatically. Der in früheren Versionen vorhandene Autostart-Jumper wird nicht mehr abgefragt und sollte unbedingt offengelassen werden. In earlier versions of existing startup jumper will no longer monitored and should absolutely be left open. Wählbar sind die Programme 1...7 sowie eine Dekativierung der Autostart-Funktion. A choice of the programs 1 .. 7 and a Dekativierung the autostart function.

5.1.11 Save (F2) 5.1.11 Save (F2)

Mit dieser Taste werden die aktuellen Einstellungen gespeichert und ein Neustart ausgeführt, um das System neu zu initialisieren. This key allows the current settings and restarts to initialize the system.

6 Der Fullscreen-Editor 6 The Full Screen Editor



Die Programme werden mit einem einfachen Fullscreen-Editor geschrieben. The programs are written using a simple full-screen editor. Die aktuelle Cursor-Position wird beim Verlassen des Editors im EEPROM gespeichert, und zwar für jedes der 8 Programme separat. The current cursor position is saved when you exit the editor in the EEPROM, and that for each of the 8 programs separately. Dadurch kann es vorkommen, dass sich nach einem Systemupdate (Neuflashen des Controllers) der Cursor irgendwo innerhalb des Textbereiches befindet. Thus it may happen that after a system update (Neuflashen the controller) the cursor anywhere within the text area. Mit CTRL/STRG und POS1 lässt er sich aber schnell wieder auf die Anfangsposition setzen. With CTRL / STRG POS1 and it can be set but quickly returned to the initial position. Wenn ein Wird das Programm vom Dataflash geladen oder von einem anderen Programmplatz kopiert, werden die Cursorkoordinaten auf den Programmanfang gesetzt. When a program is loaded from Data Flash or copied from another program slot, the cursor coordinates are set to the beginning of the program. Wenn der Programmname mit einem Unterstrich beginnt, wird das Programm beim Speichern nicht automatisch in Token umgewandelt, sondern als reiner Text gespeichert. If the program name starts with an underscore, the program will not you save your converted into tokens, but is stored as plain text. Ein so gespeichertes Programm lässt sich zwar nicht starten, die Funktion kann aber genutzt werden um reine Textdateien zu speichern. Such a stored program can not start, the function can also be used to save plain text files. Auf diese Texte lässt sich dann zB mittels EPEEK ab Adresse 3072 zugreifen. This text can then be accessed from such means EPEEK address 3072nd Ganz oben stehen Programmnummer (1-8) und Programmname. At the top, the program number (1-8) and program name. Sobald der Text verändert wird, erscheint in der oberen linken Ecke ein Stern. Once the text is changed, in the upper left corner appears a star. Darunter befindet sich eine farbige Statuszeile, in der zB Fehler angezeigt werden. Among them is a colored status bar that displays the error eg. Die Position des Cursors wird durch ein invers blinkendes Zeichen dargestellt. The cursor position is indicated by a flashing inverse characters. Es wird immer eingefügt, Zeichen unter/rechts vom Cursor wandern nach rechts. It is always inserted, sign in / right of the cursor move to the right. Die Cursor-Tasten bewegen den Cursor im Textfeld, die Page-tasten bewegen den Cursor um 8 Zeilen nach oben/unten. The cursor keys move the cursor in the text box, the Page buttons to move the cursor to 8 lines up / down. Bei Bedarf wird der Text gescrollt. If necessary, scrolls the text. In der untersten Zeile sind 5 Farbfelder zu sehen. In the bottom line 5 color fields can be seen. Diese entsprechen den Tasten ESC und F1...F4 und haben folgende Funktionen: These correspond to the ESC and F1 ... F4 and have the following functions:

Abbruch, ohne zu speichern Abort without saving
Änderung des Programmnamens Change the program name
Speichert das Programm im Flash Saves the program in flash
Lädt das Programm aus dem Flash Loading the program from the flash
Startet das Programm Starts program


Die Tasten F1 bis F4 haben eine Zweitfunktion, wenn zusätzlich die CTRL oder STRG Taste gedrückt wird. The F1 to F4 keys have a second function, if in addition the CTRL or CTRL key is pressed. Der Text in den 5 Farbfeldern ändert sich entsprechend: The text in the 5 color fields will change accordingly:

Ausdruck des Listings über die Druckerschnittstelle Expression of the listing on the printer interface
Ausgabe des Programms über die serielle Schnittstelle Output of the program via the serial interface
Empfang eines Programms über die serielle Schnittstelle Receiving a program via the serial port
Löscht das Programm (alle Zeilen leer) Deletes the program (all empty lines)


Bei den meisten Funktionen erscheint in der Statuszeile eine Sicherheitsabfrage, die entweder mit (Y)es oder (N)o (alternativ ENTER oder ESC) beantwortet werden muss. For most functions, the status bar appears requesting confirmation that either (Y) es or (N) o (or ENTER or ESC) must be answered.


6.1 Spezielle Tastenfunktionen 6.1 Special Key Functions

Die folgenden Tasten / Tastenkombinationen haben spezielle Funktionen: The following keys / key combinations have special functions:


Cursortasten Cursor keys Bewegen den Textcursor innerhalb der Zeilen (horizontal) oder zwischen den Zeilen (vertikal). Move the text cursor within the line (horizontal) or between the lines (vertical).
Page Up Page Up Bewegt den Textcursor um 8 Zeilen nach oben bzw. bis zur Zeile 1 Moves the text cursor to 8 lines up or until the Line 1
Page Down Page Down Bewegt den Textcursor um 8 Zeilen nach unten, maximal bis Zeile 95 Moves the text cursor by 8 lines down, up to a maximum line 95
POS1 POS1 Setzt den Cursor auf das erste Zeichen der aktuellen Zeile. Moves the cursor to the first character of the current line.
CTRL+POS1 CTRL + POS1 Setzt den Cursor auf das erste Zeichen der ersten Zeile. Moves the cursor to the first character of the first line.
ENDE END Setzt den Cursor auf das letzte Zeichen der aktuellen Zeile. Moves the cursor to the last character of the current line.
CTRL+ENDE CTRL + END Setzt den Cursor auf das erste Zeichen der letzten Zeile. Moves the cursor to the first character of the last line.
DEL DEL Löscht das Zeichen unter dem Cursor, von rechts rücken Zeichen nach. Deletes the character under the cursor, by moving to the right character.
Backspace Backspace Löscht Zeichen links neben dem Cursor, von rechts rücken Zeichen nach. Deletes character to the left of the cursor, by moving to the right character.
ENTER ENTER Es wird an den Anfang der nächsten Zeile gesprungen. It skips to the beginning of the next line.
TAB TAB Es werden Leerzeichen so eingefügt, dass der Cursor im "Raster" von 3 Zeichen weiterbewegt wird. There blanks are inserted so that the cursor is in the "grid" is advanced by 3 characters. Nützlich für Einrückungen im Programmtext. Useful for indentation in the program text.
ALT+INS ALT + INS Es wird an der aktuellen Cursorposition eine Zeile eingefügt. It is inserted at the current cursor position one line. Alle Zeilen ab der Cursorposition wandern nach unten, die bisherige letzte Zeile geht dabei verloren. All rows from the cursor move down the current last line is lost.
ALT+DEL ALT + DEL Es wird die Zeile der aktuellen Cursorposition gelöscht. It deletes the row from the current cursor position. Alle Zeilen unterhalb der Cursorposition wandern nach oben, unten wird eine Leerzeile angefügt. All lines below the cursor position to the top, the bottom is a blank line added.
CTRL+C CTRL + C Die aktuelle Zeile wird in den Puffer kopiert. The current line is copied into the buffer. Angezeigt wird das durch ein # und die Zeilennummer in der rechten oberen Bildschirmecke. Which is displayed by a # and line number in the upper right corner of the screen.
CTRL+X CTRL + X Die aktuelle Zeile wird in den Puffer verschoben und gelöscht. The current line is shifted into the buffer and cleared. Angezeigt wird das durch ein # und die Zeilennummer in der rechten oberen Bildschirmecke. Which is displayed by a # and line number in the upper right corner of the screen.
CTRL+V CTRL + V Der Puffer wird in die aktuelle Zeile kopiert. The buffer is copied into the current line. Dabei wird diese überschrieben. Here it will be overwritten. Die Puffer-Anzeige rechts oben verschwindet wieder. The buffer display right above disappears.
CTRL+F CTRL + F Aktiviert die Suchfunktion, Beschreibung im nächsten Abschnitt. Activates the search function described in the next section.




6.2 Die Suchfunktion 6.2 The search function

Ab version 1.31 ist eine Suchfunktion in den Editor integriert. From version 1.31 a search function in the editor is integrated. Damit können kurze Textpassagen (maximal 16 zeichen) im aktuellen Programmtext gesucht werden. This allows short passages of text (up to 16 characters) in the current program text to search for. Die Suche ist case-sensitiv, das heißt es wird auf Groß- und Kleinschreibung geachtet. The search is case sensitive, that is, take into consideration the case-sensitive. Aufgerufen wird die Suche mit der Tastenkombination CTRL+F . Called the search using the key combination Ctrl + F. Die Farbe der Statuszeile ändert sich in blau, neben dem Text FIND: kann der Suchstring eingegeben werden. The color of the status bar changes to blue, next to the text FIND: the search string entered. Ein weißes Rechteck markiert das aktuelle Ende des Suchstrings, Korrekturen können mit der Backspace-Taste vorgenommen werden. A white rectangle marks the current end of the search string, corrections can be made with the backspace key.



Mit der Taste ESC wird die Suche abgebrochen, ein Abbruch erfolgt auch wenn der Suchstring eine Länge von 0 hat. The ESC key cancels the search, a termination occurs even if the search string has a length of 0. Die Suche kann nun mit der Taste Enter gestartet werden. The search can be started by pressing Enter. Gesucht wird von der aktuellen Cursorposition aus, nach Zeile 95 wird bei Zeile 1 weitergesucht. We are looking for from the current cursor position, after line 95 search continues at line 1. Wird der Suchstring gefunden, wird dieser im Programmtext invertiert dargestellt und der Cursor an den Anfang des gefundenen Strings gesetzt. If the search string is found, it is highlighted in the program text and the cursor jumps to the beginning of the found string.



Mit der Taste ESC kann die Suche nun abgebrochen werden, mit der Taste Enter wird eine neue Suche beginnend bei der aktuellen Cursorposition gestartet. Use the ESC key, the search can be canceled, press Enter to start a new search starting at the current cursor position.

7 Serieller Programmtransfer 7 Serial program transfer



7.1 Kommunikationsparameter 7.1 Communication Parameters

Für die Funktionen der seriellen Schnittstelle sollte am PC folgendes eingestellt werden For the functions of the serial interface on the PC, the following should be set
8 Bit --- 1200/2400 Bps --- no Parity --- 2 Stopp-Bits 8 bits --- 1200/2400 bps no parity --- --- 2 stop bits
Für den Programmtransfer aus dem Editor wird normale Textübertragung verwendet, ansonsten das X-Modem Protokoll. For program transfer from the normal text editor transmission is used, otherwise the X-modem protocol. Unter Windows kann man zB das Hyperterminal verwenden (Text senden/aufzeichnen) verwenden, unter Linux minicom oder das Program chiptrans.pl im Examples-Ordner. On Windows, you as the HyperTerminal (text send / record) use minicom on Linux or the Program chiptrans.pl in the examples folder. Das Programmende wird mit einem "#" als erstes Zeichen in der Zeile gekennzeichnet. The program will end with a "#" character as the first character in the line.

7.2 Senden zum AVR (BASIC-Programmtext) 7.2 Send to AVR (BASIC program text)


  1. RECV (CTRL+F3) im Editor auswählen und mit "Y" bestätigen RECV (CTRL + F3) in the editor and confirm with "Y"
  2. Transfer am PC mit ./chiptrans.pl -w Dateiname starten Shuttle launch on the PC with. / Chiptrans.pl-w filename
  3. am AVR wird das Programm, am PC der Status angezeigt AVR is on the program, the status displayed on the PC


7.3 Empfangen vom AVR (BASIC-Programmtext) 7.3 Receiving the AVR (BASIC program text)


  1. Transfer am PC mit ./chiptrans.pl -r Dateiname starten Shuttle launch on the PC with. / Chiptrans.pl-r filename
  2. SEND (CTRL+F2) im EDITOR auswählen und mit "Y" bestätigen SEND (CTRL + F2) using the Editor and press "Y"
  3. am PC wird der Status angezeigt the status is displayed on the PC
Zusätzlich zum Programmaustausch im Editor, bei dem reiner Text übertragen wird, gibt es noch im Hauptmenü die Möglichkeit, Programme im Binärformat zu übertragen. In addition to the exchange program in the editor, is transferred from the pure text, there is the main menu, the ability to transfer programs in binary. Die Übertragung erfolgt mittels X-Modem Protokoll, auf diesem Wege können auch native AVR-Programme gesendet und empfangen werden, die ja nicht editiert werden können. The transmission takes place via X-modem protocol in this way can also native AVR programs are sent and received, which can not be edited.

7.4 Senden zum AVR (Binär-Dateien) 7.4 Send to AVR (binaries)


  1. X-Modem Transfer (senden) am PC starten X-Modem transfer (send) on the PC
  2. Programm im Hauptmenü auswählen Select Program from the main menu
  3. RECV (CTRL+F3) betätigen RECV (CTRL + F3) key
  4. Es wird eine Hinweisbox "Data transfer..." A message box is "Data transfer ..." angezeigt appropriate
  5. Am AVR wird während der Übertragung die Anzeige periodisch abgeschaltet, am PC wird der Status angezeigt The AVR during transmission, the display is switched off periodically, the status is displayed on the PC
  6. Mit der ESC Taste der Vorgang abgebrochen werden Be canceled with the ESC key on the operation


7.5 Empfangen vom AVR (Binärdateien) 7.5 Receiving the AVR (binaries)


  1. Programm im Hauptmenü auswählen Select Program from the main menu
  2. SEND (CTRL+F3) betätigen SEND (CTRL + F3) key
  3. Es wird eine Hinweisbox "Data transfer..." A message box is "Data transfer ..." angezeigt appropriate
  4. X-Modem Transfer am PC (empfangen) starten X-modem transfer start (receive) on the PC
  5. am PC wird der Status angezeigt the status is displayed on the PC
  6. Mit der ESC Taste der Vorgang abgebrochen werden Be canceled with the ESC key on the operation


7.6 Nutzung der Screenshot-Funktion 7.6 Use of the screenshot function

Für den Screenshot kann das Programm screenshot.pl im tools-Verzeichnis benutzt werden. In the screenshot, the program can screenshot.pl the tools directory are used. Es benötigt ImageMagick und wird mit "./screenshot.pl dateiname.endung" aufgerufen. It requires ImageMagick and is called with ". / Screenshot.pl dateiname.endung". Danach kann dann der Screenshot vom Controllerboard mittels rechts CTRL+P ausgelöst werden. After that then the screenshot will be triggered by the controller board using the right CTRL + P.

Defaultmäßig ist der neue 16-Farb Modus eingestellt, um kompatibel zur 8-Farb Ausgabe zu sein, muß vor dem Datei-namen als Parameter -c8 angegeben werden. By default, the new 16-color mode is set to compatible with the 8-color output must be to be specified before the filename as a parameter c8. Der Screenshot im Videomode 7 ist nur als Bulk-Transfer realisiert, bei dem die Treiber-ID, die Palette und der gesamte Videospeicher übertragen werden. The screenshot in video mode 7 is realized only as a bulk transfer, in which the driver ID, the pallet and the whole video memory to be transferred. Defaultmässig sind bei den Tools 2400 Bps und /dev/ttyS0 als Schnittstelle eingestellt, bei Bedarf muß das Perl-Script entsprechend abgeändert werden. By default the tool at the 2400 Bps and / dev/ttyS0 are set as the port, which has the perl script must be changed accordingly. Eine Alternative dazu ist das Programm konvert.pl . An alternative program is konvert.pl. Dieses wandelt zB mit einem Terminalprogramm eingefangene Screenshots in Bilddateien um. This example converts to a terminal program captured screenshots to image files. Die bedienung ist gleich dem Screenshot-Programm, allerdings wird als erster Parameter die zu wandelnde Datei angegeben. The user is the same as the screenshot program, however, is specified as the first parameter is the file to be converted.

8 Der integrierte Monitor/Debugger 8 The integrated monitor / debugger

ChipBasic2 enthält auch einen kleinen Monitor zum Debuggen. ChipBasic2 also includes a small monitor for debugging. Augerufen wird er mit der Taste F12 während des Programmlaufes oder mit einer BREAK -Anweisung im Programm. Call eye he is. Pressing the F12 key while the program is running or with a BREAK instruction in the program

8.1 Der Hauptbildschirm 8.1 The main screen

Der Monitor kann nur in allen Videomodes aufgerufen werden, aber nur in VMODE 0 (Textmode) und im VMODE 5 (128x64) steht die volle Funktionalität zur Verfügung. The monitor can only be invoked in all video modes, but only in VMODE 0 (text mode) and in VMODE 5 (128x64), the full functionality is available. Dies betrifft die Funtionen Go , Step und View da aufgrund des Speicherbedarfs in diesen Videomodi der Bildspeicher beim Aufruf des Monitors nicht gesichert werden kann. This as the following functions Go, Step View and concerns as a result of memory requirements in these video modes, the image memory when calling the monitor can not be secured.



Oben rechts steht durch Doppelpunkte getrennt das Programm, die Programmzeile und das gerade abgearbeitete Statement. Top right is separated by a colon, the program, the program line and it just worked off statement. Darunter die gerade aktive Programmzeile im Quelltext, da nur 30 Zeichen je Zeile dargestellt werden können eventuell die letzten 2 Zeichen der Quelltextzeile fehlen. Including the currently active program line in the source code, since only 30 characters per line can be displayed may be missing the last 2 characters of the source code line.
Danach folgt im linken Teil des Bildschirms die Anzeige aller Variablenwerte und rechts daneben der Stack. In the left part of the screen to display all the values ​​of variables and follows right beside the stack. Jede FOR-Schleife und jedes GOSUB erzeugt einen Eintrag auf dem Stack. Each FOR loop and each GOSUB creates an entry on the stack. Unter der Variablenliste wird der Status der parallelen Schnittstelle angezeigt. Under the variable list of the status of the parallel port is displayed. Zuerst die Pin-Nummern (1 entspricht D0), darunter die Datenrichtung (I oder O) und ganz unten der aktuelle Pegel. First, the pin numbers (1 corresponds to D0), including the data direction (I or O) and the bottom of the current level.
In der untersten Zeile stehen die möglichen Kommandos, die Farben entsprechen den Tasten ESC und F1...F4 und haben in den Videomodi 0 und 5 folgende Funktionen: In the bottom row are the possible commands, the colors correspond to the ESC and F1 ... F4 and have video modes 0 and 5 in the following functions:

Beendet den Monitor und löst ein Break aus (beendet das Programm) Stops the monitor and solves a break from (the program ends)
Beendet den Monitor und setzt die Programmausführung fort Stops the monitor and resumes execution
Führt das nächste Statement aus und kehrt danach zum Monitor zurück Executes the next statement and then returns to the monitor
Zeigt den aktuellen Ausgabe-Bildschirm an, jeder weitere Tastendruck wechselt zur Monitor-Anzeige zurück Displays the current output screen, each further press returns to the Monitor Display
Wechsel zur Array-Anzeige Change to array indicator


Wenn der Monitor aufgerufen wird, muss der gesamte Bildspeicher gesichert werden. If the monitor is called, the entire image memory can be saved. Allerdings funktioniert das nur in den Videomodi 0 und 5, dies liegt einfach daran dass der Bildspeicher in den anderen Videomodi größer ist und dadurch nicht mehr temporär gesichert werden kann. However, this only works in video modes 0 and 5, this is simply because that the image memory is larger in other video modes and thus can no longer be saved temporarily. Deshalb sind in allen anderen Videomodie die Tasten F1...F3 gesperrt: Therefore, in all other Videomodie the keys F1 ... F3 are blocked:

Beendet den Monitor und löst ein Break aus (beendet das Programm) Stops the monitor and solves a break from (the program ends)
Taste ist gesperrt Button is disabled
Taste ist gesperrt Button is disabled
Taste ist gesperrt Button is disabled
Wechsel zur Array-Anzeige Change to array indicator


8.2 Die Array-Ansicht 8.2 The array view



Mittels der Taste F4 gelangt man aus dem Monitor-Hauptbildschirm in die Array-Ansicht. Using the F4 key can be reached from the main monitor screen in the array view. Die Anzeige erfolgt ausschließlich hexadezimal, zusätzlich können die korrespondierenden Zeichen aus der Symboltabelle angezeigt werden. The display is only hexadecimal, in addition, the corresponding characters appear in the symbol table. Mit den Tasten PgUp und PgDown kann geblättert werden, die Funktionstasten haben folgende Belegung: Using PgUp and PgDown can be scrolled, the function keys are assigned as follows:

Beendet den Monitor und löst ein Break aus (beendet das Programm) Stops the monitor and solves a break from (the program ends)
Wählt die vorherige XMEM Page aus, nach 00 folgt FF. Selects the previous XMEM Page, after 00 FF follows.
Wählt die nachfolgende XMEM Page aus, nach FF folgt 00. Selects the following XMEM Page, followed by FF 00th
Schaltet die Zeichenanzeige ein und aus Turns out the sign and display
Wechselt zurück zum Monitor-Hauptbildschirm Returns to the main monitor screen


created with latex2web.pl v0.62 © 2006-2011 Joerg Wolfram Created with latex2web.pl v0.62 © 2006-2011 Joerg tungsten