Proteus simulation with help of AVRcodeVision : Shifting LED On left

This my first program use AVR code vision. This program is to make left shifting a group of led.
Simply we ca use code generator wizard that provided in AVR codevision, this time i'm use port C as output port.
Below is the code for make left shifting of the led :


Program explanation :

PORTC= 0xFF // for turn off all led
k= 128; inisialisation for PORTC subtrahend (128 dec= 1000 0000 bin)
PORTC= 0x FF -k;// make D1 led turn on( 1111111-10000000= 0111 1111)
delay_ms(2000);// delay function calling
k =k/2; // prepare for next step subtrahend

And the circuit ( as ussual i use proteus, so we can simulate it)


and this the video simulation :





If you want to make simulation by your self you can download program file (in c file) and proteus circuit .....selamat mencoba..!!!

No comments:

Post a Comment