Abstract

This chapter describes how the power of PicBasic is used to communicate with a PC serial port using RS232 format. PicBasic is used to drive a parallel Liquid Crystal Display (LCD) module. The chapter focuses on how to control a LCD module and how to communicate using the SERIN and SEROUT commands. For this, it illustrates three projects. First, Driving an LCD Module, this project shows how the PicBasic (PBC) and PicBasic Pro (PBPro) compilers differ while performing the same task and shows the basic structure for controlling a LCD. This project illustrates that PBC can do a lot, but PBPro can do more. Second project, Serial Communication, sends a menu of commands to the PC to be displayed in the terminal window. Selection is made from that menu and is sent back from the terminal window, through the serial port, and back to the PIC circuit. Based on which selection is made at the PC, the PIC will respond with a message or change the state of an LED. From this it is shown how a PIC-based module could be controlled directly from a PC serial port. The third project, Driving an LCD with a Single Serial Connection, combines the first two projects into one by creating a serial LCD module. The idea is to receive information through the serial port and then display the information on the LCD. This allows a serial port from any PC or another PIC to drive the LCD with a single serial connection. These are good learning projects because many of PicBasic projects will require some way to communicate information to other humans while the PIC is running. It can even be used to display variable data so that one can monitor if the program is running correctly.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call