Other directives

The built-in #defines are used to support the #IFDEF command set are as follows. The table also shows which #defines are supported as string in HSerPrint, SerPrint and other string related commands.

Directive Description Output Usage Returns

ChipADC

String

#IFDEF & Output commands

The number of A/D inputs on the current chip

ChipEEprom

Number

#IFDEF & Output commands

The number of Bytes in EEPROM memmory

ChipIO

String

#IFDEF & Output commands

The number of general purpose IO pins

ChipMHz

String

#IFDEF & Output commands

The microcontroller clock speed

ChipName

Number

#IFDEF Only

The microcontroller type

ChipNameStr

String

#IFDEF & Output commands

The microcontroller name

ChipPins

Number

#IFDEF & Output commands

The number of microcontroller pins.

ChipRam

Number

#IFDEF & Output commands

The RAM size

ChipFamily

Number

#IFDEF & Output commands

See the table below

ChipWords

Number

#IFDEF & Output commands

The number of WORDS in Flash memmory

Var()

Function

Not applicable

True if a register is declared (or false if not declared) in the currently specficied microcontroller’s .dat file.

Var(register_name)

NoVar()

Function

Not applicable

True if a register is NOT declared (or false if declared) in the currently specficied microcontroller’s .dat file.

NoVar(register_name)

Bit()

Function

Not applicable

True if a bit is declared (or false if not declared) in the currently specficied microcontroller’s .dat file.

Bit(bit_name)

NoBit()

Function

Not applicable

True if a bit is NOT declared (or false if declared) in the currently specficied microcontroller’s .dat file.

NoBit(bit_name)

Allof()

Function

Not applicable

True if all defines are declared:

AllOf(define1, define2, …)

OneOf()

Function

Not applicable

True if one of the defines is declared:

OneOf(define1, define2, …)



All entries stated in the [ChipData] section of a specific microcontroller data files are added to program as constants. These entries have Chip added to the entry - so Pins=28 in the specific microcontroller data data file creates a constant with the name ChipPins and the value 28 in the user program.



This table shows the ChipFamily constants mapped to the microcontroller architecture.

ChipFamily Value Microcontroller Characteristics

100

AVR core version V0E class microcontrollers

110

AVR core version V1E class microcontrollers

120

AVR core version V2E class microcontrollers

130

AVR core version V3E class microcontrollers but essentially the mega32u6 only

12

Baseline devices. 12 Bit instruction set

15

Mid-range core devices. 14 Bit instruction set with enhanced instruction set class

15 plus familyVariant=1

Mid-range core devices. 14 Bit instruction set with enhanced instruction set and with large memory capability class

16

High end core devices. 16 Bit instruction set, memory addressing architecture and an extended instruction set.