CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

measuring and showing

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
engaddar



Joined: 31 Jan 2007
Posts: 6

View user's profile Send private message

measuring and showing
PostPosted: Wed Dec 26, 2007 9:31 am     Reply with quote

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

View user's profile Send private message

PostPosted: Wed Dec 26, 2007 12:34 pm     Reply with quote

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

View user's profile Send private message

thaks but it is not the answer that i looked for!!!
PostPosted: Wed Dec 26, 2007 2:21 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Wed Dec 26, 2007 2:46 pm     Reply with quote

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

View user's profile Send private message

i want to say that
PostPosted: Wed Dec 26, 2007 3:36 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Wed Dec 26, 2007 4:12 pm     Reply with quote

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

View user's profile Send private message Send e-mail

flicking display
PostPosted: Wed Dec 26, 2007 5:02 pm     Reply with quote

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







?????
PostPosted: Thu Dec 27, 2007 3:04 am     Reply with quote

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

View user's profile Send private message

thanks
PostPosted: Thu Dec 27, 2007 3:06 am     Reply with quote

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

View user's profile Send private message Send e-mail

7 seg driver
PostPosted: Thu Dec 27, 2007 3:08 am     Reply with quote

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

View user's profile Send private message

here
PostPosted: Thu Dec 27, 2007 3:21 am     Reply with quote

http://www.brightled.com.tw/GetPdfFile.aspx?no=BQ-M404RI
engaddar



Joined: 31 Jan 2007
Posts: 6

View user's profile Send private message

here
PostPosted: Thu Dec 27, 2007 3:36 am     Reply with quote

http://www.brightled.com.tw/GetPdfFile.aspx?no=BQ-M516RI
gjs_rsdi



Joined: 06 Feb 2006
Posts: 468
Location: Bali

View user's profile Send private message Send e-mail

4x7 segment flickering
PostPosted: Thu Dec 27, 2007 4:29 pm     Reply with quote

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

View user's profile Send private message Send e-mail

4*7 seg flickering
PostPosted: Thu Dec 27, 2007 4:53 pm     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group