Tuesday 1 December 2015

8051 ASSEMBLY codes for led blinker

       connect all 8 bit of port2 to ledS the  leds will blink      

ASSEMBLY CODES FOR LEDS BLINKER


       ORG 00H
MAIN: MOV A , #0FFH
 AA:      MOV P2 , A
              CPL A
              ACALL DELAY500MS
               SJMP AA 
               DELAY500MS:MOV R7 , #125D ; DELAY FOR 250MS
               LOOP1: MOV TMOD ,#01H
               MOV TH0 , #0F8H
              MOV TL0 , #02FH
               SETB TR0
HERE:  JNB TF0 , HERE
               CLR TF0
               CLR TR0
               DJNZ R7 , LOOP1
               RET
              END              






CIRCUIT DIAGRAM








No comments:

Post a Comment

Storing the long number(16bits / 32bits) in external flash of arduino or STM32 .

 #include <Wire.h> #define flashaddress 0x50 int liters = 10058 , add1=10 , add2,time1=55; // value of liters save in flash byte data ...