hayawana
Member level 1
- Joined
- Apr 10, 2013
- Messages
- 35
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,286
- Activity points
- 1,524
Hi everyone,
I'm working on PIC18F4553 on Digital Analog Converter(12-bit converter), and I use a 20MHz crystal.
The result is contained in two registers ADRESH and ADRESL.I have read the datasheet but I still do not see how to display the result on the output pin of the µC.
I use mikroC, I send you attached the wiring diagram in proteus. I need some help with that
Here initialization:
/ / / / / / / / / Initialization / / / / / / / / / / / / / / / / / /
ADCON0 = 0x00, / / select channel AN0 using ADCON0 register
ADCON1 = 0x03 / / VSS, VDD, select AN0 as analog and digital as AN12
ADCON2 0xAD = / / Right Justified, 12TAD, 16TOSC
TRISA = 0xFF; / / set as inputs TRISA
TRISB = 0x00, / / set TRISB as ouputs
ADON_bit = 1 / / enable conversion
Thank you,
I'm working on PIC18F4553 on Digital Analog Converter(12-bit converter), and I use a 20MHz crystal.
The result is contained in two registers ADRESH and ADRESL.I have read the datasheet but I still do not see how to display the result on the output pin of the µC.
I use mikroC, I send you attached the wiring diagram in proteus. I need some help with that
Here initialization:
/ / / / / / / / / Initialization / / / / / / / / / / / / / / / / / /
ADCON0 = 0x00, / / select channel AN0 using ADCON0 register
ADCON1 = 0x03 / / VSS, VDD, select AN0 as analog and digital as AN12
ADCON2 0xAD = / / Right Justified, 12TAD, 16TOSC
TRISA = 0xFF; / / set as inputs TRISA
TRISB = 0x00, / / set TRISB as ouputs
ADON_bit = 1 / / enable conversion
Thank you,