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.
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
yes i can do this for only ADC0 to ADC4
but but confused how can display rest text ( "O_P" & "lod" )
now this code show only
1) Show text "I_P"
2) Show value for AN0
i want to display as,
1) Show text "I_P" for 1 second.
2) Show value for AN0 for 3 second.
3) Show text "O_P" for 1 second.
4) Show value for AN1 for 1 second.
5) Show text "lod" for 1 second.
6) Show value for AN2 for 1 second.
7) etc then loop back to (1).
yes i can do this for only ADC0 to ADC4
but but confused how can display rest text ( "O_P" & "lod" )
now this code show only
1) Show text "I_P"
2) Show value for AN0
Can you put in delay code using the compiler's delay routine?
Can you write a display routine that has a parameter?
In the interrupt routine, depending on the number of ticks
call the proper display routine.
ie
Code:
if ticks == XXX
Display(1);
else if ticks == YYY
Display(2);
else
Display(3);