Thông báo

Collapse
No announcement yet.

Hỗ trợ lập trình cho vi điều khiển dòng 8051

Collapse
X
 
  • Lọc
  • Giờ
  • Show
Clear All
new posts

  • #76
    thu gọn như vậy là đúng rồi đó

    Comment


    • #77
      Vâng... Cảm ơn bác vietlamdt

      Comment


      • #78
        Bác vietlamdt dùng phần mềm gì vậy.
        KeilC hay Mide-51

        Comment


        • #79
          mình dùng cả 2. ngày trước viết = ASM thì thường dùng Mide-51, còn giờ chuyển qua C thì dùng KeilC

          Comment


          • #80
            Cho e hỏi về con IC ổn áp nguồn 7805:
            nếu điện áp cao quá 5v thì nó có hạ áp xuống bằng 5v hay không.

            Comment


            • #81
              Các bác biên dịch giúp e code ASM này sang file HEX với, e xin cảm ơn:
              ORG 0000H
              start:
              call A
              call A
              call A
              call B
              call B
              call B
              call C
              call C
              call C
              call D
              jmp start
              A:
              mov p0, #11111110b
              mov p1, #10011111b
              mov p2, #11111001b
              call delay
              mov p0, #11111101b
              call delay
              mov p0, #11111011b
              call delay
              mov p0, #11110111b
              call delay
              mov p0, #11110111b
              mov p1, #11110110b
              mov p2, #01101111b
              call delay
              mov p0, #11111011b
              call delay
              mov p0, #11111101b
              call delay
              mov p0, #11111110b
              call delay
              ret
              B:
              mov p0, #11111110b
              mov p1, #00000000b
              mov p2, #00000000b
              call delay
              mov p0, #11111101b
              call delay
              mov p0, #11111011b
              call delay
              mov p0, #11110111b
              call delay
              mov p0, #11111011b
              call delay
              mov p0, #11111101b
              call delay
              ret
              C:
              mov p0, #00000000b
              mov p1, #11110000b
              call delay
              mov p1, #00001111b
              call delay
              mov p2, #11110000b
              call delay
              mov p2, #00001111b
              call delay
              mov p2, #11110000b
              call delay
              mov p1, #00001111b
              call delay
              mov p1, #11110000b
              call delay
              ret
              D:
              mov p0, #00000000b
              mov p1, #11111111b
              mov p2, #11111111b
              call delay
              mov p1, #11111110b
              mov p2, #11111111b
              call delay
              mov p1, #11111100b
              mov p2, #11111111b
              call delay
              mov p1, #11111000b
              mov p2, #11111111b
              call delay
              mov p1, #11110000b
              mov p2, #11111111b
              call delay
              mov p1, #01110000b
              mov p2, #11111111b
              call delay
              mov p1, #01110000b
              mov p2, #11110111b
              call delay
              mov p1, #01110000b
              mov p2, #01110111b
              call delay
              mov p1, #01110000b
              mov p2, #00110111b
              call delay
              mov p1, #01110000b
              mov p2, #00010111b
              call delay
              mov p1, #01110000b
              mov p2, #00000111b
              call delay
              mov p1, #01110000b
              mov p2, #00000110b
              call delay
              mov p1, #01100000b
              mov p2, #00000110b
              call delay
              mov p1, #01000000b
              mov p2, #00000110b
              call delay
              mov p1, #00000000b
              mov p2, #00000110b
              call delay
              mov p1, #00000000b
              mov p2, #00000010b
              call delay
              mov p1, #00000000b
              mov p2, #00000000b
              call delay
              mov p1, #00100000b
              mov p2, #00000000b
              call delay
              mov p1, #01100000b
              mov p2, #00000100b
              call delay
              mov p1, #01100000b
              mov p2, #00000110b
              call delay
              mov p1, #01100000b
              mov p2, #00000111b
              call delay
              mov p1, #01110000b
              mov p2, #00000111b
              call delay
              mov p1, #01110001b
              mov p2, #00000111b
              call delay
              mov p1, #01110011b
              mov p2, #00000111b
              call delay
              mov p1, #01110111b
              mov p2, #00000111b
              call delay
              mov p1, #01111111b
              mov p2, #00000111b
              call delay
              mov p1, #11111111b
              mov p2, #00000111b
              call delay
              mov p1, #11111111b
              mov p2, #00001111b
              call delay
              mov p1, #11111111b
              mov p2, #10001111b
              call delay
              mov p1, #11111111b
              mov p2, #11001111b
              call delay
              mov p1, #11111111b
              mov p2, #11101111b
              call delay
              mov p1, #11111111b
              mov p2, #11111111b
              call delay
              ret
              delay:
              mov r1,#2
              lap2:
              mov r2,#200
              lap1:
              mov r3,#250
              djnz r3,$
              djnz r2,lap1
              djnz r1,lap2
              ret
              end

              Comment


              • #82
                Bác vietlamdt biên dịch giúp e đoạn mã này sang file HEX, bác upload lên Mediafire dưới dạng file.HEX nhé:
                ORG 0000H
                start:
                call A
                call A
                call A
                call B
                call B
                call B
                call C
                call C
                call C
                call D
                jmp start
                A:
                mov p0, #11111110b
                mov p1, #10011111b
                mov p2, #11111001b
                call delay
                mov p0, #11111101b
                call delay
                mov p0, #11111011b
                call delay
                mov p0, #11110111b
                call delay
                mov p0, #11110111b
                mov p1, #11110110b
                mov p2, #01101111b
                call delay
                mov p0, #11111011b
                call delay
                mov p0, #11111101b
                call delay
                mov p0, #11111110b
                call delay
                ret
                B:
                mov p0, #11111110b
                mov p1, #00000000b
                mov p2, #00000000b
                call delay
                mov p0, #11111101b
                call delay
                mov p0, #11111011b
                call delay
                mov p0, #11110111b
                call delay
                mov p0, #11111011b
                call delay
                mov p0, #11111101b
                call delay
                ret
                C:
                mov p0, #00000000b
                mov p1, #11110000b
                call delay
                mov p1, #00001111b
                call delay
                mov p2, #11110000b
                call delay
                mov p2, #00001111b
                call delay
                mov p2, #11110000b
                call delay
                mov p1, #00001111b
                call delay
                mov p1, #11110000b
                call delay
                ret
                D:
                mov p0, #00000000b
                mov p1, #11111111b
                mov p2, #11111111b
                call delay
                mov p1, #11111110b
                mov p2, #11111111b
                call delay
                mov p1, #11111100b
                mov p2, #11111111b
                call delay
                mov p1, #11111000b
                mov p2, #11111111b
                call delay
                mov p1, #11110000b
                mov p2, #11111111b
                call delay
                mov p1, #01110000b
                mov p2, #11111111b
                call delay
                mov p1, #01110000b
                mov p2, #11110111b
                call delay
                mov p1, #01110000b
                mov p2, #01110111b
                call delay
                mov p1, #01110000b
                mov p2, #00110111b
                call delay
                mov p1, #01110000b
                mov p2, #00010111b
                call delay
                mov p1, #01110000b
                mov p2, #00000111b
                call delay
                mov p1, #01110000b
                mov p2, #00000110b
                call delay
                mov p1, #01100000b
                mov p2, #00000110b
                call delay
                mov p1, #01000000b
                mov p2, #00000110b
                call delay
                mov p1, #00000000b
                mov p2, #00000110b
                call delay
                mov p1, #00000000b
                mov p2, #00000010b
                call delay
                mov p1, #00000000b
                mov p2, #00000000b
                call delay
                mov p1, #00100000b
                mov p2, #00000000b
                call delay
                mov p1, #01100000b
                mov p2, #00000100b
                call delay
                mov p1, #01100000b
                mov p2, #00000110b
                call delay
                mov p1, #01100000b
                mov p2, #00000111b
                call delay
                mov p1, #01110000b
                mov p2, #00000111b
                call delay
                mov p1, #01110001b
                mov p2, #00000111b
                call delay
                mov p1, #01110011b
                mov p2, #00000111b
                call delay
                mov p1, #01110111b
                mov p2, #00000111b
                call delay
                mov p1, #01111111b
                mov p2, #00000111b
                call delay
                mov p1, #11111111b
                mov p2, #00000111b
                call delay
                mov p1, #11111111b
                mov p2, #00001111b
                call delay
                mov p1, #11111111b
                mov p2, #10001111b
                call delay
                mov p1, #11111111b
                mov p2, #11001111b
                call delay
                mov p1, #11111111b
                mov p2, #11101111b
                call delay
                mov p1, #11111111b
                mov p2, #11111111b
                call delay
                ret
                delay:
                mov r1,#2
                lap2:
                mov r2,#200
                lap1:
                mov r3,#250
                djnz r3,$
                djnz r2,lap1
                djnz r1,lap2
                ret
                end

                Comment


                • #83
                  E dùng keilc vs Mide51 biên dịch thử mà k đc.
                  KeilC báo lỗi "tage not creat"
                  Mide 51 báo lỗi trong 1 khung nhỏ "Assembly not......"

                  Comment


                  • #84
                    chưa dịch thử nhưng nhìn có lẻ lệnh call ko được phải dùng lcall

                    Comment


                    • #85
                      bạn dùng thử chương trình nạp read51 đi....

                      Comment

                      Về tác giả

                      Collapse

                      Tuananh_95 Tìm hiểu thêm về Tuananh_95

                      Bài viết mới nhất

                      Collapse

                      Đang tải...
                      X