<<Previous

Next>>

Appendix B

Defines

DEFINE ADC_BITS

8

'Number of bits in ADCIN result

DEFINE ADC_CLOCK

3

'ADC clock source (rc = 3)

DEFINE ADC_SAMPLEUS

50

'ADC sampling time in microseconds

DEFINE BUTTON_PAUSE

10

'Button debounce delay in ms

DEFINE CCP1_REG

PORTC

'Hpwm 1 pin port

DEFINE CCP1_BIT

2

'Hpwm 1 pin bit

DEFINE CCP2_REG

PORTC

'Hpwm 2 pin port

DEFINE CCP2_BIT

1

'Hpwm 2 pin bit

DEFINE CHAR_PACING

1000

'Serout character pacing in us

DEFINE DEBUG_REG

PORTB

'Debug pin port

DEFINE DEBUG_BIT

0

'Debug pin bit

DEFINE DEBUG_BAUD

2400

'Debug baud rate

DEFINE DEBUG_MODE

1

'Debug mode: 0 = True, 1 = Inverted

DEFINE DEBUG_PACING

1000

'Debug character pacing in us

DEFINE DEBUGIN_REG

PORTB

'Debugin pin port

DEFINE DEBUGIN_BIT

0

'Debugin pin bit

DEFINE DEBUGIN_MODE

1

'Debugin mode: 0 = True, 1 = Inverted

DEFINE HPWM2_TMR

1

'Hpwm 2 timer select

DEFINE HPWM3_TMR

1

'Hpwm 3 timer select

DEFINE HSER_BAUD

2400

'Hser baud rate

DEFINE HSER_CLROERR

1

'Hser clear overflow automatically

DEFINE HSER_SPBRG

25

'Hser spbrg init

DEFINE HSER_RCSTA

90h

'Hser receive status init

DEFINE HSER_TXSTA

20h

'Hser transmit status init

DEFINE HSER_EVEN

1

'Use only if even parity desired

DEFINE HSER_ODD

1

'Use only if odd parity desired

DEFINE I2C_HOLD

1

'Pause I2C transmission while clock held low

DEFINE I2C_INTERNAL

1

'Use for internal EEPROM on 16CExxx and 12CExxx

DEFINE I2C_SCLOUT

1

'Set serial clock to bipolar instead of open-collector

DEFINE I2C_SLOW

1

'Use for >8MHz OSC with standard speed devices

DEFINE I2C_SDA

PORTA,0

'Data pin for I2C (12-bit core only)

DEFINE I2C_SCL

PORTA,1

'Clock pin for I2C (12-bit core only)

DEFINE LCD_DREG

PORTA

'LCD data port

DEFINE LCD_DBIT

0

'LCD data starting bit 0 or 4

DEFINE LCD_RSREG

PORTA

'LCD register select port

DEFINE LCD_RSBIT

4

'LCD register select bit

DEFINE LCD_EREG

PORTB

'LCD enable port

DEFINE LCD_EBIT

3

'LCD enable bit

DEFINE LCD_RWREG

PORTE

'LCD read/write port

DEFINE LCD_RWBIT

2

'LCD read/write bit

DEFINE LCD_BITS

4

'LCD bus size 4 or 8

DEFINE LCD_LINES

2

'Number lines on LCD

DEFINE LCD_COMMANDUS

2000

'Command delay time in us

DEFINE LCD_DATAUS

50

'Data delay time in us

DEFINE LOADER_USED

1

'meLoader Used

DEFINE NO_CLRWDT

1

'Forces manual use of CLRWDT

DEFINE ONINT_USED

1

'Serves as LOADER_USED for versions fore 2.33

DEFINE PULSIN_MAX

1000

'Maximum counts allowed before pulsin times out

DEFINE OSC

4

'Oscillator speed in MHz: 3(3.58) 4 8 10 12 16 20 24 25 32 33 40

DEFINE OSCCAL_1K

1

'Set OSCCAL for PIC12C671/CE673

DEFINE OSCCAL_2K

1

'Set OSCCAL for PIC12C672/CE674

DEFINE SER2_BITS

8

'Set number of data bits for Serin2 and Serout2

DEFINE SER2_ODD

1

'Use odd parity instead of even parity

DEFINE SHIFT_PAUSEUS

50

'Slow down the Shiftin and Shiftout clock

DEFINE USE_LFSR

1

'Use 18Cxxx LFSR instruction

DEFINE XINXLAT_OFF

1

'Don’t translate Xin commands to BS2 format

DEFINE XOUTXLAT_OFF

1

'Don’t translate Xout commands to BS2 format

 

<<Previous

Next>>