- Discrete LEDs
- Dot/Bar LEDs
- Matrix LEDs
- 7-Seg LEDs
- LCDs
- Switches
- KBDs
- Sensors
- Motors
- Analog
-
Comm
- Serial -- Software
- Serial -- Hardware
- RS-232 via the MAX3232
- I2C -- EEPROM
- I2C -- DS1307 Real Time Clock
- 1-Wire -- DS18B20, Powered, Single-Drop
- 1-Wire -- DS18B20, Powered, Multi-Drop
- 1-Wire -- DS18B20, Parasitic, Multi-Drop
- TI Link Protocol -- Calculator Demo
- Infrared Communication
- MIDI -- Output Demo
- MIDI -- Input Demo
- MIDI to Analog Synth
- Miscellaneous
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
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment