Compiling Error with 18F452


Results 1 to 3 of 3

Threaded View

  1. #1
    Join Date
    May 2008
    Posts
    19

    Default Compiling Error with 18F452

    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!
    Attached Images Attached Images  

Similar Threads

  1. problem with input and output (18F452)
    By turkuaz in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 17th March 2008, 23:21
  2. Pic 16 F877 to 18F452...?
    By turkuaz in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 31st October 2007, 15:54
  3. 18F452 compile problem
    By pcbb in forum General
    Replies: 1
    Last Post: - 21st April 2007, 02:16
  4. Replies: 5
    Last Post: - 16th February 2006, 23:43
  5. 18f452 tables in ram - code?
    By rshanks in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 1st October 2004, 05:06

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts