The Arduino hardware has built-in support for serial communication on pins 0 and 1( which also goes to the computer via the USB connection). The native serial support happens via a piece of hardware(built into the chip) called a UART. This hardware allows the Atmega chip to receive serial communication even while working on other tasks, as long as there room in the 64 byte serial buffer.
Limitations
- Only speeds up to 9600 baud work
- Serial.available() doesn't work
- Serial.read() will wait until data arrives
- Only data received while Serial.read() is being called will be received. Data received at other times be lost, since the chip is not "listening".
SoftwareSerialExample
댓글 없음:
댓글 쓰기