mikrobasic to picbasicpro


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    May 2006
    Posts
    27

    Question mikrobasic to picbasicpro

    hello
    I have find a code in mikrobasic, I would like to convert it into picbasicpro. mikrobasic uses subprocedure and subroutine, but not picbasicpro. how to convert this piece of code for example:

    '********************************
    sub procedure nju_addressY(dim adr as byte)
    dim y as byte
    ' drugi chip ima offset +20
    if bLcdDG = 1 then
    y = adr + 20
    else
    y = adr
    end if
    ' if adr >= 61 then
    ' y = y - 61 '// test cote : si partie droite => -61 (test dimensions: so right part = -61 )
    ' end if
    nju_putcmd(y and 0x7F) 'nju_putcmd(0x00 or (y and 0x7F) )
    end sub
    '********************************

  2. #2
    Join Date
    May 2006
    Posts
    27


    Did you find this post helpful? Yes | No

    Red face mikrobasic to picbasicpro

    sorry it s simple:

    nju_addressY:
    adr var byte
    y var byte
    ' drugi chip ima offset +20
    if bLcdDG = 1 then
    y = adr + 20
    else
    y = adr
    end if
    ' if adr >= 61 then
    ' y = y - 61 '// test cote : si partie droite => -61 (test dimensions: so right part = -61 )
    ' end if
    gosub nju_putcmd
    return

  3. #3
    Join Date
    May 2006
    Posts
    27


    Did you find this post helpful? Yes | No

    Default

    const chars as byte[15] = (
    0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x4F,0x00,0x00,
    0x00,0x7,0x00,0x7,0x00)

    how convert thid code to pbp?
    i think:
    chars var byte[15]
    and after how do for the table ???
    please

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    chars[0]=0
    chars[1]=0
    .
    .
    .
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. PIC-LCD3310 Pin Outs for PicBasic(pro)
    By douglas.mauro in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 13th March 2009, 07:17
  2. Proton+ and PicBasicpro
    By Rob Martin in forum mel PIC BASIC Pro
    Replies: 34
    Last Post: - 9th November 2007, 07:58
  3. 3x4 keypad picbasicpro
    By gkahraman82 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 29th May 2006, 21:49
  4. PICBASICPRO for linux/unix
    By Koraki in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 9th October 2005, 16:42
  5. PID control with Picbasicpro
    By swordman in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 6th August 2004, 14:37

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