SmoZy
Newbie level 2
- Joined
- Apr 11, 2014
- Messages
- 2
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 7
hello i have a problem i have :
PIC16F877A
7seg Display
i have a problem :'( a random seg display very very very quickly ( PIC = 500Hz ) ----> https://prntscr.com/391z7f
my code :
thanks i just want all my seg is ON
PIC16F877A
7seg Display
i have a problem :'( a random seg display very very very quickly ( PIC = 500Hz ) ----> https://prntscr.com/391z7f
my code :
Code:
// Afficheur 7 segments\\
// Thomas Lounis \\
// 1 ere S3 \\
// 10/04/2014 \\
// v 1.0 \\
// PIC16F877A \\
#include <htc.h>
#include <stdio.h>
#include <time.h>
// initialise les differents nom au port
#define seg_a RB0
#define seg_b RB1
#define seg_c RB2
#define seg_d RB3
#define seg_e RB4
#define seg_f RB5
#define seg_g RB6
void main(void)
{
CMCON = 0x07; // annule les comparateurs
TRISB = 0;
seg_a = 0;
seg_b = 0;
seg_c = 0;
seg_d = 0;
seg_e = 0;
seg_f = 0;
seg_g = 0;
while (1)
{
seg_a = 1;
seg_b = 1;
seg_c = 1;
seg_d = 1;
seg_e = 1;
seg_f = 1;
seg_g = 1;
}
}
thanks i just want all my seg is ON
Last edited: