I need to add one more serial bus and I can't change my PCB. Only free pins are I2C pins at 43 and 44, or Arduino 20 and 21. Does SoftwareSerial or any serial bus work with them?
SoftwareSerial lists the following for Mega2560 10, 11, 12, 13, 14, 15, 50, 51, 52, 53, A8 (62), A9 (63), A10 (64), A11 (65), A12 (66), A13 (67), A14 (68), A15 (69).but the schematic says there is (SCL/INT0) PD0, somekind of interrupt?
It looks dark...
Yeah. Not good.
Every PCB can be changed by cuts and new connections.
The Arduino Software serial refenence seems clear, RX is only supported on 'change interrupts'
These are labelled as PCINT0 etc.
I need to check Arduino pins 20 or 21 on Mega2560. Or Package pins 44 or 43. I need one serial port somehow and either this or a new pcb.
srnet:
The Arduino Software serial refenence seems clear, RX is only supported on 'change interrupts'These are labelled as PCINT0 etc.
When I read about INT0, I noticed that it can be configured to work in many ways, isn't Pin change one of them. I atleast thought so.
Pin change interrupts and external interrupts are two different things.
See datasheet on details on that; also on which pins support pin change interrupts (which on the Mega2560 is only a few I remember - it's a bit of an oddball in that respect).
I understand. One question still, is there a way to read a few characters at 9600 bauds from a I2C pin. It can block while it reading, but not other times.
I have peripheral which gives short strings (with LF) sometimes, and I need to check whether it is "open" or whatever we want.
You could free up a few digital by maybe using the analog pins , or you could add, for example, an I2C digital I/O board.
Pcf8575
Is there a way to add 2 jumper wires from pins that support software serial to pins that have external connections on your design?
I have a problem because only unused connector on our board is for I2C 43/44/20/21. The CPU is Mega2560. And our new add on sends serial data. Is there a suitable library, blocking if there is nothing else.
I quess we could add jumpers once or twice, but not for every board. RX2 is free yes, but I wonder who could do it here, I am not not willing to try myself.
Extra boards like I2C adapter, or handmade circuit onto some perforated board would work, but first I would like to check SW only solution. An extra Arduino board is always one possible solution, for a single demo machine.
I asked this in Programming forum also, but is there serial receive library which works on any pin? Without pin change interrupt. 20 and 21 pins have INT0 and INT1 interrupts
TOPIC MERGED.
Could you take a few moments to Learn and Use The Forum
It will help you get the best out of the forum in the future.
-
Your OS and version can be valuable information, please include it along with extra security you are using.
-
Always list the version of the IDE you are using and the board version if applicable.
-
Use quote or add error messages as an attachment NOT a picture.
-
How to insert an image into your post. ( Thanks @sterretje )
-
Add your sketch where applicable but please use CODE TAGS ( </> )
-
Add a SCHEMATIC were needed even if it is hand drawn
-
Add working links to any specific hardware as needed (NOT links to similar items)
-
Remember that the people trying to help cannot see your problem so give as much information as you can
COMMON ISSUES
-
Ensure you have FULLY inserted the USB cables.
-
Check you have a COMMON GROUND where required. ( Thanks @Perry)
-
Where possible use USB 2.0 ports or a USB 2.0 POWERED HUB to rule out USB 3.0 issues.
-
Try other computers where possible.
-
Try other USB leads where possible.
-
You may not have the correct driver installed. CH340/341 or CP2102 or FT232 VCP Drivers - FTDI
-
There may be a problem with the board check or remove your wiring first.
-
Remove any items connected to pins 0 and 1.
COMPUTER RELATED
-
Close any other serial programs before opening the IDE.
-
Ensure you turn off any additional security / antivirus just to test.
-
There may be a problem with the PC try RESTARTING it.
-
You may be selecting the wrong COM port.
-
Avoid cloud/network based installations where possible OR ensure your Network/Cloud software is RUNNING.
-
Clear your browsers CACHE.
-
Close the IDE before using any other serial programs.
-
Preferably install IDE’s as ADMINISTRATOR or your OS equivalent
ARDUINO SPECIFIC BOARDS
-
CH340/341 based clones do not report useful information to the “get board info” button.
-
NANO (Old Types) some require you to use the OLD BOOTLOADER option.
-
NANO (ALL Types) See the specific sections lower in the forum.
-
NANO (NEW Types) Install your board CORE’s.
-
Unless using EXTERNAL PROGRAMMERS please leave the IDE selection at default “AVRISP mkII”.
-
Boards using a MICRO usb connector need a cable that is both DATA and CHARGE. Many are CHARGE ONLY.
CREATE editor install locations.
-
On macOs ~/Applications/ArduinoCreateAgent-1.1/ArduinoCreateAgent.app/Contents/MacOS/config.ini
-
On Linux ~/ArduinoCreateAgent-1.1/config.ini
-
On Windows C:\Users[your user]\AppData\Roaming\ArduinoCreateAgent-1.1
Performing the above actions may help resolve your problem without further help.
Language problem ?
Try a language closer to your native language:
Thanks to all those who helped and added to this list.
Transmission no problem; receiving is a problem: without interrupts it's very likely you miss the start of a transmission (you have only just over 100µs to catch the start bit, assuming 9600 bps, less at higher speeds).
There is a send only software serial library.
If the was a library that could receive serial on any digital pin you would expect it to be popular.
srnet:
If the was a library that could receive serial on any digital pin you would expect it to be popular.
I don't think the demand for such a library is that great. SoftwareSerial works on any pin of the Uno/Nano/Pro Mini, and there's very little demand for this on the Mega which has multiple hardware Serial already (plus a whole bunch of pins that do support SoftwareSerial - may take a little planning but with that many pins on the Mega that shouldn't be much of an issue).
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.
