Practical Arduino Cool Projects for Open Source Hardware- P20

Practical Arduino Cool Projects for Open Source Hardware- P20: A schematic or circuit diagram is a diagram that describes the interconnections in an electrical or electronic device. In the projects presented in Practical Arduino, we’ve taken the approach of providing both a photograph and/or line drawing of the completed device along with a schematic. While learning to read schematics takes a modest investment of your time, it will prove useful time and time again as you develop your projects. With that in mind, we present a quick how-to in this section | CHAPTER 10 WATER FLOW GUAGE the R W pin to ground on the module we re down to a total of 12 connections to the LCD module 10 of which are using up the limited number of I O lines available on the Arduino eight data bits Enable RS Ground and 5V. It s still a bit of a rat s nest and uses up almost all of the limited number of I O lines available on the Arduino. The RS connection is the Register Select line and it s used to switch between command and data modes in the LCD. We can t tie it permanently HIGH or LOW like the Enable connection because the LCD drivers use it to initialize the module and then send data to it. Luckily the HD44780 can also operate in 4-bit mode a strange mode that s something like a cross between a parallel and a serial interface. In 8-bit mode an entire byte is presented at once to the data lines. In 4-bit mode half a byte called a nibble is presented to four of the data lines and read into the LCD controller then the other half of the byte is presented and read in the same way. The LCD controller then reassembles the two nibbles into a complete byte internally just as if it had all been transmitted at once. Using 4-bit mode saves us another four connections to the controller bringing it down to a total of eight wires including power and ground. That s six data lines on the Arduino taken up just driving the LCD which isn t ideal but does leave enough I O lines available for us to connect the buttons and Halleffect flow sensor. If you re really running short of I O lines in a project and need to reduce the number of connections to an LCD module even further you can use a device called a shift register such as a 74HC4094. A shift register acts as a serial-to-parallel converter allowing you to use just three data lines to send a sequence of bits in series that are then exposed in parallel on the shift register outputs. Using a 74HC4094 to connect an HD44780 to an Arduino is more complicated than connecting it up directly but it drops the I O .

Không thể tạo bản xem trước, hãy bấm tải xuống
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.