
Originally Posted by
financecatalyst
I am using PIC16F690.
I am wondering why when I use the following program:
"
intcon=0
cm1con0=0
cm2con0=0
ansel=0
anselh=0
trisc=0
portc=0
define OSC 4
option_reg = %00001000
main:
high portC.0
high portC.1
high portC.2
high portC.3
pause 1000
low portc.0
low portc.1
low portc.2
low portc.3
pause 1000
goto main
"
All leds connected to PORTC work as expected.
AND why they don't work when I use the following code:
"
intcon=0
cm1con0=0
cm2con0=0
ansel=0
anselh=0
trisc=0
portc=0
define OSC 4
option_reg = %00001000
main:
high portC
pause 1000
low portC
pause 1000
goto main
"
Can't tell you why, except <b>maybe </b>it's not supposed too, You CAN do this:
PortC = 255
pause 1000
PortC = 0
Put ADCON0 = 0 in to disable the A/D converters too
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Bookmarks