previous page next page reference home emBASIC home page

Getting Started

To see first results fast, take the easiest route to start and connect a terminal to a serial line (COM...) on your PC and to SER0 on the target controller.


To connect an RS232 terminal or a notebook with a terminal program (Windows®' built-in Hyperterm or ZOC or mCAT's wLGO) use a simple nullmodem cable that contains at least the connections for RxD/TxD and ground. Additional handshake lines usually do no harm although they aren't used.

Set the communication parameters to the COM-port on your hardware you plugged the cable to and 19200 bit/s, 8 bits per character, no parity, 1 stop bit and no handshake (19200 8N1, no HS). On the target device side, use SER0 as the default connector.

Start up the target controller by applying power to it or hit its reset button. You will see the mCAT kernel startup messages followed by the messages to the right.

If the startup ends with something similar to:

System started.

then you are still in mCAT and emBASIC isn't active. Consult the chapter "Updating System Components" for more info.

emBASIC Multitasking Compiling Interpreter
Version 0.994 Build RC4-20041125-L (Nov 25 2004 11:26:46)
Copyright (c) 2002-2004 ELZET80 Mikrocomputer GmbH&Co., KG
Developed by Techno-St.Petersburg for ELZET80 Mikrocomputer GmbH&Co., KG

Language: en. Country: GB. Charset: ISO-8859-15.
Source Size Used Avail Use%
mCAT 743724 374626 369098 50
Memory block: 4097d4 - 46399e, 743724
You are administrator
Console device: ser0


You may also see something like the message to the right.
This would mean you have stored an emBASIC user program to Flash EPROM before and this is now automatically started.

Hit Ctrl/C at the terminal to get a prompt. To get rid of it forever you need to exit emBASIC (BYE) to mCAT, delete the Flash page associated with the address given (here it would be page 2 on TSM-CPU32H2) and RESET:

2+>delpage 2

Console device: ser0
Found saved session at 840000..84092a
Starting saved session...


But let's assume everything works regular, you have your main# prompt and may simply enter some lines of emBASIC code.

You may use the !LIST and !EDIT <linenumber> commands to see and modify what you typed before or !CLEAR to erase the program.

The run will hopefully do what you expected it to do.

main# LOOP
main# a = INPUT "Enter a number or X to exit: "
main# PRINT "Thanks for entering "; a
main# IF NOT(NUM(a)) BREAK
main# END
main# run



Now what does main# mean ?



Larger projects: WorkBench