Proteus Isis – C# Gui

Image

code available to download

Continue reading

Advertisements

Proteus Isis – 2 Seven counter

DS

#define SEGPORT1 PORTC
#define SEGPORT2 PORTD
char Seg[10] = {0x3F, 0x06, 0x5B, 0x4F, 0x66, 0x6D, 0x7D, 0x07, 0x7F, 0x6F};
void PrintNum1(int num)
{
SEGPORT2 = Seg[num];
}
void PrintNum2(int num)
{
SEGPORT1 = Seg[num];
}
void main() {
int Counter1 = 0;
int Counter2 = 1;
TRISD = 0;
TRISC=0;
while(1)
{
PrintNum1(Counter1++);
Delay_ms(500);
if(Counter1 > 9)
{
Counter1 = 0;
PrintNum2(Counter2++);
}
}

}