Q: How do I talk to DOMINO’s BASIC Interpreter?

Q: What’s the difference between RS-232A, RS-422, and RS-485?

Q: How does the DOMINO’s BASIC Interpreter work?

Q: If I have a program in autostart mode running every time I turn the system on, can I replace it with another?

Q: How does the DOMINO know what baud rate I want to communicate with?

Q: How fast is the DOMINO?

Q: How fast can the A/D sample?

Q: Does DOMINO have a low power mode?

Q: What’s the difference between the serial GET and INPUT commands?

Q: Am I limited to DOMINO’s BASIC programming language?

Q: Why can’t I use the PROG and FPROG commands to save my program?

Q: When I use T0 as an I/O bit, it doesn’t respond correctly and I sometimes lose serial I/O?

Q: My DOMINO has an internal A/D, when I use it I get strange things happening to some bits on PORT1?

Q: P1.6 and P1.7 are acting strange on my DOMINO-2 whenever I access the DOMINO-2 coprocessor.

Q: Help! There is no reset line on DOMINO.

Q: Domino doesn’t have an expansion bus, can I add additional I/O devices like a D/A converter?

Q: How much drive is available from DOMINO’s port pins?

Q: The DOMINO-2 has an internal 5 volt regulator, can I use this for my circuitry?

Q: The DOMINO has non-volatile FLASH for program storage, can I use this for saving DATA?

Q: How big of a program can I write and store in DOMINO?

Q: How can I tell whether my DOMINO has an internal A/D converter?

Q: Do I need a development system to use to DOMINO?


Q: How do I talk to DOMINO’s BASIC Interpreter?

A: You will need some kind of serial communication software (on your PC) to talk with the DOMINO. Micromint offers HOST52, a combination communication/editor, but any communication program should work (i.e. Hyperterminal, Procomm, Smartcomm, and the like.) DOMINO has RS-422 drivers which can be wired to communicate RS-232A, RS-422, or RS-485. To make the physical connections to DOMINO easier for you, Micromint offers a development board with a power supply, serial connector, and some prototyping area.

 Q: What’s the difference between RS-232A, RS-422, and RS-485?

A: RS-232A is a modified version of RS-232C, the most widely used serial interface (standard on your PC). RS-232C is a 3-wire full duplex (communication in both directions simultaneously) connection. The two transmit (TX) and receive (RX) signals are ground-referenced to the third wire. The "C" in RS-232 refers to signals where the voltage levels are +/- 15 volt. In RS-232A the signal levels are reduced to +/- 5 volts. Most RS-232C ports will recognize anything above +3 volts as an ON level and anything below that as OFF. The 5-volt output of RS-422 will typically work as RS232A.

RS-485 is not strictly ground-referenced but works as a balanced-pair communication system instead. Connections use two wires (usually a twisted pair). The output voltage is always 5 volts between the pair, the polarity of the output pair changes depending upon whether it is signaling a logic one or a logic zero. The single twisted pair can carry data in both directions, but not at the same time. Such a communication is called half-duplex and it requires an intelligent means of controlling transmit and receive directions. The protocol for switching communication direction must be defined by the user and is an important consideration in using RS-485 for single and multi-drop networking.

RS-422 uses the same balanced-pair drivers as RS-485 except that instead of being half-duplex, it uses two twisted-pairs (one for data flow in each direction) for full-duplex operation. RS-422 offers all the ease of using RS-232 as well as the noise canceling benefits of differential twisted pair communications.

 Q: How does the DOMINO’s BASIC Interpreter work?

A: DOMINO’s BASIC Interpreter has 2 modes of operation, Command and Autostart. Command mode is like your DOS prompt. The interpreter will execute commands as they are entered via the command prompt. The commands might be program lines or execution commands i.e. RUN or LIST. Autostart mode is automatic. Once your program is debugged and running correctly in command mode (RAM), issuing a command to save the program in non-volatile (FLASH) memory puts the system into autostart mode. Upon power-up or reset, the BASIC interpreter looks for a program in FLASH and automatically runs the program!

 Q: If I have a program in autostart mode running every time I turn the system on, can I replace it with another?

A: Before you can install a new program, you must stop the execution of the present autostart program. From the terminal or PC simply issue a CNTL-C. This will halt the programs execution. (In order to do this your communication program must be running at the same baud rate as the DOMINO.) DOMINO will halt program execution and change back to command mode, indicated by the ">" (ready prompt). At this point you must point the Interpreter back from the FLASH space to the RAM space by issuing a "RAM" command. Now you may enter or download the new program (or alter the present one). To insure easy halting of the program, avoid tight loops like, "10 FOR X=0 TO 1000 : NEXT X".

 NOTE: If you are going to jump out of BASIC on power-up into an assembly language program leave enough time prior to the CALL for HOST52 to take control or else you will never be able to regain control.

Q: How does the DOMINO know what baud rate I want to communicate with?

A: If DOMINO contains an autostart program on reset, it will be configured to run at the baud rate you were at when the program was saved. If DOMINO is powered up without an autostart program, it will wait for you to enter a "space" character to set the baud rate. You MUST send a space character as the first character. The space character (0010000) has a single ‘1’ in its data and, depending upon its received position, DOMINO can determine the baud rate. Once determined, DOMINO sets itself to that baud rate and sends out a sign-on message.

 Q: How fast is the DOMINO?

A: It isn’t a simple answer. A rule of thumb is that it takes about 2 milliseconds per command but there’s more to it. Since the DOMINO is an interpreted BASIC, there is extra processing before each command is executed. As each command is executed, the next program statement is examined for interpretation. Execution speed depends upon both the type and length of these commands. Interpreters are, by design, slower than machines running compiled code, but you get a tremendous advantage in user friendliness. DOMINO’s BASIC requires no compiling of code. To use it you just type (or download) in your BASIC program and run it, stop it, edit it, and run again. Very user friendly!

DOMINO uses floating point numbers. That is any number between +/- 0.99999999-E127 (127 decimal places) as oppose to integer only (usually) numbers between 0-65535 (no decimals). Because DOMINO’s number universe is so large special floating point routines must be used in its calculations. These will obviously be slower than integer-only machines.

Perhaps these functions will give you a feeling of comparative speeds.

10 CLOCK 1

20 T=TIME

30 FOR X=0 TO 65535

40 NEXT X

50 L=TIME-T

60 PRINT "65535 Loops =",L," seconds"

70 PRINT "that's ",65536/L," loops/sec"

80 PRINT "or... ",L/65536," seconds/loop"

90 PRINT USING(#.#######),"or... ",L/65536," seconds/loop"

>run

65535 Loops = 103.17 seconds

that's 635.22342 loops/sec

or... 1.5742493 E-3 seconds/loop

or... 0.0015742 seconds/loop

Notice that DOMINO’s CLOCK (timer) command makes it easy to time events. Also see that very big or small numbers are expressed in scientific notation (however, you can force their display as in line 90).

 Q: How fast can the A/D sample?

A: While DOMINO’s A/D has the capability to go much faster when utilized totally in assembly language, a12-bit A/D conversion from BASIC takes 0.00257 seconds (based on adding the conversion to the previous code and subtracting the previous time for just the loop). This is somewhat useless information by itself because it doesn’t take into account the time to do something with the conversion value returned. Typically, it should be stored, printed, or used in a calculation. Speed therefore will depend less on the conversion time and more on what you intend to do with the results.

 Q: Does DOMINO have a low power mode?

A: Because the DOMINO processor is CMOS, it is already low power (typically about 50ma). There are two lower power modes, however. When the idle bit is set (PCON.0) execution halts until the system is either reset or an interrupt occurs (idle current ~35ma). When the power-down bit is set (PCON.1) execution halts until the system is reset (power-down current ~25ma). These values will vary depending on the amount of external circuitry you have connected to DOMINO and the loads on the communication drivers.

 Q: What’s the difference between the serial GET and INPUT commands?

A: If you want to get a character from the serial port use GET. This command returns a character’s 7-bit ASCII value if one has been received by the serial input port, otherwise it returns a ‘0’ value to the program. The advantage of using GET is that it does not hold up your application program waiting for a character if no characters are present. The program is free to do other things while waiting.

One caution, however. Any loop that gets a character and does something with it takes a finite amount of time. If that loop-processing time takes too long, additional characters coming into the serial port can be missed. This method shouldn’t be used for streaming data or at fast baud rates.

For fast baud rates or streaming date you should use the INPUT command. The INPUT command accumulates input characters until either receiving a carriage return <CR> or 80 characters (input buffer full). This is good for receiving most serial data, providing it ends with a <CR>, like a network packet. The disadvantage of using an INPUT statement is that when it is executed, no other program functions can take place until the <CR> (or 80 characters) is received.

 Q: Am I limited to DOMINO’s BASIC programming language?

A: Admittedly, BASIC has been and still continues to be the reason to use DOMINO. However, since DOMINO’s utilities are written in assembler and executed from BASIC using a CALL command, there is no reason that you can’t add your own CALLable assembly language subroutines to DOMINO. In fact, we’ve had customers who use a single program line "10 CALL xxxx" as their entire BASIC program. This CALL branches to their preloaded assembly language application and never comes back to BASIC!

This approach does improve performance. However it should be noted that this is an exercise for the strong willed experts. Additional tools and knowledge is needed beyond what Micromint supplies in the BASIC development system.

 Q: Why can’t I use the PROG and FPROG commands to save my program?

A: Back when this BASIC was designed to go into the Intel 8052AH-BASIC NMOS processor, the primary non-volatile memory available was EPROM. The PROG commands were written to support the programming algorithm of EPROMs. When EPROMs were improved, the algorithm was changed and the FPROG commands were added. When the Micromint 80C52-BASIC chip was masked, that was the state of the technology. Today there are a variety of alternatives such as EEPROMs and FLASH memory devices (such as used in DOMINO). Rather than continually change the mask, we implemented the memory programming algorithms in external memory - CALLable from BASIC. The physical location where the CALL goes determines which of the PROG commands is performed. Each of the PROG commands (now, different CALL xxxx commands) adds different configuration information to the program as it is saved to the non-volatile memory.

Old BASIC DOMINO Saves Saves Autostarts Saves

Command Command Program Baudrate MTOP

PROG CALL 0FF00h yes no no no

PROG1 CALL 0FF08h yes yes no no

PROG2 CALL 0FF10h yes yes yes no

PROG3 CALL 0FF18h yes yes no yes

PROG4 CALL 0FF20h yes yes yes yes

 Q: When I use T0 as an I/O bit, it doesn’t respond correctly and I sometimes lose serial I/O?

A: If you look at the specifications you will see that T0 is used as the transmitter disable bit. If a ‘0’ is written to the T0 bit, it will disable the serial communications driver. This doesn’t cause a problem unless you need to transmit data out of the console serial port. It will be sent by the processor but will end up in the bit bucket - lost. Conversely, if you are disabling the console serial driver, by writing a ‘0’ to bit T0, it will affect the way T0 is read as an input.

 Q: My DOMINO has an internal A/D, when I use it I get strange things happening to some bits on PORT1?

A: If you look at the specifications you will see that P1.5, P1.6, and P1.7 are internally connected to the A/D. Whenever an A/D conversion is called these I/O bits are set-up for A/D communications and any previous settings will be affected. External connections on these lines may affect the communications process and the conversion result reported may be erroneous.

 Q: P1.6 and P1.7 are acting strange on my DOMINO-2 whenever I access the DOMINO-2 coprocessor.

A: DOMINO-2’s coprocessor is actually an I2C device. If you look at the specifications you will see that P1.6 and P1.7 are used as the I2C I/O port. Don’t use these I/O pins for anything other than an external I2C device if you use any coprocessor function. Doing so may affect the communications between the DOMINO’s main processor and the coprocessor.

 Q: Help! There is no reset line on DOMINO.

A: DOMINO requires a Vcc of +5 volts +/- 5%. The reset line is not accessible outside of the module. If the module requires a reset, just remove power for a few seconds (while parasitic power is draining off) and then reapply. If a physical reset input is necessary, you can create one by using an external regulator that has its own ON/OFF shutdown input (such as SHARP PQ05RF1). If you need brownout protection, you simply add a 3-pin brownout/reset sensor on this same ON/OFF line (i.e. Panasonic MN1381-U) to automatically turn off the regulator.

NOTE: If there is any external voltage applied to any I/O pin prior to applying power to the system, a proper reset can not be guaranteed.

Q: Domino doesn’t have an expansion bus, can I add additional I/O devices like a D/A converter?

A: The simplest way to add I/O devices is to use I2C devices. However SPI or 3 wire serial devices can also be used. Domino’s internal A/D is an LTC1298 three-wire serial device. The A/D uses Port1.5-7 for CLK, DATA, and CS. You can easily add one or more D/A’s by using Port1.5 and Port1.6 for the CLK and DATA and Port1.4 for the *LOAD output. We suggest using the LTC1257 12-bit DAC from Linear Technology (or equiv.). The 1257 can be cascaded by daisy chaining the DATA line. See the Micromint APPNOTE on adding an external D/A to DOMINO.

 Q: How much drive is available from DOMINO’s port pins?

A: DOMINOs have two kinds of parallel ports. The CMOS Port1 pins on both DOMINO and DOMINO-2 sink 1.6mA and source 10uA. On DOMINO-2 there is a co-processor with additional parallel I/O. The co-processor’s PA0-7 and PB0-7 lines, can source or sink 20mA. NOTE: when the DOMINO-2 is powered down with the real time clock battery-backed, the co-processor’s I/O remains in the last state before power down. If these I/O pins are left in an active state, driving external circuitry, this power has to come from the back-up battery. Leaving co-processor I/O pins active during battery-backup drains the batteries. To prevent excessive battery drain when using the real time clock, make sure all co-processor I/O is placed in a non-active mode before powering the DOMINO-2 down.

 Q: The DOMINO-2 has an internal 5 volt regulator, can I use this for my circuitry?

A: There is a tradeoff between input voltage and output current available. The higher the input voltage the more power will be wasted in heat by the regulator. At a nominal 12 volt input you can supply about 50ma to external circuitry from the internal regulator without worrying about the generation of too much heat.

 Q: The DOMINO has non-volatile FLASH for program storage, can I use this for saving DATA?

A: Unlike RAM, FLASH storage memory has a limited number of times you can write to it. DOMINO’s FLASH memory is intended for program storage. You can typically store a program 10,000 times before there is a problem. Continually storing data to this FLASH memory is another story. If your application is sampling the 12-bit A/D once a second and saving it to FLASH, you will potentially exceed the FLASH’s write life in less than 1 day! However, if your application deals with infrequently changing data like configuration information, or daily event records, saving this to FLASH is quite acceptable. The FLASH memory uses a special block write algorithm. We’ve allowed room for up to 10 64-byte blocks to be saved in FLASH memory but, because of the way FLASH works, you will need to use a special assembly language routine. See Micromint’s SAVECFG.BAS program for a demo of this feature.

 Q: How big of a program can I write and store in DOMINO?

A: The maximum program line length is 80 characters. Most lines average about 15 characters. Based on this you could store over 1000 lines of code, that’s about 20 pages!

 Q: How can I tell whether my DOMINO has an internal A/D converter?

A: The product model designation is "A" for an internal A/D. If this doesn’t help, attempt an A/D conversion right from the command mode, just type "CALL 0F020H". Next get the conversion values for the two channels by typing "POP X,Y". Finally, print the conversion by typing "PRINT X,Y". If X and Y return a high value like 8191 then you DO NOT have an internal A/D. NOTE: If X and/or Y always returns a high value like 8191 it can be an indication of an internal A/D with one or more damaged channels.

 Q: Do I need a development system to use to DOMINO?

A: No, DOMINO programs can be written using any text editor or by directly typing it in using a serial terminal. When using any editor, you must remember to save the file as ASCII text only. Then you can down load the file to DOMINO (just as if you were typing it in live) using any communications package. Refer to the data sheet for the physical connections necessary to wire DOMINO to your serial port using a DB-25.

Or, you can purchase either the DOMINO-1 or DOMINO-2 development boards or complete development systems. The development boards make the physical connections to a DB9 or DB25 and provide a power supply and prototyping areas for your own circuitry. The development systems include the development board and HOST52 software. HOST52 gives you an integrated text editor (with some great built-in functions like program renumbering) plus communications software to download the program right from the editor. Debugging the program from RAM allows quick editing and re-testing without having to change environments. This also permits the user to program and reprogram DOMINO while in-circuit (providing the serial port remains accessible.)

Shopping Cart

Your shopping cart is empty!