Loading ...
Sorry, an error occurred while loading the content.
 

Re: help me!need help!

Expand Messages
  • special [k]
    ... Try the following code, it was posted earlier (search for long table ) and it works like a charm: function theLookup( byte in H, byte in L ) return byte
    Message 1 of 5 , May 1, 2004
      --- In jallist@yahoogroups.com, "vortech_intl" <vortech_intl@y...>
      wrote:
      > hi jallist!
      > i'm a newbie with jal but since i've been programming before in
      > pascal, i've come to like and appreciate more JAL.
      > i'm having a hard time and i'm stump with one prob. i can't access
      > data tables like the way i want it.

      Try the following code, it was posted earlier (search for "long
      table") and it works like a charm:

      function theLookup( byte in H, byte in L ) return byte is
      assembler
      local table_start
      hpage table_start
      bank H
      addwf H, w
      movwf PCLATH
      bank L
      movfw PCL
      addlw 5
      addwf L, w
      skpnc
      incf PCLATH, f
      movwf PCL
      table_start:
      -- retlw byte1
      -- retlw byte2
      -- retlw byte3
      -- ...
      end assembler
      end function

      -special [k]
    • vortech_intl
      sir i checked it out. is this library made for a 5x7 led matrix? where could i check if its compatible with my designed circuit.my circuit uses cd4017 decade
      Message 2 of 5 , May 2, 2004
        sir i checked it out. is this library made for a 5x7 led matrix? where
        could i check if its compatible with my designed circuit.my circuit
        uses cd4017 decade counter for col 1 to 5 and the pic drives the rows
        through a 74hc240 buffer. will this library be suited for this type of
        circuit?? its a lot to ask but can you provide me a link to someone
        who used this lib for his circuit so i could learn how to go about and
        use this lib. thanks a lot.more power to all jallist and to you as
        well sir.

        --- In jallist@yahoogroups.com, "Wouter van Ooijen" <wouter@v...> wrote:
        > check mdm_segs in the library
        >
        > > -----Original Message-----
        > > From: vortech_intl [mailto:vortech_intl@y...]
        > > Sent: Saturday, May 01, 2004 5:10 AM
        > > To: jallist@yahoogroups.com
        > > Subject: [jallist] help me!need help!
        > >
        > >
        > > hi jallist!
        > > i'm a newbie with jal but since i've been programming before in
        > > pascal, i've come to like and appreciate more JAL.
        > > i'm having a hard time and i'm stump with one prob. i can't access
        > > data tables like the way i want it.
        > >
        > > below is my prob.its a short program for my 5x7 led matrix.
        > > i can't get it to work.
        > > 1. #1 and #2 numbers are scanned correctly
        > > 2. after 1 and 2 it all goes down the drain. 3 losses its last column
        > > and the rest just makes no sense.it jumbles about.
        > > 3. i tried replacing each number code on the top of the table after
        > > addwf 2, f just to test each character if it displays correctly and
        > > all the code works fine, it displays the characters well.
        > > 4. help me figure my mistake in coding jal. i cant see it just yet.
        > > i want it to sequentially get the data from the table on the specific
        > > index i point to.
        > >
        > > thanks - vortech_intl
        > >
        > > include 16f84_4
        > > include jlib
        > >
        > > var byte index, var1, var2, delayx, delayval, x
        > > var bit clock is pin_a0
        > > var bit reset1 is pin_a1
        > > port_b_direction = all_output
        > > pin_a0_direction = output
        > > pin_a1_direction = output
        > > pin_a2_direction = input
        > > pin_a3_direction = input
        > > pin_a4_direction = input
        > > var volatile bit in1 is pin_a2
        > > var volatile bit in2 is pin_a3
        > > var volatile bit in3 is pin_a4
        > > reset1 = high
        > > delayval = 4
        > >
        > > procedure table is
        > > pragma jump_table
        > > assembler
        > > addwf 2, f
        > > Retlw 0
        > > Retlw 16
        > > Retlw 32
        > > Retlw 127
        > > Retlw 0
        > > retlw "1" -- 1
        > > Retlw 39
        > > Retlw 73
        > > Retlw 73
        > > Retlw 73
        > > Retlw 49
        > > retlw "2" -- 2
        > > Retlw 34
        > > Retlw 65
        > > Retlw 73
        > > Retlw 73
        > > Retlw 54
        > > retlw "3" -- 3
        > > Retlw 8
        > > Retlw 24
        > > Retlw 40
        > > Retlw 127
        > > Retlw 8
        > > retlw "4" -- 4
        > > Retlw 122
        > > Retlw 73
        > > Retlw 73
        > > Retlw 73
        > > Retlw 70
        > > retlw "5" -- 5
        > > Retlw 62
        > > Retlw 73
        > > Retlw 73
        > > Retlw 73
        > > Retlw 38
        > > retlw "6" -- 6
        > > Retlw 96
        > > Retlw 71
        > > Retlw 72
        > > Retlw 80
        > > Retlw 96
        > > retlw "7" -- 7
        > > Retlw 64
        > > Retlw 73
        > > Retlw 73
        > > Retlw 73
        > > Retlw 54
        > > retlw "8" -- 8
        > > Retlw 48
        > > Retlw 73
        > > Retlw 73
        > > Retlw 73
        > > Retlw 63
        > > retlw "9" -- 9
        > > Retlw 62
        > > Retlw 65
        > > Retlw 65
        > > Retlw 65
        > > Retlw 62
        > > retlw "0" -- 0
        > > end assembler
        > > end procedure
        > >
        > > procedure table_get( byte in index, byte out var2 ) is
        > > assembler
        > > bank movfw index
        > > andlw 0x0F
        > > page call table
        > > bank movwf var2
        > > end assembler
        > > end procedure
        > >
        > > procedure clkme is
        > > reset1 = low
        > > clock = high
        > > delay_1ms (delayx)
        > > clock = low
        > > delay_1ms (delayx)
        > > end procedure
        > >
        > > procedure init is
        > > reset1 = high
        > > clock = high
        > > end procedure
        > >
        > > procedure scan (byte in y) is begin
        > > var byte d, i = 0
        > > if y == "1" then i = 0
        > > if y == "2" then i = 6
        > > elsif y == "3" then i = 12 end if
        > >
        > > for 5 loop
        > > table_get(i, d)
        > > delayx = delayval
        > > if d != y then
        > > port_b = d
        > > clkme
        > > i = i + 1
        > > else return
        > > end if
        > > end loop
        > >
        > > init
        > > end procedure
        > >
        > > forever loop
        > > scan ("3")
        > > end loop
        > >
        > >
        > >
        > >
        > > ------------------------ Yahoo! Groups Sponsor
        > > ---------------------~-->
        > > Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
        > > Printer at MyInks.com. Free s/h on orders $50 or more to the
        > > US & Canada.
        > > http://www.c1tracking.com/l.asp?cid=5511
        > > http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/saFolB/TM
        > > --------------------------------------------------------------
        > > -------~->
        > >
        > >
        > > Yahoo! Groups Links
        > >
        > >
        > >
        > >
        > >
        > >
      • fun_4_me_now20012000
        ... where ... I think he meant to look at the source code and see how he did the table. Then use Wouters table method to modify yours. Good luck, Rick. ...
        Message 3 of 5 , May 2, 2004
          --- In jallist@yahoogroups.com, "vortech_intl" <vortech_intl@y...>
          wrote:
          > sir i checked it out. is this library made for a 5x7 led matrix?
          where
          > could i check if its compatible with my designed circuit.my circuit

          I think he meant to look at the source code and see how he did the
          table.

          Then use Wouters table method to modify yours.

          Good luck,
          Rick.


          > uses cd4017 decade counter for col 1 to 5 and the pic drives the
          rows
          > through a 74hc240 buffer. will this library be suited for this type
          of
          > circuit?? its a lot to ask but can you provide me a link to someone
          > who used this lib for his circuit so i could learn how to go about
          and
          > use this lib. thanks a lot.more power to all jallist and to you as
          > well sir.
          >
          > --- In jallist@yahoogroups.com, "Wouter van Ooijen" <wouter@v...>
          wrote:
          > > check mdm_segs in the library
          > >
          > > > -----Original Message-----
          > > > From: vortech_intl [mailto:vortech_intl@y...]
          > > > Sent: Saturday, May 01, 2004 5:10 AM
          > > > To: jallist@yahoogroups.com
          > > > Subject: [jallist] help me!need help!
          > > >
          > > >
          > > > hi jallist!
          > > > i'm a newbie with jal but since i've been programming before in
          > > > pascal, i've come to like and appreciate more JAL.
          > > > i'm having a hard time and i'm stump with one prob. i can't
          access
          > > > data tables like the way i want it.
          > > >
          > > > below is my prob.its a short program for my 5x7 led matrix.
          > > > i can't get it to work.
          > > > 1. #1 and #2 numbers are scanned correctly
          > > > 2. after 1 and 2 it all goes down the drain. 3 losses its last
          column
          > > > and the rest just makes no sense.it jumbles about.
          > > > 3. i tried replacing each number code on the top of the table
          after
          > > > addwf 2, f just to test each character if it displays correctly
          and
          > > > all the code works fine, it displays the characters well.
          > > > 4. help me figure my mistake in coding jal. i cant see it just
          yet.
          > > > i want it to sequentially get the data from the table on the
          specific
          > > > index i point to.
          > > >
          > > > thanks - vortech_intl
          > > >
          > > > include 16f84_4
          > > > include jlib
          > > >
          > > > var byte index, var1, var2, delayx, delayval, x
          > > > var bit clock is pin_a0
          > > > var bit reset1 is pin_a1
          > > > port_b_direction = all_output
          > > > pin_a0_direction = output
          > > > pin_a1_direction = output
          > > > pin_a2_direction = input
          > > > pin_a3_direction = input
          > > > pin_a4_direction = input
          > > > var volatile bit in1 is pin_a2
          > > > var volatile bit in2 is pin_a3
          > > > var volatile bit in3 is pin_a4
          > > > reset1 = high
          > > > delayval = 4
          > > >
          > > > procedure table is
          > > > pragma jump_table
          > > > assembler
          > > > addwf 2, f
          > > > Retlw 0
          > > > Retlw 16
          > > > Retlw 32
          > > > Retlw 127
          > > > Retlw 0
          > > > retlw "1" -- 1
          > > > Retlw 39
          > > > Retlw 73
          > > > Retlw 73
          > > > Retlw 73
          > > > Retlw 49
          > > > retlw "2" -- 2
          > > > Retlw 34
          > > > Retlw 65
          > > > Retlw 73
          > > > Retlw 73
          > > > Retlw 54
          > > > retlw "3" -- 3
          > > > Retlw 8
          > > > Retlw 24
          > > > Retlw 40
          > > > Retlw 127
          > > > Retlw 8
          > > > retlw "4" -- 4
          > > > Retlw 122
          > > > Retlw 73
          > > > Retlw 73
          > > > Retlw 73
          > > > Retlw 70
          > > > retlw "5" -- 5
          > > > Retlw 62
          > > > Retlw 73
          > > > Retlw 73
          > > > Retlw 73
          > > > Retlw 38
          > > > retlw "6" -- 6
          > > > Retlw 96
          > > > Retlw 71
          > > > Retlw 72
          > > > Retlw 80
          > > > Retlw 96
          > > > retlw "7" -- 7
          > > > Retlw 64
          > > > Retlw 73
          > > > Retlw 73
          > > > Retlw 73
          > > > Retlw 54
          > > > retlw "8" -- 8
          > > > Retlw 48
          > > > Retlw 73
          > > > Retlw 73
          > > > Retlw 73
          > > > Retlw 63
          > > > retlw "9" -- 9
          > > > Retlw 62
          > > > Retlw 65
          > > > Retlw 65
          > > > Retlw 65
          > > > Retlw 62
          > > > retlw "0" -- 0
          > > > end assembler
          > > > end procedure
          > > >
          > > > procedure table_get( byte in index, byte out var2 ) is
          > > > assembler
          > > > bank movfw index
          > > > andlw 0x0F
          > > > page call table
          > > > bank movwf var2
          > > > end assembler
          > > > end procedure
          > > >
          > > > procedure clkme is
          > > > reset1 = low
          > > > clock = high
          > > > delay_1ms (delayx)
          > > > clock = low
          > > > delay_1ms (delayx)
          > > > end procedure
          > > >
          > > > procedure init is
          > > > reset1 = high
          > > > clock = high
          > > > end procedure
          > > >
          > > > procedure scan (byte in y) is begin
          > > > var byte d, i = 0
          > > > if y == "1" then i = 0
          > > > if y == "2" then i = 6
          > > > elsif y == "3" then i = 12 end if
          > > >
          > > > for 5 loop
          > > > table_get(i, d)
          > > > delayx = delayval
          > > > if d != y then
          > > > port_b = d
          > > > clkme
          > > > i = i + 1
          > > > else return
          > > > end if
          > > > end loop
          > > >
          > > > init
          > > > end procedure
          > > >
          > > > forever loop
          > > > scan ("3")
          > > > end loop
          > > >
          > > >
          > > >
          > > >
          > > > ------------------------ Yahoo! Groups Sponsor
          > > > ---------------------~-->
          > > > Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or
          Lexmark
          > > > Printer at MyInks.com. Free s/h on orders $50 or more to the
          > > > US & Canada.
          > > > http://www.c1tracking.com/l.asp?cid=5511
          > > > http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/saFolB/TM
          > > > --------------------------------------------------------------
          > > > -------~->
          > > >
          > > >
          > > > Yahoo! Groups Links
          > > >
          > > >
          > > >
          > > >
          > > >
          > > >
        Your message has been successfully submitted and would be delivered to recipients shortly.