' ******************************************** ' * ((IN THE NAME OF GOD)) * ' ******************************************** ' * Title : 8 LED Flasher * ' * Last Updated : 1385/5/16 * ' * Target : Atmega8L * ' * Program code : BASCOM AVR * ' * Author : Foad Alikhani * ' * WebSite : Www.Mechatronics.Co.Sr * ' * E-mail : foad_8x@yahoo.com * ' ******************************************** 'This is a very simple program for flashing the LEDs from left to right and right to left continuously. $regfile = "m8def.dat" Config Portb = Output Do Portb = 255 - 1 ' 11111110 in bin Waitms 100 Portb = 255 - 2 ' 11111101 in bin Waitms 100 Portb = 255 - 4 ' 11111011 in bin Waitms 100 Portb = 255 - 8 ' 11110111 in bin Waitms 100 Portb = 255 - 16 ' 11101111 in bin Waitms 100 Portb = 255 - 32 ' 11011111 in bin Waitms 100 Portb = 255 - 64 ' 10111111 in bin Waitms 100 Portb = 255 - 128 ' 01111111 in bin Waitms 200 Portb = 255 - 64 ' 10111111 in bin Waitms 100 Portb = 255 - 32 ' 11011111 in bin Waitms 100 Portb = 255 - 16 ' 11101111 in bin Waitms 100 Portb = 255 - 8 ' 11110111 in bin Waitms 100 Portb = 255 - 4 ' 11111011 in bin Waitms 100 Portb = 255 - 2 ' 11111101 in bin Waitms 100 Portb = 255 - 1 ' 11111110 in bin Waitms 100 Loop End