Using the pin "number" was the first thing I tried because I saw them do it in the PBP manual. But when I implemented it I couldn't make any sense of how the "numbers corresponded to the actual ABCDE Ports. And for some 2 different "numbers" I can't remember which ones, would correspond to data coming out on the same pin.
Why is PORTB.O = "number" 0 ? Where is PORTA?
This is what is in my .bas file:
'************************************************* ***************
'* 16F877.BAS *
'* *
'* By : Leonard Zerman, Jeff Schmoyer *
'* Notice : Copyright (c) 1998 microEngineering Labs, Inc. *
'* All Rights Reserved *
'* Date : 10/23/98 *
'* Version : 2.11 *
'* Notes : *
'************************************************* ***************
BANK0 $0020, $007F
BANK1 $00A0, $00EF
BANK2 $0110, $016F
BANK3 $0190, $01EF
EEPROM $2100, $21FF
LIBRARY "PBPPIC14"
DEFINE CODE_SIZE 8
include "PIC14EXT.BAS"
PORTL VAR PORTB
PORTH VAR PORTC
TRISL VAR TRISB
TRISH VAR TRISC
include "PBPPIC14.RAM"
'*-----------------------* EOF 16F877.BAS *---------------------*
here is my .inc:
;************************************************* ***************
;* 16F877.INC *
;* *
;* By : Leonard Zerman, Jeff Schmoyer *
;* Notice : Copyright (c) 2003 microEngineering Labs, Inc. *
;* All Rights Reserved *
;* Date : 11/07/03 *
;* Version : 2.45 *
;* Notes : *
;************************************************* ***************
NOLIST
ifdef PM_USED
LIST
include 'M16F87x.INC' ; PM header
device pic16F877, xt_osc, wdt_on, pwrt_on, lvp_off, protect_off
XALL
NOLIST
else
LIST
LIST p = 16F877, r = dec, w = -302
INCLUDE "P16F877.INC" ; MPASM Header
__config _XT_OSC & _WDT_ON & _PWRTE_ON & _LVP_OFF & _CP_OFF
NOLIST
endif
LIST
Thanks for the reply!




Bookmarks