Hello Melanie.
As you suggested, I went to the microchip homepage and clicked QUICKLINKS then Development Software and downloaded the 38 Mbyte zip file of MPLAB IDE ver 7.22 which I believe to be the latest version. MPLAB includes MPASM.
I unzipped this into a directory C:\MPASM. From that directory I clicked MPLAB_v722.exe and let it install the full MPLAB system to the default directory C:\program files\microchip\etc.
I then loaded MicroCode Studio Plus, (ver 2.2.1.1) and clicked view\Compile & Programme Options then made MPASM as the default compiler. MPASM was found automatically.
I am running PBP ver 2.46 and have an incomplete, but running, program of 370 lines. The target processor is a PIC16F877 and I am using the MCSP Bootloader to program the chip. This compiles under PBP/PM to 2715 words with no errors. The first few lines of this program are attached.
Under PBP/PM, the following configuration line is active.
@ Device pic16F877, HS_OSC, BOD_OFF, PWRT_ON, WDT_ON, PROTECT_OFF
To suit MPASM, I changed this to
@ _config_HS_OSC &_BOD_OFF &_PWRT_ON &_WDT_ON &_PROTECT_OFF
I get 1259 errors when I try to compile under MPASM, zero errors under PBP/PM.
CHeers
Brian
Here is the start of the program. This snippet does compile under PBP/PM but not under MPASM.
data @0, "DeckUnit v5.00 BDT 3 NOV 05 "
data @30, 01, $E0, $15, 200, 50 ' ID, Fcntr.lo, Fcntr.hi, Fdev, bitrate
data @35, 0, 5, 12, 48 ' MasterSlave, matches, syncbits, repeats
data @39, 0, 60 ' TxPower, sleeptime
'************************************************* ********
'* Name : DeckUnit500.PBP *
'* : *
'************************************************* ********
DEFINE OSC 20
DEFINE loader_used 1
DEFINE CHAR_PACING 1000
DEFINE LCD_DREG PORTD
DEFINE LCD_DBIT 0
DEFINE LCD_RSREG PORTD
DEFINE LCD_RSBIT 5
DEFINE LCD_EREG PORTD
DEFINE LCD_EBIT 4
DEFINE LCD_BITS 4
DEFINE LCD_LINES 2
DEFINE LCD_COMMANDUS 2000
DEFINE LCD_DATAUS 500
@ Device pic16F877, HS_OSC, BOD_OFF, PWRT_ON, WDT_ON, PROTECT_OFF
'@ _config_HS_OSC &_BOD_OFF &_PWRT_ON &_WDT_ON &_PROTECT_OFF
trisa = %11111111
trisb = %11111111
trisc = %10011111
trisd = %00000000
trise = %00000000
OPTION_REG = %10001111 ' no pullups, prescaler to WDT /128
'***************** Hardware definition **********************
DiagLED var porta.0 ' Olimex standard LED
GoLED var portc.5 ' pin 24 on '877
'******************* Software variables **********************
A var byte
B var byte
'*************************** Initialise ********************************
Startup:
Initialise:
OPTION_REG = %00001111 ' no pullups, prescaler to WDT /128
INTCON = %00000000
PIE1 = %00110000
PIE2 = %00000000 ' guessing here
ADCON1 = %00000111
TRISE = %00000000
CCP1CON = %00000000
TestLED:
for a = 0 to 9
high goled
high diagled
pause 100
low goled
low diagled
pause 100
next a
trisa = %11111111
Bookmarks