I confused a little about serial port library example. Can I consider this like software uart example similar to arduino softwareserial library?
I confused a little about serial port library example. Can I consider this like software uart example similar to arduino softwareserial library?
Hi,
The SoftwareSerial library in Arduino implements UART in software("bit banging"). It has several known limitations, e.g. if using multiple software serial ports, only one can receive data at a time.
The Serial port library in the SDK is designed as a more sophisticated replacement for the app_uart module, with Multi-instance capability, configurable buffers and more robust and generic API. It does not implement any “software” UART. The Multi-instance capability in the serial port library is very useful in e.g. the nRF52840 where you have 2 hardware UARTE instances.
Hi,
The SoftwareSerial library in Arduino implements UART in software("bit banging"). It has several known limitations, e.g. if using multiple software serial ports, only one can receive data at a time.
The Serial port library in the SDK is designed as a more sophisticated replacement for the app_uart module, with Multi-instance capability, configurable buffers and more robust and generic API. It does not implement any “software” UART. The Multi-instance capability in the serial port library is very useful in e.g. the nRF52840 where you have 2 hardware UARTE instances.
Thanks. So can I use this library in situation where I would use arduino softwareserial library? For example I need to communicate with 3 chips via uart. Can I solve this task by serial port library?
You can have maximum 2 instatnces, so biderctional communication is possible with 2 chips only.
ok. How many if I need only rx line on 9600bps
You can have still two instances of UARTE but there is almost no problem to connect Tx line from nrf52 to more receivers.
The only limitation that comes to my mind is related with current "consumption" of each node from Tx line. If there will be too many devices UARTE signal might have too big voltage drop to be correctly interpreted.