Re: Digital touch Screen Combination lock
lesson 3 {i will leave off the config section its unchanged}
try this with latc initiaised with 1 2 or 3 and pins c0 and c1 grounded
the leds always reflect the initial state of latc , and in no way reflect the logical state of portc pins why?
Code:
ANSELC = 0
ANSELA = 0
DEFINE OSC 64
OSCCON = $70
OSCTUNE.6 = 1
TRISA = %11111100
led1 var lata.0
led2 var lata.1
loopy:
latc=0 ;init latc try 1 2 3
led2 = latc.1
led1 = latc.0
pause 3000
goto loopy
ps don't make grounded pin outputs
Last edited by richard; - 17th August 2020 at 14:11.
Warning I'm not a teacher
Bookmarks