PDA

View Full Version : PBP 2.60 upgrade and 18F4550



Mike2545
- 30th November 2010, 02:52
I just got the upgrade 2.60 and found the "AllDigital.pbp" include on another thread...works great!

I still am concerned about an error I get

Error[113] c:\pbp\18f4550.inc 21 : Symbol not previously defined (_FCMEN_OFF_1H)
Here is a simple code

' Example program to blink an LED connected to PORTB.0 about
' once a second

INCLUDE "modedefs.bas"
include "ALLDIGITAL.pbp"

OSCCON =$60'72 'clock speed

DEFINE OSC 4
LED VAR PORTB.0 ' Assign name "LED" to PORTB.0

mainloop:
High LED ' Turn on LED connected to PORTB.0
Pause 500 ' Delay for .5 seconds

Low LED ' Turn off LED connected to PORTB.0
Pause 500 ' Delay for .5 seconds

Goto mainloop ' Go back to loop and blink LED forever

End

mackrackit
- 30th November 2010, 03:22
I can not reproduce your error here. My guess is when you changed the *.inc to use the internal OSC something else got changed?

Post the configs .

Darrel Taylor
- 30th November 2010, 03:38
Several years ago, Microchip had erroneously called that bit _FCMEM_OFF_1H.
I think mister-e pointed it out to me.

You could ...

Rename your config bit to that.
The bit is in your c:\pbp\18F4550.INC file
 
Correct the misspelled bit in Microchip's c:\program files\microchip\mpasm suite\P18F4550.inc file.
 
Update MPLAB and it should go away.
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en019469&part=SW007002


If someone has a PBP version prior to 2.60 ...
Use this one instead ... (MPLAB V8.15a)
http://melabs.com/support/mplab_old_versions.htm

Mike2545
- 30th November 2010, 23:08
Several years ago, Microchip had erroneously called that bit _FCMEM_OFF_1H.
I think mister-e pointed it out to me.

You could ...

Rename your config bit to that.
The bit is in your c:\pbp\18F4550.INC file
 
Correct the misspelled bit in Microchip's c:\program files\microchip\mpasm suite\P18F4550.inc file.
 
Update MPLAB and it should go away.
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en019469&part=SW007002


If someone has a PBP version prior to 2.60 ...
Use this one instead ... (MPLAB V8.15a)
http://melabs.com/support/mplab_old_versions.htm

Ok...But rename it _FCMEM_OFF_1H. with an M or N?

Mike2545
- 30th November 2010, 23:27
I can not reproduce your error here. My guess is when you changed the *.inc to use the internal OSC something else got changed?

Post the configs .


;************************************************* ***************
;* 18F4550.INC *
;* *
;* By : Leonard Zerman, Jeff Schmoyer *
;* Notice : Copyright (c) 2009 microEngineering Labs, Inc. *
;* All Rights Reserved *
;* Date : 03/20/09 *
;* Version : 2.60 *
;* Notes : *
;************************************************* ***************
NOLIST
ifdef PM_USED
LIST
"Error: PM does not support this device. Use MPASM."
NOLIST
else
LIST
LIST p = 18F4550, r = dec, w = -311, w = -230, f = inhx32
INCLUDE "P18F4550.INC" ; MPASM Header
__CONFIG _CONFIG1L, _PLLDIV_5_1L & _CPUDIV_OSC1_PLL2_1L & _USBDIV_2_1L
__CONFIG _CONFIG1H, _FOSC_HSPLL_HS_1H & _FCMEN_OFF_1H & _IESO_OFF_1H
__CONFIG _CONFIG2L, _PWRT_OFF_2L & _BOR_ON_2L & _BORV_3_2L & _VREGEN_ON_2L
__CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_512_2H
__CONFIG _CONFIG3H, _CCP2MX_ON_3H & _PBADEN_OFF_3H & _LPT1OSC_OFF_3H & _MCLRE_ON_3H
__CONFIG _CONFIG4L, _STVREN_ON_4L & _LVP_OFF_4L & _ICPRT_OFF_4L & _XINST_OFF_4L
NOLIST
endif
LIST
EEPROM_START EQU 0F00000h
BLOCK_SIZE EQU 32

Mike2545
- 30th November 2010, 23:34
Ok I changed them all to _FCMEN.

Now my led does not blink anymore...but the error is gone!

mackrackit
- 1st December 2010, 00:29
Ok I changed them all to _FCMEN.
That is what you had ??

Error[113] c:\pbp\18f4550.inc 21 : Symbol not previously defined (_FCMEN_OFF_1H)


Now my led does not blink anymore...but the error is gone!
You code appears that you want to use the internal OSC but the configs show an external.

Try this
_FOSC_INTOSC_HS_1H
in place of
_FOSC_HSPLL_HS_1H

You can go to the MPASM Suite in program files\microchip, look at the *.inc file there to see all of the config options. Do not modify that file.

Mike2545
- 1st December 2010, 01:41
You code appears that you want to use the internal OSC but the configs show an external.

Try this
_FOSC_INTOSC_HS_1H
in place of
_FOSC_HSPLL_HS_1H

You can go to the MPASM Suite in program files\microchip, look at the *.inc file there to see all of the config options. Do not modify that file.

Thank a bunch...I changed the MPASM file back to FCMEM and made the PBP .INC to match, also set it to the internal OSC as you showed.:)

mackrackit
- 1st December 2010, 02:02
Are you up and running now?

Mike2545
- 1st December 2010, 02:58
Are you up and running now?

Yes, I am...I also put in _FOSC_INTOSCIO_EC_1H so I can use PortA.6 as a digital I/O

mackrackit
- 1st December 2010, 03:30
Cool!!! :D