TAILIEUCHUNG - Robotics Part 13

Tham khảo tài liệu 'robotics part 13', kỹ thuật - công nghệ, cơ khí - chế tạo máy phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | 288 Robotics a transparent segment of the disc lies between the source and detector the corresponding output is 1 and when an opaque sector lies between the source and detector the corresponding output is 0. Thus the output alternates between 1 and 0 as the shaft is turned see Figure . DESIGN OF THE circuitry Figure represents the schematic representation of the circuit to be used to read pulses from the encoder. The pulse is read at the input pin no. 14. The pin attains the states 0 or 5 V when an opaque and transparent section crosses the receiver. By counting this change of states the angular seed of the wheel can be computed. This is discussed in the next section. Classification of Sensors 289 FIGURE Representation of the encoder wheel. READING THE pulses in a computer After reading the pulse from the encoder it is possible to count the pulses doing the polling. The software continuously samples an input pin pin 14 with the detector signal on it and increments a counter when that signal changes state. However it is difficult to do anything else with the software while you are doing this polling because a pulse may be missed while the software is off 5 V regulated power supply Wheel 1k To parallel port Input pin . FIGURE The circuit for the encoder. Ground 290 Robotics doing something like navigation or controlling the motors. But there is a better way. Many processors have interrupt capabilities. An interrupt is a hardware software device that causes a software function to occur when something happens in the hardware. Specifically whenever the detector A pulse goes high the processor can be interrupted such that it suspends its ongoing navigation or motor control task runs a special software routine called an interrupt handler which can compute the new distance traveled. When the interrupt handler is done the processor automatically returns to the task it was working on when the interrupt occurred. The working program to 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.