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.

Problem with flickering display (using PIC16F72 for a clock circuit )

Status
Not open for further replies.

sajeev

Advanced Member level 4
Joined
Apr 29, 2005
Messages
112
Helped
4
Reputation
8
Reaction score
1
Trophy points
1,298
Location
Kerala-India
Activity points
2,197
Hi
I am using 16f72 for a clock circuit using 4 seven segment displays.
I have written the code in assemby.I used 32.768khz crystal with timer0 to generate 1 second delay.The problem is that,as the crystal frequency is this much low the display sometimes gives small flickering.I have written the same in C also.There result was not so good as the assembly code.How to solve thise problem.Its not possible for me to use any additional ICs for driving the segments..

Regards
 

Re: Display problem

Refresh @ 100Hz will give a flikker free display. so with 4 displays this means refresh every 2ms which is not a problem even at 32 KHz osc.
 

Re: Display problem

PaulHolland said:
Refresh @ 100Hz will give a flikker free display. so with 4 displays this means refresh every 2ms which is not a problem even at 32 KHz osc.



Hi
My project contains a keyboard,2 rotary switchs..
It reads time from the rotary switches for on/off of light.And keboard scanning is also there.My display routine here

segment_display MOVF temp0,W ; ROUTINE FOR DISPLAYING LEDS IN MULTIPLEXED MANNER
CALL pattern ; CALL THE PATTERN FOR THE DIGIT
MOVWF PORTC ; SEND THE PATTERN TO LEDS
MOVLW .31 ; ENABLE FIRST DISC
MOVWF PORTA
MOVF temp0,W
CALL pattern ; CALL THE PATTERN FOR THE DIGIT
MOVWF PORTC ; SEND THE PATTERN TO LEDS
MOVLW .31 ; ENABLE FIRST DISC
MOVWF PORTA
MOVLW 0xff
MOVWF PORTA

MOVF temp1,W
CALL pattern ; CALL THE PATTERN FOR THE DIGIT
MOVWF PORTC ; SEND THE PATTERN TO LEDS
MOVLW .47 ; ENABLE SECOND DISC
MOVWF PORTA
MOVF temp1,W
CALL pattern ; CALL THE PATTERN FOR THE DIGIT
MOVWF PORTC ; SEND THE PATTERN TO LEDS
MOVLW .47 ; ENABLE SECOND DISC
MOVWF PORTA
MOVLW 0xff
MOVWF PORTA

MOVF temp2,W
CALL pattern ; CALL THE PATTERN FOR THE DIGIT
MOVWF PORTC ; SEND THE PATTERN TO LEDS
MOVLW .55 ; ENABLE THIRD DISC
MOVWF PORTA
MOVF temp2,W
CALL pattern ; CALL THE PATTERN FOR THE DIGIT
MOVWF PORTC ; SEND THE PATTERN TO LEDS
MOVLW .55 ; ENABLE THIRD DISC
MOVWF PORTA
MOVLW 0xff
MOVWF PORTA

MOVF temp3,W
CALL pattern ; CALL THE PATTERN FOR THE DIGIT
MOVWF PORTC ; SEND THE PATTERN TO LEDS
MOVLW .59 ; ENABLE FOURTH DISC
MOVWF PORTA
MOVF temp3,W
CALL pattern ; CALL THE PATTERN FOR THE DIGIT
MOVWF PORTC ; SEND THE PATTERN TO LEDS
MOVLW .59 ; ENABLE FOURTH DISC
MOVWF PORTA
MOVLW 0xff
MOVWF PORTA
RETURN


I set a breakpoint at segment_display and the time to reach again at this point was 25ms.So what should i do?
Regards....
 

Re: Display problem

Hi My Friend
to be free of flikker you must refresh the display at a rate minmume 40Hz or say 50Hz for each segment then you have 4 seven segment then your minimum refresh rate must be 4X50=200 Hz or 5 msec which is 1/200
then the best way to do that is to configuar a timer INT with 5 msec to display every digit then you have a flikker free display

Regards
 

Re: Display problem

Hi
I was able to the display properly without using interrupt.Iam using timer0 interrupt in the program.So when interrupt occurs while the mc is in the display routine,the currently displaying segment is seems to be brighter for a short time.So when the interrupt occurs i blanked the segments.But i still can detect the difference in display during interrupt.Is there any other way to solve this?
Regards
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top