View previous topic :: View next topic |
Author |
Message |
engaddar
Joined: 31 Jan 2007 Posts: 6
|
measuring and showing |
Posted: Wed Dec 26, 2007 9:31 am |
|
|
how can i show the data on 4 digit 7 segment display while measuring the ac voltage 50 hz.i use 16f877.if i measure the voltage it is 50 hz and it is 20ms so the display oscillations!! |
|
|
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Wed Dec 26, 2007 12:34 pm |
|
|
Do you have a zero crossing detector to synchronize your readings with the 50Hz line voltage? Check out Microchip application note AN521
http://ww1.microchip.com/downloads/en/AppNotes/00521c.pdf _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
|
engaddar
Joined: 31 Jan 2007 Posts: 6
|
thaks but it is not the answer that i looked for!!! |
Posted: Wed Dec 26, 2007 2:21 pm |
|
|
i measure the frequency for example 50 hz when i sent it to display an oscillation comes into being.so there is a problem between measure and showing on the display.what can i do??? |
|
|
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Wed Dec 26, 2007 2:46 pm |
|
|
Can you describe the oscillation, maximum, minimum, frequency?
If it is only one count you may have a synchronization problem which will either require a sync pin like in AN521, or to live with it. _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
|
engaddar
Joined: 31 Jan 2007 Posts: 6
|
i want to say that |
Posted: Wed Dec 26, 2007 3:36 pm |
|
|
can you say me "can i measure the frequency and show it on 4 digit 7 segment display AT THE SAME TIME." i work to measure frequency 50 Hz it is 20 ms so when i want to see it on the display an oscillation(vibration) comes into being.thanks:)) |
|
|
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Wed Dec 26, 2007 4:12 pm |
|
|
I take it the display FLICKERS because the PIC can't multiplex the segments of the display while it is reading the 50Hz.
The only ways I can think of to deal with that are hardware such as adding a second PIC or display driver chip, or clever software. The software would have to divide the tasks into tiny time slices and balance their allocation so everything gets done on time. There is no magic bullet. You need to study your system requirements and and your hardware and do the best you can.
Sorry I can't be of more help. _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
|
gjs_rsdi
Joined: 06 Feb 2006 Posts: 468 Location: Bali
|
flicking display |
Posted: Wed Dec 26, 2007 5:02 pm |
|
|
16F877 can read and display at the same time. 16MHz gives 250ns=PC
even at 4MHz, 1us=PC will do it.
if I understand correct, you are reading the frequency and your problem is 7 seg flickering ?
the 7 seg. display need to have a latch/buffer/driver not to flicker. otherwise you are turning on/off the 7 seg. and it flickers.
I used 74HC4511 and common cathode leds.
if your 4 digits 7 seg. have integrated latch/buffer see tha data sheet how to to enable/disable the latch.
joseph |
|
|
aykut Guest
|
????? |
Posted: Thu Dec 27, 2007 3:04 am |
|
|
thank you very much.but i couldn't find a driver for 4 digit 7 segment.your example is only for one 7 segment display.:(((( |
|
|
engaddar
Joined: 31 Jan 2007 Posts: 6
|
thanks |
Posted: Thu Dec 27, 2007 3:06 am |
|
|
thank you very much.but i couldn't find a driver for 4 digit 7 segment.your example is only for one 7 segment display.:(((( |
|
|
gjs_rsdi
Joined: 06 Feb 2006 Posts: 468 Location: Bali
|
7 seg driver |
Posted: Thu Dec 27, 2007 3:08 am |
|
|
you have the 4*7 seg data sheet ? if yes, let me know how to find it, I will try to help
joseph |
|
|
engaddar
Joined: 31 Jan 2007 Posts: 6
|
|
|
engaddar
Joined: 31 Jan 2007 Posts: 6
|
|
|
gjs_rsdi
Joined: 06 Feb 2006 Posts: 468 Location: Bali
|
4x7 segment flickering |
Posted: Thu Dec 27, 2007 4:29 pm |
|
|
As you will read in the article, your display don't need driver. You have to update each 7 segment at least 100 time per second (10 ms interval). Doesn't mather don't have new data, you must to update the 7 seg.
http://www.melabs.com/resources/articles/ledart.htm
joseph |
|
|
gjs_rsdi
Joined: 06 Feb 2006 Posts: 468 Location: Bali
|
4*7 seg flickering |
Posted: Thu Dec 27, 2007 4:53 pm |
|
|
If you are worry about the current from the cathode pins, you can buffer them with npn transistors/transistor array/ with 10k on the base or buffer like ULN2003A
joseph |
|
|
|