Học PIC từ cơ bản-5

Tham khảo sách 'học pic từ cơ bản-5', 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ả | Gooligum Electronics 2009 Introduction to PIC Programming Programming Baseline PICs in C by DavidMeiklejohn Gooligum Electronics Lesson 5 Analog Comparators Baseline lesson 9 explained how to use the analog comparators and absolute and programmable voltage references available on baseline PICs such as the PIC16F506 using assembly language. This lesson demonstrates how to use C to access those facilities re-implementing the examples using the free HI-TECH C1 in Lite mode PICC-Lite and CCS PCB compilers introduced in lesson 1 . In summary this lesson covers Basic use of the analog comparator modules available on the PIC16F506 Using the internal absolute V voltage reference Configuring and using the internal programmable voltage reference Enabling comparator output to facilitate the addition of external hysteresis Wake-up on comparator change Driving Timer0 from a comparator output with examples for HI-TECH C PICC-Lite and CCS PCB. Comparators As we saw in baseline lesson 9 an analog comparator is a device which compares the voltages present on its positive and negative inputs. In normal non-inverted operation the comparator s output is set to a logical high only when the voltage on the positive input is greater than that on the negative input otherwise the output is low . As such they provide an interface between analog and digital circuitry. In the circuit shown on the right the comparator output will go high lighting the LED only when the potentiometer is set to a position past half-way . positive input is greater than V. Comparators are typically used to detect when an analog input is above or below some threshold or if two comparators are used within a defined band - very useful for working with many types of real-world sensors. They are also used with digital inputs to match different logic levels and to shape poorly defined signals. 1 PICC-Lite was bundled with versions of MPLAB up to . HI-TECH C earlier known as HI-TECH C .

Bấm vào đây để xem trước nội dung
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
Đã 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.