PDA

View Full Version : I do not not like 18F4320



Peter1960
- 7th December 2007, 10:11
' PIC Defines
' -----------

@ ERRORLEVEL -230

@ CONFIG WDT=OFF;FSCM=OFF;OSC=INTIO2

ADCON1 = $0F


Start:

High PortA.1

Pause 1000

Low PortA.1

Pause 1000

GoTo Start

I use

pbpw -p18f4320 sprcir18 -ampasmwin -v

Get a ton of warnings: 18 Errors: 1

Warning[220] c:\pbp\pbppic18.lib 918 : Address excees maximum range for this processor

Error[116] c:\pbp\pbppic18.mac 12 : Address label duplicated or different in second pass <_Start>

PBP 2.44, MPSAM v.5.06

rem statements in 18F4320.inc

aaarrrgggghhhh.... help please !

please show the simple solution as I am probably not seeing it again !

mister_e
- 7th December 2007, 19:01
you can't use the new config statement in your code, so you have 2 choice

1) paste this syntax in your .INC file
2) switch to the old __CONFIG syntax as stated in the FAQ and maybe still in the \MPASM Suite\YourDeviceName.INC

... i still prefer the old one..

Peter1960
- 8th December 2007, 01:26
Hi Mister e
I have finally got most of it sorted.
I used the line

PBPW -p18F4320 MyProgram -ampasmwin -v

and hey presto

@ ERRORLEVEL -230

@__CONFIG _CONFIG1H, _IESO_OFF_1H & _FSCM_OFF_1H & _RC_OSC_1H


ADCON1 = $0F
CMCON = $07


Start:

High PortA.1

Pause 1000

Low PortA.1

Pause 1000

GoTo Start

Work with only one warning 1 suppressed 1

[205] blah blah : found directive in column 1. <__CONFIG>

but I believe that will be ok.

Next... put it inot the chip and see.... will advice

mister_e
- 8th December 2007, 10:15
Yeah it will work, it's just another annoying warning message which could still be disable the same way as you did for 230 one.

the usual syntax??? just add few space between @ and __CONFIG, and it will stop to bother you.