Hi Seb,
Thanks for getting back to me . Where can I get a copy of this file?

Regards

Clive



From: Sebastien Lelong 
Sent: Thursday, January 13, 2011 1:09 PM
To: [email protected] 
Subject: Re: [jallib] pin indexing


Hi, 


If I understand correctly, you may want to have a look at pintools.jal library: 
http://jallib.googlecode.com/svn/trunk/doc/html/pintools.html and related 
sample (see at the bottom of the page).


This is how I map a number with a given pin on jaluino board: 
http://code.google.com/p/jaluino/source/browse/trunk/lib/jaluino_medium_pinmap.jal




HTH
Cheers
Seb


2011/1/13 speedy23 <[email protected]>

  HI,
  I have a need to read sequential port pins (similar to a multiplexer)
  and output this logic level to a specific pin (C5), while outputting
  this index number to a separate port i.e. output a number 0 to 15(bits
  0 to 4). The problem is how to index the port pin to be read from as
  JAL complains about pin_a(i) (where i is the index number).

  Any help on this problem would be greatly appreciated

  I have included my code below
  include 16f887                  -- target PICmicro
  --
  -- This program assumes the internal oscillator
  -- is running at a frequency of 8 MHz.
  pragma target clock 8_000_000     -- oscillator frequency
  -- configuration memory settings (fuses)
  pragma target OSC  INTOSC_NOCLKOUT              --Int Osc no output
  OSCCON_IRCF = 0b_110                -- Postscaler runs at 4Mhz
  --pragma target OSC  HS              -- HS crystal or resonator
  pragma target WDT  disabled        -- no watchdog
  pragma target LVP  disabled        -- no Low Voltage Programming
  pragma target MCLR internal        -- reset inxternally
  --
  enable_digital_io()                -- make all pins digital I/O

  alias   Data   is pin_C5



  -- Specify the pin direction (i/p or o/p):
  portA_direction = all_input
  portB_direction = all_input
  portC_direction = all_output
   --
  --Define Variables
  var byte i
   --

  forever loop
  i=0
  PortC = 0
   while i <= 15 loop
   if i <= 7 then
   Data = pin_A(i)
   else Data = pin_B(i-8)
   end if
   portC = i
   i = i + 1
   end loop

  end loop

  --
  You received this message because you are subscribed to the Google Groups 
"jallib" group.
  To post to this group, send email to [email protected].
  To unsubscribe from this group, send email to 
[email protected].
  For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en.





-- 
Sébastien Lelong
http://www.sirloon.net
http://sirbot.org


-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en.

Reply via email to