PDA

View Full Version : adcon0,adcon1



jonas2
- 12th September 2009, 09:43
Hello

I have an example program that melanie is very good.
I have a problem with the port configuration registers and
ADCON0 and ADCON1
device 16f876a
Trisa:% 00001110 'output RA0, RA1, RA2, RA3 input

ADCON0 =% 11,000,000
ADCON1 =% 00,000,111

Thank you for your help

Jerson
- 12th September 2009, 13:23
I have an example program that melanie is very good.
I have a problem with the port configuration registers and
ADCON0 and ADCON1
device 16f876a
Trisa:% 00001110 'output RA0, RA1, RA2, RA3 input

ADCON0 =% 11,000,000
ADCON1 =% 00,000,111

Are you sure you are typing it as shown in Melanie's code? The way you've shown here will give compilation errors. Or maybe I don't understand your question.

Trisa = %00001110
ADCON0 = %11000000
ADCON1 = %00000111

jonas2
- 13th September 2009, 09:36
Hello


This model melanie and I'll add my program routines.
And I need to use the port and having output RA0 and RA1 RA2 RA3
Input, and my question is about the ADCON registers?
I do not configured.

Thank you

Archangel
- 14th September 2009, 02:37
Hello


This model melanie and I'll add my program routines.
And I need to use the port and having output RA0 and RA1 RA2 RA3
Input, and my question is about the ADCON registers?
<font color=red>I do not configured. </font color>

Thank you

Hello Jonas2,"I do not configured"means . . . you have changed from Melanie's code ?
Anyway, to address your question, I hope. . .
From the DATA SHEET:
ADCON0 = %11000000
bit 0 = 0 ADCON is turned off
bit 1 = 0 unimplemented (not used) read as 0
bit 2 = 0 A/D Go Done conversion not in progress
bit 3 -5 = all zeros A/D channel select bits
bit 5-7 = 11 FRC (clock derived from the internal A/D RC oscillator)

ADCON1 = %00000111
sets all ports to digital

jonas2
- 14th September 2009, 09:42
Hello

Thank you for your help, I'll keep the program melanie.
But I would like to change the initialization of the RTC, and to do so USArt
Send frame by rs232.je seeks a routine as an example.

Thank you