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

© MCS Electronics, 1995-2007

WDR

 

Watchdog Reset

 

None

1

* ) Not available in base-line microcontrollers

 

 

 

The Assembler is not case sensitive.

The operands have the following forms:

Rd: R0-R31 or R16-R31 (depending on instruction) Rr: R0-R31

b: Constant (0-7) s: Constant (0-7)

P: Constant (0-31/63)

K: Constant (0-255)

k: Constant, value range depending on instruction. q: Constant (0-63)

Rdl: R24, R26, R28, R30. For ADIW and SBIW instructions

Reserved Words

The following table shows the reserved BASCOM statements or characters.

^

!

;

$BAUD , $BAUD1 , $BOOT , $CRYSTAL ,$DATA ,$DBG ,$DEFAULT , $END , $EEPROM , $EXTERNAL , $INCLUDE , $LCD , $LCDRS , $LCDPUTCTRL , $LCDPUTDATA , $LCDVFO , $LIB ,$MAP ,$REGFILE ,$SERIALINPUT ,$SERIALINPUT1, $SERIALINPUT2LCD , $SERIALOUTPUT , $SERIALOUTPUT1 ,

$TINY ,$WAITSTATE ,$XRAMSIZE , $XRAMSTART

1WRESET ,1WREAD ,1WWRITE

ACK ,ABS ,ALIAS ,AND ,ACOS ,AS , ASC , ASIN, AT , ATN, ATN2

BAUD, BCD , BIN , BIN2GRAY , BINVAL , BIT , BITWAIT , BLINK , BOOLEAN , BYTE , BYVAL

CALL , CAPTURE1 , CASE , CHECKSUM , CHR , CIRCLE , CLS , CLOSE , COMPARE1x , CONFIG

, CONST , COS , COSH , COUNTER , COUNTERx ,

CPEEK , CPEEKH , CRC8 , CRC16 , CRC32 , CRYSTAL , CURSOR

DATA, DATE$, DBG , DEBOUNCE , DECR , DECLARE , DEFBIT , DEFBYTE , DEFLNG , DEFWORD , DEG2RAD , DEGSNG , DEFLCDCHAR, DEFINT ,

DEFWORD , DELAY , DIM , DISABLE , DISKSIZE , DISKFREESIZE , DISPLAY , DO , DOUBLE, DOWNTO , DTMFOUT

ELSE, ELSEIF, ENABLE, END, EOF, ERAM, ERASE, ERR, EXIT, EXP, EXTERNAL, FIX, FLUSH, FOR, FOURTH, FOURTHLINE, FREEFILE, FUNCTION

GATE, GET, GETADC, GETKBD, GETATKBD , GETRC5, GLCDDATA , GLCDCMD, GOSUB, GOTO, GRAY2BIN

HEXVAL,HIGH, HOME

page -192-

© MCS Electronics, 1995-2007

I2CINIT, I2CRECEIVE, I2CSEND, I2CSTART, I2CSTOP, I2CRBYTE, I2CWBYTE, IDLE, IF , INCR , INKEY , INP , INPUT , INPUTBIN , INPUTHEX ,

INT, INT0, INT1, INTEGER, INTERNAL, INSTR, IS, ISCHARWAITING

LCASE, LCD, LCDAT, LEFT, LEFT, LEN, LINE, LOAD, LOADLABEL, LOC , LOF , LOCAL, LOCATE, LOG , LOG10 , LONG, LOOKUP, LOOKUPSTR,

LOOP, LTRIM, LOOKDOWN, LOW, LOWER, LOWERLINE

MAKEBCD, MAKEDEC, MAKEINT, MID, MIN, MAX, MOD, MODE

NACK, NEXT, NOBLINK, NOSAVE, NOT

OFF, ON, OR, OUT, OUTPUT

PEEK, POKE, PORTx, POWER, POWERDOWN, PRINT, PRINTBIN, PULSEOUT, PUT, PWM1x, RAD2DEG, RC5SEND, RC6SEND, READ, READEEPROM

REM, RESET, RESTORE, RETURN, RIGHT, RIGHT, ROTATE, ROUND, RTRIM

SEEK, SELECT, SERIAL, SET, SERIN , SEROUT, SETFONT, SGN, SHIFT, SHIFTLCD, SHIFTCURSOR,SHIFTIN , SHIFTOUT , SHOWPIC, SHOWPICE,

SIN, SINH , SONYSEND , SOUND , SPACE, SPC , SPIINIT , SPIIN, SPIMOVE , SPIOUT , START , STEP , STR , STRING , STOP , SUB , SWAP , SQR

TAN , TANH , THEN , TIME$ , THIRD , THIRDLINE , TIMERx , TO , TRIM

UCASE, UNTIL , UPPER , UPPERLINE

VAL, VARPTR

WAIT, WAITKEY, WAITMS , WAITUS , WATCHDOG , WRITEEEPROM , WEND , WHILE ,WORD

XOR, XRAM

Error Codes

The following table lists errors that can occur.

Error Description

1Unknown statement

2Unknown structure EXIT statement

3WHILE expected

4No more space for IRAM BIT

5No more space for BIT

6. expected in filename

7IF THEN expected

8BASIC source file not found

9Maximum 128 aliases allowed

10Unknown LCD type

11INPUT, OUTPUT, 0 or 1 expected

12Unknown CONFIG parameter

13CONST already specified

14Only IRAM bytes supported

15Wrong data type

page -193-

© MCS Electronics, 1995-2007

16Unknown Definition

179 parameters expected

18BIT only allowed with IRAM or SRAM

19STRING length expected (DIM S AS STRING * 12 ,for example)

20Unknown DATA TYPE

21Out of IRAM space

22Out of SRAM space

23Out of XRAM space

24Out of EPROM space

25Variable already dimensioned

26AS expected

27parameter expected

28IF THEN expected

29SELECT CASE expected

30BIT's are GLOBAL and can not be erased

31Invalid data type

32Variable not dimensioned

33GLOBAL variable can not be ERASED

34Invalid number of parameters

353 parameters expected

36THEN expected

37Invalid comparison operator

38Operation not possible on BITS

39FOR expected

40Variable can not be used with RESET

41Variable can not be used with SET

42Numeric parameter expected

43File not found

442 variables expected

45DO expected

46Assignment error

47UNTIL expected

50Value doesn't fit into INTEGER

51Value doesn't fit into WORD

52Value doesn't fit into LONG

60Duplicate label

61Label not found

62SUB or FUNCTION expected first

63Integer or Long expected for ABS()

64, expected

65device was not OPEN

66device already OPENED

68 channel expected

70BAUD rate not possible

71Different parameter type passed then declared

72Getclass error. This is an internal error.

73Printing this FUNCTION not yet supported

743 parameters expected

80 Code does not fit into target chip

page -194-

© MCS Electronics, 1995-2007

81Use HEX(var) instead of PRINTHEX

82Use HEX(var) instead of LCDHEX

85Unknown interrupt source

86Invalid parameter for TIMER configuration

87ALIAS already used

880 or 1 expected

89Out of range : must be 1-4

90Address out of bounds

91INPUT, OUTPUT, BINARY, or RANDOM expected

92LEFT or RIGHT expected

93Variable not dimensioned

94Too many bits specified

95Falling or rising expected for edge

96Prescale value must be 1,8,64,256 or 1024

97SUB or FUNCTION must be DECLARED first

98SET or RESET expected

99TYPE expected

100No array support for IRAM variables

101Can't find HW-register

102Error in internal routine

103= expected

104LoadReg error

105StoreBit error

106Unknown register

107LoadnumValue error

108Unknown directive in device file

109= expected in include file for .EQU

110Include file not found

111SUB or FUNCTION not DECLARED

112SUB/FUNCTION name expected

113SUB/FUNCTION already DECLARED

114LOCAL only allowed in SUB or FUNCTION

115#channel expected

116Invalid register file

117Unknown interrupt

200.DEF not found

201Low Pointer register expected

202.EQU not found, probably using functions that are not supported by the selected chip

203Error in LD or LDD statement

204Error in ST or STD statement

205} expected

206Library file not found

207Library file already registered

210Bit definition not found

211External routine not found

212LOW LEVEL, RISING or FALLING expected

213String expected for assignment

214Size of XRAM string 0

page -195-

 

© MCS Electronics, 1995-2007

 

 

 

215

Unknown ASM mnemonic

 

216

CONST not defined

 

217

No arrays allowed with BIT/BOOLEAN data type

 

218

Register must be in range from R16-R31

 

219

INT0-INT3 are always low level triggered in the MEGA

 

220

Forward jump out of range

 

221

Backward jump out of range

 

222

Illegal character

 

223

* expected

 

224

Index out of range

 

225

() may not be used with constants

 

226

Numeric of string constant expected

 

227

SRAM start greater than SRAM end

 

228

DATA line must be placed after the END statement

 

229

End Sub or End Function expected

 

230

You can not write to a PIN register

 

231

TO expected

 

232

Not supported for the selected micro

 

233

READ only works for normal DATA lines, not for EPROM data

 

234

') block comment expected first

 

235

'( block comment expected first

 

236

Value does not fit into byte

 

238

Variable is not dimensioned as an array

 

239

Invalid code sequence because of AVR hardware bug

 

240

END FUNCTION expected

 

241

END SUB expected

 

242

Source variable does not match the target variable

 

243

Bit index out of range for supplied data type

 

244

Do not use the Y pointer

 

245

No arrays supported with IRAM variable

 

246

No more room for .DEF definitions

 

247

. expected

 

248

BYVAL should be used in declaration

 

249

ISR already defined

 

250

GOSUB expected

 

251

Label must be named SECTIC

 

252

Integer or Word expected

 

253

ERAM variable can not be used

 

254

Variable expected

 

255

Z or Z+ expected

 

256

Single expected

 

257

"" expected

 

258

SRAM string expected

 

259

- not allowed for a byte

 

260

Value larger than string length

 

261

Array expected

 

262

ON or OFF expected

 

263

Array index out of range

 

264

Use ECHO OFF and ECHO ON instead

 

 

 

 

page -196-