PDA

View Full Version : Compiling Error with 18F452



michel
- 1st July 2008, 04:39
Hi!

I'm using MicroCodeStudio Plus and PICbasic Pro. When compiling i get this ERROR; See JPG attach.

And here is the code....simple maths. (it is a part of another program)

' -----[ Initialization ]--------------------------------------------------
DEFINE OSC 4

TRISB = %00000000
TRISC = %11111111


' -----[ Variables ]-------------------------------------------------------

DelayTm VAR Byte
GEAR VAR Word
RPM VAR Word

NUMbr VAR Word
cntr VAR byte ' 4-bit counter variable
A VAR byte
B VAR byte
C VAR byte
D VAR byte
Dataavailable VAR word
Keypadvalue VAR word
circonf VAR Word
value VAR Word[2]
Diametre VAR Word
Dia VAR word[4]
indx VAR byte
x VAR byte
i VAR byte

NUMbr = 0
cntr = 0
Dataavailable = 0
Keypadvalue = 0
Diametre = 0
Dia = 0
i = 1
DelayTm = 0
A = 0
B = 0
C = 0
D = 0
' value1(0) = rpm / gear
' value1(1) = ((rpm // gear)* 10) / (gear/10)
' circonf = (804 */ dia_2)
' NUMbr = ((value1(0) * circonf)*100) + (value1(1) * circonf) + 70

' IF NUMbr DIG 0 >= 5 THEN NUMbr = NUMbr + 10




Main: '-----------------[ Main ]---------------------------------------

DelayTm = 500 'remettre a 50
GEAR = 800
RPM = 1456

Dia[3] = 4
Dia[2] = 8
Dia[0] = 3

Diametre = ((Dia[3]*100) + (Dia[2]*10) + Dia[0])
circonf = ((($0324 */ Diametre)/10)*10)+(($0324 */ Diametre)//10)
select case circonf dig 0
case is >= 5
circonf = (circonf + 10) / 10
case is < 5
circonf = circonf / 10
end select

value[0] = rpm / gear
value[1] = ((rpm // gear)* 10) / (gear/10)
NUMbr = (value[0] * circonf) + ((value[1] * circonf)/100)
'IF NUMbr DIG 0 >= 5 THEN NUMbr = NUMbr + 10





end

Tanks!

paul borgmeier
- 1st July 2008, 04:42
It's a Warning and not an Error

http://www.picbasic.co.uk/forum/showthread.php?t=555

http://www.picbasic.co.uk/forum/showthread.php?t=40

michel
- 1st July 2008, 05:10
So than, after compiling, can I program the PIC even if I get this warning....Will this cause any problem. Should I ignore it?

230 Collision in EEPROM @ Address

An attempt was made to generate more that one value for the specified
EEPROM location.



Tanks again!