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.

Desired output 0-999, please help

Status
Not open for further replies.

Filipe Aparicio

Newbie level 3
Joined
Feb 3, 2013
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,318
fg.png

Hi all, could u help me to create the codes using MikroC for the circuit shown in the picture. I have tried it but all the segment count same number(ex 0000, 1111, 2222 and so on), but the desired output is ex. 0001, 0002,....0010, 0011 and so on until 0999... Please help.
 

post your code please so that we can help you
 

Hi MAAM, these are the codes that I am using... but I dont know how to make the first 3 digits to be zero and count start from the last digit(example 0001, 0002, 0003.....up to 0999.


void main()

{
TRISB=0;
TRISC=0;
{
while(1)
{
PORTB=0x3F;
delay_ms(500);
PORTB=0x06;
delay_ms(500);
PORTB=0x5B;
delay_ms(500);
PORTB=0x4F;
delay_ms(500);
PORTB=0x66;
delay_ms(500);
PORTB=0x6D;
delay_ms(500);
PORTB=0x7D;
delay_ms(500);
PORTB=0x07;
delay_ms(500);
PORTB=0x7F;
delay_ms(500);
PORTB=0x6F;
delay_ms(500);
PORTB=0x3F;
delay_ms(500);
PORTB=0x06;
delay_ms(500);
PORTB=0x5B;
delay_ms(500);
PORTB=0x4F;
delay_ms(500);
PORTB=0x66;
delay_ms(500);
PORTB=0x6D;
delay_ms(500);
PORTB=0x7D;
delay_ms(500);
PORTB=0x07;
delay_ms(500);
PORTB=0x7F;
delay_ms(500);
PORTB=0x6F;
delay_ms(500);

}
while(1);

}
}
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top