proteus báo lỗi là sao : "simulation is not running in real time due to excessive cpu load "
chương trình của em đây :
chương trình của em đây :
Code:
org 0000h ljmp main org 000bh ljmp timer0 ;---------------------- main: mov sp,#30h mov 30h,#00h mov 31h,#00h mov TMOD,#01h mov TL0,#low(-9216) mov TH0,#high(-9216) mov IE,#10000010b setb TR0 lap: call hienthi call kiemtra sjmp lap ;------------------------ hienthi: mov DPTR,#bang mov A,30h movc A,@A+dptr mov P0,#01h mov P2,A call delay mov A,31h cjne a,#9,tiep sjmp thoathienthi tiep: movc A,@a+DPTR mov p0,#02h mov P2,A call delay thoathienthi: ret ;-------------------- kiemtra: cjne R2,#100,ketthuc mov R2,#00h inc 30h mov a,30h cjne a,#9,ketthuc mov 30h,#00h inc 31h mov a,31h cjne a,#9,ketthuc mov 31h,#00h ketthuc: ret ;------------------------- delay: mov r7,#250 djnz r7,$ ret timer0: inc R2 mov TL0,#low(-9216) mov TH0,#high(-9216) setb tr0 reti bang: db 0c0h,0f9h,0a4h,0b0h,99h,92h,82h,0f8h,80h,90h,0 end

Comment