BASIC Stamp I Application Notes

Điều này lưu ý ứng dụng trình bày một chương trình trong đó PBASIC Cho phép các Stamp BASIC để vận hành như một thiết bị đầu cuối giao diện người dùng đơn giản. Background. Nhiều hệ thống sử dụng một máy chủ trung tâm đến chức năng điều khiển từ xa. Tại địa điểm khác nhau, người sử dụng Giao tiếp với hệ thống chính thông qua thiết bị đầu cuối nhỏ đó hiển thị tình trạng hệ thống và chấp nhận đầu vào | 1 LCD User-Interface Terminal BASIC Stamp I Application Notes Introduction. This application note presents a program in PBASIC that enables the BASIC Stamp to operate as a simple user-interface terminal. Background. Many systems use a central host computer to control remote functions. At various locations users communicate with the main system via small terminals that display system status and accept inputs. The BASIC Stamp s ease of programming and built-in support for serial communications make it a good candidate for such userinterface applications. The liquid-crystal display LCD used in this project is based on the popular Hitachi 44780 controller IC. These chips are at the heart of LCD s ranging in size from two lines of four characters 2x4 to 2x40. How it works. When power is first applied the BASIC program initializes the LCD. It sets the display to print from left to right and enables an underline cursor. To eliminate any stray characters the program clears the screen. After initialization the program enters a loop waiting for the arrival of a character via the 2400-baud RS-232 interface. When a character arrives it is checked against a short list of special characters backspace control-C and return . If it is not one of these the program prints it on the display and re-enters the waiting-for-data loop. If a backspace is received the program moves the LCD cursor back one 1 Parallax Inc. BASIC Stamp Programming Manual Page 71 BASIC Stamp I Application Notes 1 LCD User-Interface Terminal space prints a blank space character to blot out the character that was there and then moves back again. The second move-back step is necessary because the LCD automatically advances the cursor. If a control-C is received the program issues a clear instruction to the LCD which responds by filling the screen with blanks and returning the cursor to the leftmost position. If a return character is received the program interprets the message as a query requiring a response .

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.