Not sure whether its a compiler or library issue, 3pins a1,a2,a3 not
becoming input in spite of enable_digital_io in the following code.

include 16f886                   -- target PICmicro
--
pragma target OSC HS
pragma target clock 20_000_000
pragma target WDT  disabled
pragma target MCLR internal
pragma target BROWNOUT enabled;
pragma target LVP       disabled
pragma target debug     disabled

--
enable_digital_io()                -- disable analog I/O (if any)
; a1,a2,a3 not becoming digital  ??

include delay


PORTA_low_direction = input ; doesn't seem to initialize the port as i/p
;PORTA_direction = input ; doesn't seem to initialize the port as i/p

PORTB_direction = output
;pin_a0_direction = input ; assigning individual pins do work
;pin_a1_direction = input
;pin_a2_direction = input
;pin_a3_direction = input


pin_b0_direction = input
alias STROBE is pin_b0

alias OFFHOOK   is pin_c3
pin_c3_direction = output
OFFHOOK = low

alias RING is pin_c2
pin_c2_direction = input

alias LED is pin_c1
pin_c1_direction = output
for 3 loop
LED = high
delay_100ms(3)
LED = low
delay_100ms(3)
end loop


var byte char

forever loop

LED = strobe
if strobe then
   portb = porta
end if

end loop

Tried with jalv2 compiler p and q
Device file revision -- 3167
No compiler optimizations enabled

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


Reply via email to