glenndingding
Newbie level 5
- Joined
- Feb 15, 2012
- Messages
- 10
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Location
- Philippines
- Activity points
- 1,403
HI
can anyone help me?
I am new using micro c pro. i am using pic16f877a, how to configure ADC? please can anyone lend me a code for configuration?
i have a current sensor which will convert current to a certain voltage. and this voltage is serves as an input to pic16f877a.
i want to use PORT A only ,disregarding PORT E. because I only have 3 sensors which means I only use 3 ANALOG INPUTS to pic.
i do not know how to configure adc for this...
here is some of my codes.
TRISA = 0x07; //3 inputs RA0/AN0, RA1/AN1, RA2/AN2
ANSEL = 1; // 3 pins are configured analog inputs
PORTC = 0; //port c configures as output
TRISC = 0x88; //only 6 pins output
PORTD = 0; //portd are configures output
TRISD = 0x8F // only 3 pins output
what else to do.....where is the configuration for adc can any one help me to revise my codes
:sad:![Crying :cry: :cry:](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
can anyone help me?
I am new using micro c pro. i am using pic16f877a, how to configure ADC? please can anyone lend me a code for configuration?
i have a current sensor which will convert current to a certain voltage. and this voltage is serves as an input to pic16f877a.
i want to use PORT A only ,disregarding PORT E. because I only have 3 sensors which means I only use 3 ANALOG INPUTS to pic.
i do not know how to configure adc for this...
here is some of my codes.
TRISA = 0x07; //3 inputs RA0/AN0, RA1/AN1, RA2/AN2
ANSEL = 1; // 3 pins are configured analog inputs
PORTC = 0; //port c configures as output
TRISC = 0x88; //only 6 pins output
PORTD = 0; //portd are configures output
TRISD = 0x8F // only 3 pins output
what else to do.....where is the configuration for adc can any one help me to revise my codes
:sad: