Let us see what you have got, and we will help YOU make it work.
read data sheet re:ANSEL ANSELH ADCON0 ADCON1
PICs typically default to analog ports and YOU MUST tell them to do digital.
Let us see what you have got, and we will help YOU make it work.
read data sheet re:ANSEL ANSELH ADCON0 ADCON1
PICs typically default to analog ports and YOU MUST tell them to do digital.
Last edited by Archangel; - 4th January 2015 at 19:30.
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.
Im not very good at pics yet, but im learning
This is what I have. I just want the PIC to light up. I have the LED connected to PORTB.0
I have tried a lot of different examples, but none works.
__________________________________________________ _
TRISB = %11111111
TRISC = %00000000
ANSEL = %00000000 ' Make AN0-AN7 digital
ANSELH= %00000000 ' Make AN8-AN13 digital
PORTB = 1
main:
portb=1
pause 100
goto main
__________________________________________________ ___
This works in GCB, but I think that compiler does a lot in the background for me.
Bookmarks