It enters a loop waiting for the user to press one of the four pushbuttons. If a return character is received, the program interprets the message as a query requiring a response from the user. 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. The second move-back step is necessary because the LCD automatically advances the cursor. Space, prints a blank (space) character to blot out the character that was there, and then moves back again. If a backspace is received, the program moves the LCD cursor back one If it is not one of these, the program prints it on the display, and re-enters the waiting-for-data loop. When a character arrives, it is checked against a short list of special characters (backspace, control-C, and return). After initialization, the program enters a loop waiting for the arrival of a character via the 2400-baud RS-232 interface. sets the To display to print to right, and enables anthe underline eliminate anyfrom strayleft characters, the program clears the screen. When power is first applied, the BASIC program These chips are at the heart of LCD’s ranging in size from two lines of four characters (2x4) to 2x40. The liquid-crystal display (LCD) used in this project is based on the popular Hitachi 44780 controller IC. The BASIC Stamp’s ease of programming and built-in support for serial communications make it a good candidate for such userinterface applications. At various locations, users communicate with the main system via small terminals that display system status and accept inputs. Many systems use a central host computer to control This application note presents a program in PBASIC thatĮnables the BASIC Stamp to operate as a simple user-interface user-interface terminal.
0 Comments
Leave a Reply. |