pic16f1829 not work

General discussion on mikroBasic PRO for PIC.
Post Reply
Author
Message
smxmarco
Posts: 23
Joined: 01 Jul 2014 14:25
Location: Italy

pic16f1829 not work

#1 Post by smxmarco » 22 Jan 2023 19:45

hello i need help :
pic 16f1829 does not work,
which sets for portA4=AN3 ?
I turn on all the doors but it doesn't work!
Are the sets correct?
Thanks so much

main: 'RA4 analogico
INTCON = 0 ' Disable PEIE,INTE,RBIE,T0IE
ADCON0 = %00001101 'definisce i canali convertitore A/D + abilita(bit4)
'bit2-5 def canali a/d, 0000=ra.0=an
'ADCON1

'anselA=%00001000
anselA=%00010001

CM1CON0=0
CM2CON0=0
trisa=%00011000 'definisce porta come ingresso e uscite (0=out, 1=in )
porta=0 'azzera porta

trisb=%11000000 'defisce portb come ingresso e uscite (0=out, 1=in )
portb=0

trisc=%10000000 'defisce portc come ingresso e uscite (0=out, 1=in )
portc=0
'-----------------------------------
porta=1
portb=1
portc=1
end.

smxmarco
Posts: 23
Joined: 01 Jul 2014 14:25
Location: Italy

Re: pic16f1829 not work... HELP !!!

#2 Post by smxmarco » 23 Jan 2023 20:11

Can anyone give me some advice where am I going wrong?
thank you

Post Reply

Return to “mikroBasic PRO for PIC General”