Hi, Vicce
Everything you need is here : http://www.farnell.com/datasheets/41570.pdf
or from Microchip main site : http://ww1.microchip.com/downloads/e...Doc/40039c.pdf
Alain
Hi, Vicce
Everything you need is here : http://www.farnell.com/datasheets/41570.pdf
or from Microchip main site : http://ww1.microchip.com/downloads/e...Doc/40039c.pdf
Alain
Last edited by Acetronics2; - 4th August 2005 at 12:38.
I don't want to soud like a broken record but...
To get some example, begin a search withLater if you still need some tips, just send what you have tried.
- PORTA AND ADCON => this will lead you to some configuration
- Configuration AND fuse => this will lead you to the FAQ on a excellent thread who'll teach you how to find/use PIC fuses (internal osc and such)
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
friends,
this is writing for a 16f873 and it is exactly this that I need for a 16f676
Define ADC_BITS 10 ;Set number of bits in result
Define ADC_CLOCK 3 ;Set clock source (3=rc)
Define ADC_SAMPLEUS 50 ;Set sampling time in uS
TRISA = %11111111
ADCON1 = 4 ;Set PORTA analog and right justify result
OPTION_REG = $7f ; Enable PORTB pullups
in the place (pull-up) portb to configure for porta
in advance thankful.
There's no Pull-up on PORTA. Must use external one wich is always the best pratice... well IMHO.Originally Posted by vicce
AND PIC16F676 have internal comparator on PORTA, as i thought, so you must add
CMCON=7
to the top of your code
CMCON=7, click,CMCON=7, click,CMC, click,CMCON, click,CMCON=7, click...
AND, the last one, ADCON1, is not the one you need to set A/D channel. You need to set ANSEL
<img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=406&stc=1">
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Although I agree an external pull-up is better....Originally Posted by mister_e
TFM states...."Each of the PORTA pins, except RA3, has an individually configurable weak internal pull-up."
Last edited by rhino; - 5th August 2005 at 05:31.
Bookmarks