Serial -- Hardware


In the previous exercise, you had complete freedom to communicate serially on any pins you wanted. That's because we were using software emulation of the RS-232 protocol. That flexibility does demand a price however: more software/runtime resources are consumed.

But with hardware serial communication, the point of this exercise, such is not the case. A module within the PIC takes on the business of communication for you. The only tradeoff is that we must use that module's dedicated pins. For the PIC16F88, that will be Port B.2 for serial-input, and Port B.5 for serial-output.

Other than that, the operation of this exercise is virtually identical to the previous, so I'll point you there for details. The circuit is the same, but I'll repeat it here for your convenience:


When you scan the code, be sure to note that I'm now using the PMP hardware serial library unit, entitled simply, "Serial.pas."

Click to get the source code.
Click to get the schematic PDF.

Next Project: RS-232 via the MAX3232

No comments:

Post a Comment