Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Plz i need ADC convertion

Status
Not open for further replies.

Mahum

Newbie level 1
Joined
Oct 17, 2009
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,292
i am running my course projec n it is double voltage regulator... 0----25V n i wanna show my voltage in seven segment display..so i need ADC conversion .how come i convert my analog to degital convertion and how to give the input voltage..

thnz for ur tym.:?:
 

What rails do you have? It's pretty obvious that you will need basic logic to drive the 7segment display(s)... you can do this all discretely and there are a lot of options...

Successive Approximation Architectures should be well suited for what you are looking for... Resistor divider or opamp divider from the the rail to the comparator or ADC... You can make a SAR out of a digital resistor and a comparator pretty easily

AVNET.com for PDIP (thought hole) parts... https://www.analog.com/en/verifiedcircuits/CN0111/vc.html
Some of the reference type stuff (it could actually be modified to be your entire project)
 

thz i will go for it.
 

//udara manoj******PIC16F84****4MHZ****
//2010.12.21

unsigned int temp_res;
void ssdcode(int i);
int Digit1; // Variable for digit1
int Digit2; // Variable for digit2
int Digit3; // Variable for digit3

int number;
void main(){
TRISA = 0b00000100; //RA2 input
TRISB = 0; //PORTB output
number = 0; //Start from 0
Digit1 = 0; //Start from 0
Digit2 = 0; //Start from 0
Digit3 = 0; //Start from 0





do {
temp_res = ADC_Read(2); // Get 10-bit results of AD conversion
number=temp_res*0.00489; //digital count multiply by resolution *** you can multiply this part what ever your input voltage ..but keep in mind real cct u should add voltage divider




Digit1 = number%10; //Remainder
Digit2 = number/10; //division
Digit3= number/100; //divition

ssdcode(Digit1); //Display digit 1
PORTA.F0 = 1; //Enable Digit1
Delay_ms(10); //Small delay
PORTA.F0 = 0; //Disable Digit1

ssdcode(Digit2); //Display digit 2
PORTA.F1 = 1; //Enable Digit2
Delay_ms(10); //Small delay
PORTA.F1 = 0; //Disable Digit2

ssdcode(Digit3); //Display digit 2
PORTA.F3 = 1; //Enable Digit2
Delay_ms(10); //Small delay
PORTA.F3 = 0; //Disable Digit2


}

while(1);
}

void ssdcode(int i){
switch (i){
case 0: PORTB = 0b00111111; break;
case 1: PORTB = 0b00000110; break;
case 2: PORTB = 0b01011011; break;
case 3: PORTB = 0b01001111; break;
case 4: PORTB = 0b01100110; break;
case 5: PORTB = 0b01101101; break;
case 6: PORTB = 0b01111101; break;
case 7: PORTB = 0b00000111; break;
case 8: PORTB = 0b01111111; break;
case 9: PORTB = 0b01101111; break;
}
}
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top