JU Bat Blinker Development Docs: def_16628.inc

Gadget Sourcecode: def_16628.inc

; Justice Unlimited Gadget Microcode
; (C) 2004 Acorn Pooley 
;
; def_16628.inc
;
;@DOC@ Definitions for PIC 16F628
;

    list    p=pic16f628
    include <p16f628.inc>


;############################################
;############### SPR BITS ###################
;############################################

#define b_por       PCON,POR

#define b_gie       INTCON,GIE          ; bank0
#define b_peie      INTCON,PEIE         ; bank0
#define b_inte      INTCON,INTE         ; bank0
#define b_rbie      INTCON,RBIE         ; bank0
#define b_intf      INTCON,INTF         ; bank0
#define b_rbif      INTCON,RBIF         ; bank0

#define b_rbpu      OPTION_REG,RBPU     ; bank1/3
#define b_intedg    OPTION_REG,INTEDG   ; bank1/3

    ;
    ; STATUS
    ;
#define b_rp0       STATUS,RP0          ; any bank
#define b_rp1       STATUS,RP1          ; any bank

    ;
    ; timer0
    ;
#define b_t0cs      OPTION_REG,T0CS     ; bank1 
#define b_t0se      OPTION_REG,T0SE     ; bank1         
#define b_t0psa     OPTION_REG,PSA      ; bank1         
#define b_t0ps2     OPTION_REG,PS2      ; bank1         
#define b_t0ps1     OPTION_REG,PS1      ; bank1         
#define b_t0ps0     OPTION_REG,PS0      ; bank1         
#define b_t0if      INTCON,T0IF         ; bank0
#define b_t0ie      INTCON,T0IE         ; bank0


    ;
    ; timer1
    ;
#define b_t1ckps1   T1CON,T1CKPS1       ; bank0
#define b_t1ckps0   T1CON,T1CKPS0       ; bank0
#define b_t1oscen   T1CON,T1OSCEN       ; bank0
#define b_t1sync    T1CON,T1SYNC        ; bank0
#define b_t1cs      T1CON,TMR1CS        ; bank0
#define b_t1on      T1CON,TMR1ON        ; bank0
#define b_t1ie      PIE1,TMR1IE         ; bank1
#define b_t1if      PIR1,TMR1IF         ; bank0

    ;
    ; timer2
    ;
#define b_t2outps3  T2CON,TOUTPS3       ; bank0
#define b_t2outps2  T2CON,TOUTPS2       ; bank0
#define b_t2outps1  T2CON,TOUTPS1       ; bank0
#define b_t2outps0  T2CON,TOUTPS0       ; bank0
#define b_t2ckps1   T2CON,T2CKPS1       ; bank0
#define b_t2ckps0   T2CON,T2CKPS0       ; bank0
#define b_t2on      T2CON,TMR2ON        ; bank0
#define b_t2if      PIR1,TMR2IF         ; bank0
#define b_t2ie      PIE1,TMR2IE         ; bank1




This file Copyright (C) 2004 by Nathan (Acorn) Pooley
Go to Bat Blinker Development page
Go to Bat Blinker page
Go to JU Gadgets page
Go to Justice Unlimited homepage
Go to Acorn's personal webpage
Contact Acorn
See comments from others
Post your own comments
File created by do_doc at Wed Aug 4 21:07:02 2004