PUSH BUTTON / SWITCH INTERFACING WITH DSPIC30F2010 USING MIKRO C

Photo of author

By Jackson Taylor

Home » Topic » Dspic » PUSH BUTTON / SWITCH INTERFACING WITH DSPIC30F2010 USING MIKRO C
YouTube video

program BLINK
dim LEDRED as sbit at LATE1_bit
dim switch1 as sbit at RD1_bit
main:
TRISD.1 = 1
TRISE.1=0
while TRUE
if (switch1 and 1)=0 then    'pull up required in this pin
LEDRED=1
else
LEDRED=0
end if
wend
end.
See also
Composite Energy Storage System with Photovoltaic Power Generation and UPS Function

Revive Your Dead Electronics

Got a drawer full of dead gadgets or a failing car battery? Instead of paying a premium for replacements, use this simple trick to easily recondition them right from home.

See How It Works