TAILIEUCHUNG - Interfacing PIC Microcontrollers 16

Interfacing PIC Microcontrollers 16. Explore in detail microcontroller interfacing techniques using the popular PIC 16F877 Work through step-by-step examples interactively using circuit simulation software, supplied as assembly source code Gain the knowledge of a wide range of peripheral devices such as keyboards, displays, sensors and drives and serial communication with other processors, memory and more Use interactive simulation software to design and test circuits. | Interfacing PIC Microcontrollers SUBROUTINES INCLUDE Include display routines Convert 16 bit binary result to 5 digits onv MOVF CCPR1L W Get high byte MOVWF Lobyte and store MOVF CCPR1H W Get low byte MOVWF Hibyte and store MOVLW 06 Correction value BCF STATUS C prepare carry flag ADDWF Lobyte add correction BTFSC STATUS C and carry INCF Hibyte in required CLRF Tents clear ten thousands register CLRF Thous clear thousands register CLRF Hunds clear hundreds register CLRF Tens clear tens register CLRF Ones clear ones register Subtract 10000d 2710h and count ub10 MOVLW 010 get low byte to sub BSF STATUS C get ready to subtract SUBWF Lobyte sub 10h from low byte BTFSC STATUS C borrow required GOTO sub27 no - sub high byte MOVF Hibyte F yes - check high byte BTFSS STATUS Z zero GOTO take1 no - take borrow MOVLW 010 yes - load low byte to add BCF STATUS C get ready to add ADDWF Lobyte restore low byte GOTO subE8 next digit ake1 DECF Hibyte take borrow ub27 MOVLW 027 get high byte to sub BSF STATUS C get ready to subtract SUBWF Hibyte sub from high byte BTFSS STATUS C borrow taken GOTO done1 yes - restore remainder INCF Tents no - count ten thousand GOTO sub10 sub 10000 again lone1 MOVLW 010 restore. BCF STATUS C get ready to add ADDWF Lobyte restore low byte BTFSC STATUS C Carry into high byte INCF Hibyte yes - add carry to high byte MOVLW 027 restore. ADDWF Hibyte .high byte Subtract 1000d 03E8 and count ubE8 MOVLW 0E8 get low byte to sub BSF STATUS C get ready to subtract SUBWF Lobyte sub from low byte BTFSC STATUS C borrow required GOTO sub03 no - do high byte MOVF Hibyte F yes - check high byte BTFSS STATUS Z zero GOTO take2 no - take borrow MOVLW 0E8 load low byte to add BCF STATUS C get ready to add ADDWF Lobyte restore low byte GOTO sub64 next digit ake2 DECF Hibyte take borrow ub03 MOVLW 03 get high byte BSF STATUS C get ready to subtract SUBWF Hibyte sub from high byte BTFSS STATUS C borrow taken GOTO done2 yes - restore high byte INCF Thous no - count

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.