; SX18.INC - Standard Header file for SX18 (Scenix 18 and 20-pin chips) ;;; 11/04/98 Chuck Glenn - Initial version ;;; 11/25/98 Chuck Glenn - modified OPTION keywords to be AND'd together ; "destination" for commands taking "d" as second parm W equ $00 F equ $01 ; special-function registers INDF equ $00 RTCC equ $01 PCL equ $02 STATUS equ $03 FSR equ $04 PORTA equ $05 PORTB equ $06 ; bit #s within the STATUS register PA2 equ $07 ; you really should use the BANK command instead... PA1 equ $06 ; you really should use the BANK command instead... PA0 equ $05 ; you really should use the BANK command instead... TO equ $04 PD equ $03 Z equ $02 DC equ $01 C equ $00 ; values within the OPTION register. AND them together as needed RTW equ $7F RTE_IE equ $BF RTS equ $DF RTE_ES equ $EF PSA equ $F7 PS2 equ $FB PS1 equ $FD PS0 equ $FE ; possible values for FUSE. OR them together as needed _TURBO_ON equ $000 _TURBO_OFF equ $800 _SYNC_ON equ $000 _SYNC_OFF equ $400 _OPTIONX_ENABLE equ $000 _OPTIONX_DISABLE equ $200 _STACKX_ENABLE equ $000 _STACKX_DISABLE equ $100 _IRC_ENABLE equ $000 _IRC_DISABLE equ $080 _IRC_4MHZ equ $000 _IRC_2MHZ equ $010 _IRC_1MHZ equ $020 _IRC_500KHZ equ $030 _IRC_250KHZ equ $040 _IRC_125KHZ equ $050 _IRC_62KHZ equ $060 _IRC_31KHZ equ $070 _CP_ON equ $000 _CP_OFF equ $008 _WDTE_DISABLE equ $000 _WDTE_ENABLE equ $004 _LP_OSC equ $000 _HS_OSC equ $001 _XT_OSC equ $002 _RC_OSC equ $003 ; possible values for the MODE command, to be followed in code by TRIS command CMP equ $08 WKPND equ $09 WKED equ $0A WKEN equ $0B ST equ $0C LVL equ $0D ; level selection PLP equ $0E ; pull-up enable DIR equ $0F ; direction (0 = output, 1 = input) ; default values for special registers -- specify again yourself to override FUSE equ $0FFF org FUSE mem _TURBO_ON | _SYNC_OFF | _OPTIONX_ENABLE | _STACKX_ENABLE | _IRC_ENABLE | _IRC_4MHZ | _CP_OFF | _WDTE_DISABLE ; put a nop at the "power on" memory location, so it will roll over to $0000; org here again to over-write org $07FF nop org 0