sahu
Member
this code work fine As i want . this code read ADC form AN0 & display it 7 seg.here i indecte AN0 port display it 7 seg.
As I-P
but one confusion with me. how can display AN1 ,AN2
those Are need indicAtion O_P & Lod & reading ADC form AN1 & AN2 display it 7 seg.
As I-P
but one confusion with me. how can display AN1 ,AN2
those Are need indicAtion O_P & Lod & reading ADC form AN1 & AN2 display it 7 seg.
PHP:
/* 16F7 Configuration dual I|P
O = Output, I = Input RIGHT NOW AS DEMO
_________
MCLR | 1 28 | RB7 --> (O) == A
(I) ADC1 --> AN0 | 2 27 | RB6 --> (O) == B
(I) ADC2 --> AN1 | 3 26 | RB5 --> (O) == C
(I) ADC3 --> AN2 | 4 25 | RB4 --> (O) == E =as D
(I) ADC4 --> AN3 | 5 24 | RB3 --> (O) == D =as E
(I) SW --> RA4 | 6 23 | RB2 --> (O) == F
(I) ADC5 <-- AN4 | 7 22 | RB1 --> (O) == G
Vss | 8 21 | RB0 --> (O) == H
--> OSC1 | 9 20 | Vdd
<-- OSC2 |10 19 | Vss
RL == (O) <-- RC0 |11 18 | RC7 --> (O) == display[3]
== (O) <-- RC1 |12 17 | RC6 --> (O) == display[2]
== (O) <-- RC2 |13 16 | RC5 --> (O) == display[1]
== (O) <-- RC3 |14 15 | RC4 --> (O) ==
---------
WOW ITS OK ON MY PCB
*/
#include <16F72.h>
#device ADC=8
#FUSES NOWDT //No Watch Dog Timer
#FUSES NOBROWNOUT //No brownout reset
//#FUSES NOLVP //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O
#FUSES HS
Last edited: