try ADCON1=%11100010
try ADCON1=%11100010
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
i tried this it worked !
deneme var byte
ADCON1=0
trisa.5=1
CMCON=7
basla:
LCDOUT $FE,1
adcin 4,deneme
LCDOUT $fe,2,#deneme," "
pause 3000
goto basla
after that i tried this it didnt work
values is getting smaller now..
its so weird
bilgi var byte
red var byte
green var byte
blue var byte
ADCON1=0
trisa.5=1
trisa.1=1
trisa.2=1
trisa.3=1
trisa.0=1
CMCON=7
TRISB=0
PORTB=0
TRISC=0
TRISD=0
LCDOUT $FE,1
yap:
high PORTD.7
PAUSE 750
ADCIN 5,bilgi
red=bilgi
pause 5
low PORTD.7
high PORTD.6
PAUSE 750
ADCIN 5,bilgi
blue=bilgi
pause 5
low PORTD.6
high PORTD.5
PAUSE 750
ADCIN 5,bilgi
green=bilgi
pause 5
low PORTD.5
CALL GOSTER
pause 7000
goto yap
GOSTER:
LCDOUT $fe,2,#red," ",#blue," ",#green," "
Where am i wrong this final code???
In the first you have ADCIN 4, the second you have ADCIN 5.
What is your analog source? Any available schematic ?
You want to use GOSUB instead of CALL. don't forget the RETURN as well.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
sorry. i put code there imcomplete.there is a "return" at the end.i saw this picture .there is RA5 after RA3.thats why i used porta.5.do you have any idea why did it work with first code and didnt with second???
![]()
I saw and I experience that my friend's a pin of pic16f877 was not working. Only one pin was not workingothers are works well may be u should change your pic
so weird![]()
Electrical & Electronic Engineering
Undergraduate Student
when my friend changed his MCU hic circuit worked well.
I was shocked when I saw it
Electrical & Electronic Engineering
Undergraduate Student
Bookmarks