jimmyvarghese143
New Member
hi everybody i want display 0-100 in my development kit.here is my program that wil display fomm 0-9.so please give me some suggection for making the changes.
#include<pic.h>
#include<stdio.h>
void main()
{
int i;
char map[10]={0x3F,0x06,0x5B,0x4F,0x66,0x6D,0x7D,0x07,0x7F,0x6F};
TRISD=0x00; // for diplay/led output
TRISC=0x00; // latch control
TRISB=0X00; // display control
RC1=0;
RC0=0;
i=0;
while(i<9)
{
i++;
PORTD=map; //masking the values
PORTB=0x01; //display enable for first display
_delay(196999); //delay
PORTB=0x00; //turn off the display
_delay(196999); //delay
if(i==9) //just chk whethr i=9?
{
RC1=1; //led enable
}
else //buzzer enable
{
RB5=1;
}
}
#include<pic.h>
#include<stdio.h>
void main()
{
int i;
char map[10]={0x3F,0x06,0x5B,0x4F,0x66,0x6D,0x7D,0x07,0x7F,0x6F};
TRISD=0x00; // for diplay/led output
TRISC=0x00; // latch control
TRISB=0X00; // display control
RC1=0;
RC0=0;
i=0;
while(i<9)
{
i++;
PORTD=map; //masking the values
PORTB=0x01; //display enable for first display
_delay(196999); //delay
PORTB=0x00; //turn off the display
_delay(196999); //delay
if(i==9) //just chk whethr i=9?
{
RC1=1; //led enable
}
else //buzzer enable
{
RB5=1;
}
}