
- •Table of Contents
- •Index
- •Keyword Reference
- •Installation
- •Installation of BASCOM
- •BASCOM IDE
- •Running BASCOM-AVR
- •File New
- •File Close
- •File Save
- •File Save As
- •File Print Preview
- •File Print
- •File Exit
- •View PinOut
- •View PDF viewer
- •View Error Panel
- •Edit Undo
- •Edit Redo
- •Edit Cut
- •Edit Copy
- •Edit Paste
- •Edit Find
- •Edit Find Next
- •Edit Replace
- •Edit Goto
- •Edit Toggle Bookmark
- •Edit Goto Bookmark
- •Edit Indent Block
- •Edit Unindent Block
- •Edit Remark Block
- •Program Compile
- •Program Syntax Check
- •Program Show Result
- •Program Simulate
- •Program Send to Chip
- •Tools Terminal Emulator
- •Tools LCD Designer
- •Tools LIB Manager
- •Tools Graphic Converter
- •Tools Stack Analyzer
- •Tools Plugin Manager
- •Tools Batch Compile
- •Options Compiler
- •Options Compiler Chip
- •Options Compiler Output
- •Options Compiler Communication
- •Options Compiler I2C, SPI, 1WIRE
- •Options Compiler LCD
- •Options Communication
- •Options Environment
- •Options Simulator
- •Options Programmer
- •Supported Programmers
- •ISP programmer
- •PG302 programmer
- •Sample Electronics cable programmer
- •KITSRUS Programmer
- •MCS Universal Interface Programmer
- •STK500 Programmer
- •Lawicel BootLoader
- •AVR ISP Programmer
- •USB-ISP Programmer
- •MCS Bootloader
- •Options Monitor
- •Options Printer
- •Window Cascade
- •Window Tile
- •Window Arrange Icons
- •Window Minimize All
- •Help About
- •Help Index
- •Help MCS Forum
- •Help MCS Shop
- •Help Support
- •Help Knowledge Base
- •Help Credits
- •BASCOM Editor Keys
- •Program Development Order
- •PlugIns
- •Font Editor
- •PinOut
- •BASCOM HARDWARE
- •Additional Hardware
- •AVR Internal Hardware
- •AVR Internal Registers
- •AVR Internal Hardware TIMER0
- •AVR Internal Hardware TIMER1
- •AVR Internal Hardware Watchdog timer
- •AVR Internal Hardware Port B
- •AVR Internal Hardware Port D
- •Adding XRAM
- •Attaching an LCD Display
- •Memory usage
- •Using the 1 WIRE protocol
- •Using the SPI protocol
- •Power Up
- •Chips
- •ATtiny22
- •ATtiny13
- •ATtiny15
- •ATtiny25
- •ATtiny45
- •ATtiny85
- •ATtiny26
- •ATtiny2313
- •ATMEGA8
- •ATMEGA16
- •ATMEGA32
- •ATMEGA48
- •ATMEGA88
- •ATMEGA168
- •ATMEGA64
- •ATMEGA103
- •ATMEGA128
- •ATMEGA161
- •ATMEGA162
- •ATMEGA163
- •ATMEGA165
- •ATMEGA169
- •ATMEGA323
- •ATMEGA603
- •ATMEGA8515
- •ATMEGA8535
- •BASCOM Language Fundamentals
- •Changes compared to BASCOM-8051
- •Language Fundamentals
- •Mixing ASM and BASIC
- •Assembler mnemonics
- •Reserved Words
- •Error Codes
- •Newbie problems
- •Tips and tricks
- •ASCII chart
- •BASCOM Language Reference
- •$BAUD
- •$BAUD1
- •$BOOT
- •$CRYSTAL
- •$DATA
- •$DEFAULT
- •$EEPLEAVE
- •$EEPROM
- •$EEPROMHEX
- •$EXTERNAL
- •$FRAMESIZE
- •$HWSTACK
- •$INCLUDE
- •$INITMICRO
- •$LCDPUTCTRL
- •$LCDPUTDATA
- •$LCDRS
- •$LCDVFO
- •$LOADER
- •$LOADERSIZE
- •$NOCOMP
- •$NOINIT
- •$NORAMCLEAR
- •$PROG
- •$PROGRAMMER
- •$REGFILE
- •$ROMSTART
- •$SERIALINPUT
- •$SERIALINPUT1
- •$SERIALINPUT2LCD
- •$SERIALOUTPUT
- •$SERIALOUTPUT1
- •$SWSTACK
- •$TIMEOUT
- •$TINY
- •$WAITSTATE
- •$XRAMSIZE
- •$XRAMSTART
- •1WIRECOUNT
- •1WRESET
- •1WREAD
- •1WSEARCHFIRST
- •1WSEARCHNEXT
- •1WVERIFY
- •1WWRITE
- •ACOS
- •ALIAS
- •ASIN
- •BASE64DEC
- •BASE64ENC
- •BAUD
- •BAUD1
- •BINVAL
- •BIN2GRAY
- •BITWAIT
- •BITS
- •BLOAD
- •BSAVE
- •BUFSPACE
- •BYVAL
- •CALL
- •CHECKSUM
- •CIRCLE
- •CLEAR
- •CLOCKDIVISION
- •CLOSE
- •CLOSESOCKET
- •CONFIG
- •CONFIG 1WIRE
- •CONFIG ACI
- •CONFIG ADC
- •CONFIG ATEMU
- •CONFIG BCCARD
- •CONFIG CLOCK
- •CONFIG CLOCKDIV
- •CONFIG COM1
- •CONFIG COM2
- •CONFIG COMx
- •CONFIG DATE
- •CONFIG DCF77
- •CONFIG DEBOUNCE
- •CONFIG I2CDELAY
- •CONFIG I2CSLAVE
- •CONFIG INPUT
- •CONFIG INTx
- •CONFIG GRAPHLCD
- •CONFIG KBD
- •CONFIG KEYBOARD
- •CONFIG LCD
- •CONFIG LCDBUS
- •CONFIG LCDMODE
- •CONFIG LCDPIN
- •CONFIG PORT
- •CONFIG PRINT
- •CONFIG PRINTBIN
- •CONFIG PS2EMU
- •CONFIG RC5
- •CONFIG SDA
- •CONFIG SCL
- •CONFIG SERIALIN
- •CONFIG SERIALIN1
- •CONFIG SERIALOUT
- •CONFIG SERIALOUT1
- •CONFIG SINGLE
- •CONFIG SPI
- •CONFIG SERVOS
- •CONFIG TCPIP
- •CONFIG TIMER0
- •CONFIG TIMER1
- •CONFIG TIMER2
- •CONFIG TWI
- •CONFIG TWISLAVE
- •CONFIG WAITSUART
- •CONFIG WATCHDOG
- •CONFIG X10
- •CONFIG XRAM
- •CONST
- •COSH
- •COUNTER0 and COUNTER1
- •CPEEK
- •CPEEKH
- •CRYSTAL
- •CURSOR
- •DATA
- •DAYOFWEEK
- •DAYOFYEAR
- •DATE$
- •DATE
- •DEBUG
- •DEBOUNCE
- •DECR
- •DECLARE FUNCTION
- •DECLARE SUB
- •DEFxxx
- •DEFLCDCHAR
- •DELAY
- •DISABLE
- •DISKFREE
- •DISKSIZE
- •DISPLAY
- •DO-LOOP
- •DriveCheck
- •DriveGetIdentity
- •DriveInit
- •DriveReset
- •DriveReadSector
- •DriveWriteSector
- •DTMFOUT
- •ECHO
- •ELSE
- •ENABLE
- •ENCODER
- •EXIT
- •FILEATTR
- •FILEDATE
- •FILEDATETIME
- •FILELEN
- •FILETIME
- •FLUSH
- •FORMAT
- •FOR-NEXT
- •FOURTHLINE
- •FRAC
- •FREEFILE
- •FUSING
- •GETADC
- •GETATKBD
- •GETATKBDRAW
- •GETDSTIP
- •GETDSTPORT
- •GETKBD
- •GETRC
- •GETRC5
- •GETTCPREGS
- •GETSOCKET
- •GLCDCMD
- •GLCDDATA
- •GOSUB
- •GOTO
- •GRAY2BIN
- •HEXVAL
- •HIGH
- •HIGHW
- •HOME
- •I2CINIT
- •I2CRECEIVE
- •I2CSEND
- •I2START,I2CSTOP, I2CRBYTE, I2CWBYTE
- •IDLE
- •IF-THEN-ELSE-END IF
- •INCR
- •INITFILESYSTEM
- •INITLCD
- •INKEY
- •INPUTBIN
- •INPUTHEX
- •INPUT
- •INSTR
- •ISCHARWAITING
- •KILL
- •LCASE
- •LCDAT
- •LCDCONTRAST
- •LEFT
- •LINE
- •LINE INPUT
- •LTRIM
- •LOAD
- •LOADADR
- •LOADLABEL
- •LOADWORDADR
- •LOCAL
- •LOCATE
- •LOOKDOWN
- •LOOKUP
- •LOOKUPSTR
- •LOWERLINE
- •MAKEBCD
- •MAKEINT
- •MAKEDEC
- •MAKETCP
- •MEMCOPY
- •NBITS
- •ON INTERRUPT
- •ON VALUE
- •OPEN
- •PEEK
- •POKE
- •POPALL
- •POWER
- •POWERDOWN
- •POWERSAVE
- •PRINTBIN
- •PSET
- •PS2MOUSEXY
- •PULSEIN
- •PULSEOUT
- •PUSHALL
- •RC5SEND
- •RC5SENDEXT
- •RC6SEND
- •READ
- •READEEPROM
- •READMAGCARD
- •RESET
- •RESTORE
- •RETURN
- •RIGHT
- •ROTATE
- •ROUND
- •RTRIM
- •SECELAPSED
- •SECOFDAY
- •SEEK
- •SELECT-CASE-END SELECT
- •SETFONT
- •SETTCP
- •SETTCPREGS
- •SENDSCAN
- •SENDSCANKBD
- •SERIN
- •SEROUT
- •SETIPPROTOCOL
- •SHIFT
- •SHIFTCURSOR
- •SHIFTIN
- •SHIFTOUT
- •SHIFTLCD
- •SHOWPIC
- •SHOWPICE
- •SINH
- •SOCKETCONNECT
- •SOCKETLISTEN
- •SOCKETSTAT
- •SONYSEND
- •SOUND
- •SPACE
- •SPIIN
- •SPIINIT
- •SPIMOVE
- •SPIOUT
- •SPLIT
- •START
- •STCHECK
- •STOP
- •STRING
- •SYSSEC
- •SYSSECELAPSED
- •SYSDAY
- •SWAP
- •TCPCHECKSUM
- •TCPREAD
- •TCPWRITE
- •TCPWRITESTR
- •TANH
- •THIRDLINE
- •TIME$
- •TIME
- •TOGGLE
- •TRIM
- •UCASE
- •UDPREAD
- •UDPWRITE
- •UDPWRITESTR
- •UPPERLINE
- •VARPTR
- •VERSION
- •WAIT
- •WAITKEY
- •WAITMS
- •WAITUS
- •WHILE-WEND
- •WRITE
- •WRITEEEPROM
- •X10DETECT
- •X10SEND
- •#IF ELSE ENDIF
- •International Resellers
- •International Resellers
- •ASM Libraries
- •EXTENDED I2C
- •MCSBYTE
- •MCSBYTEINT
- •TCPIP
- •LCD4BUSY
- •GLCD
- •GLCDSED
- •LCD-EPSON
- •AVR-DOS File System
- •CF Card
- •Compact FlashCard Driver
- •Elektor CF-Interface
- •XRAM CF-Interface for simulation
- •New CF-Card Drivers
- •Floating Point
- •FP_TRIG
- •DOUBLE
- •I2C SLAVE
- •I2CSLAVE
- •I2C TWI Slave
- •SPISLAVE
- •DATE TIME
- •EUROTIMEDATE
- •DATETIME
- •PS2-AT Mouse and Keyboard Emulation
- •AT_EMULATOR
- •PS2MOUSE_EMULATOR
- •BCCARD
- •BCCARD
- •BCDEF
- •BCCALL
- •BCRESET
- •Tools
- •LCD RGB-8 Converter

|
© MCS Electronics, 1995-2007 |
||
|
|
|
|
Data mode |
Select the mode in which the LCD is operating. In PIN mode, |
|
|
|
individual processor pins can be used to drive the LCD. In BUS |
|
|
|
mode, the external data bus is used to drive the LCD. |
|
|
LCD address |
In BUS mode you must specify which address will select the |
|
|
|
enable line of the LCD display. For the STK200, this is C000 = |
|
|
|
A14 + A15. |
|
|
RS address |
In BUS mode you must specify which address will select the RS |
|
|
|
line of the LCD display. For the STK200, this is 8000 =A15 |
|
|
Enable |
For PIN mode, you must select the processor pin that is |
|
|
|
connected to the enable line of the LCD display. |
|
|
RS |
For PIN mode, you must select the processor pin that is |
|
|
|
connected to the RS line of the LCD display. |
|
|
DB7-DB4 |
For PIN mode, you must select the processor pins that are |
|
|
|
connected to the upper four data lines of the LCD display. |
|
Make upper 3 bits high in Some displays require that for setting custom characters, the |
|
LCD designer |
upper 3 bits must be 1. Should not be used by default. |
It is advised to use the CONFIG LCD command. This way the settings are stored in your source code and not in the separate CFG file.
Options Communication
With this option, you can modify the communication settings for the terminal emulator.
Item |
Description |
Comport |
The communication port of your PC that you use for the terminal emulator. |
Baud rate |
The baud rate to use. |
Parity |
Parity, default None. |
page -69-

|
© MCS Electronics, 1995-2007 |
|
|
|
|
Data bits |
Number of data bits, default 8. |
|
Stop bits |
Number of stop bits, default 1. |
|
Handshake |
The handshake used, default is none. |
|
Emulation |
Emulation used, default BBS ANSI. |
|
Font |
Font type and color used by the emulator. |
|
Back color |
Background color of the terminal emulator. |
|
Note that the baud rate of the terminal emulator and the baud rate setting of thecompiler options, must be the same in order to work correctly.
The reason why you can specify them both to be different is that you can use the terminal emulator for other purposes too.
Options Environment
OPTION |
DESCRIPTION |
Auto Indent |
When you press return, the cursor is set to the next line at the current |
|
column position. |
Don't change |
When set, the reformat won't change the case of the line after you have |
case |
edited it. |
|
Default is that the text is reformatted so every word begins with upper |
|
case. |
Reformat BAS |
Reformat files when loading them into the editor. |
files |
All lines are reformatted so that multiple spaces are removed. |
|
This is only necessary when you are loading files that where created |
|
with another editor. Normally you won't need to set this option. |
|
|
page -70-

|
© MCS Electronics, 1995-2007 |
|
|
|
|
Reformat code |
Reformat code when entered in the editor. |
|
|
The reformat option will change the modified line. |
|
|
For example a = a + 1 will be changed into : a = a + 1 . When you |
|
|
forget a string end marker ", one will be added, and endif will be |
|
|
changed into End IF. |
|
Smart TAB |
When set, a TAB will place the cursor to the column where text starts on |
|
|
the previous line. |
|
Syntax |
This options highlights BASCOM statements in the editor. |
|
highlighting |
|
|
Show margin |
Shows a margin on the right side of the editor. |
|
Comment |
The position of the comment. Comment is positioned to the right of your |
|
|
source code. Exception if comment is first character of a line. |
|
TAB-size |
Number of spaces that are generated for a TAB. |
|
Key mapping |
Choose default, Classic, Brief or Epsilon. |
|
No reformat |
File extensions separated by a space that will not be reformatted when |
|
extension |
loaded. For example when DAT is entered, opening a DAT file can be |
|
|
done without that it is reformatted. |
|
Size of new |
When a new editor window is created you can select how it will be made. |
|
editor window |
Normal or Maximized (full window) |
|
Line Numbers |
Show line numbers in the margin. |
|
|
|
|
OPTION |
DESCRIPTION |
Background color |
The background color of the editor window. |
Keyword color |
The color of the reserved words. Default Navy. |
|
The keywords can be displayed in bold too. |
page -71-

|
© MCS Electronics, 1995-2007 |
|
|
|
|
Comment color |
The color of comment. Default green. |
|
|
Comment can be shown in Italic too. |
|
ASM color |
Color to use for ASM statements. Default purple. |
|
HW registers color |
The color to use for the hardware registers/ports. Default maroon. |
|
String color |
The color to use for string constants : "test" |
|
Variable color |
The color to use for variables. |
|
Editor font |
Click on this label to select another font for the editor window. |
|
OPTION |
DESCRIPTION |
Tool tips |
Show tool tips. |
File location |
Click to select a directory where your program files are stored. By |
|
default Windows will use the My Documents path. |
Use HTML Help |
HTML help or CHM Help is the preferred help file. Since HLP is not |
|
supported under Vista, it is advised to switch to CHM/HTML Help. |
|
With the UpdateWiz you can still download the HLP file. |
Code hints |
Select this option to enable code hints. You can get code hints |
|
after you have type a statement that is recognised as a valid |
|
statement or function. |
Hint Time |
The delay time in mS before a code hint will be shown. |
Hint Color |
The background color of the hints. |
Allow multiple |
Select this option when you want to run multiple instances of |
Instances |
BASCOM. When not enabled, running a second copy will terminate |
|
the first one. |
Autosave on compile |
The code is always saved when you compile. When you select this |
|
option, the code is saved under the same name. When this option |
|
is not selected, you will be prompted for a new filename. |
page -72-