In my sketch I have used my own PCINT0
after that I have added NeoSWSerial library but as far as I understand, it overrides all vectors, even if another one is used for serial as result I get compile error.
PINB - is meaning some pins from port B
so please correct me my understanding if for my PCINT I'm using PINB and for NeoSWSerial PIND then I should just uncomment NEOSWSERIAL_EXTERNAL_PCINT
correct?
and if for my PCINT I'm using PINB and for NeoSWSerial also PINB (sure not the same pins) then I should uncomment NEOSWSERIAL_EXTERNAL_PCINT and in my PCINT function I should add first line NeoSWSerial::rxISR( PINB);
correct?
not true
I setup as I mentioned above
and I get all symbols from Nano board to Serial terminal...
to honest say I cant sent back anything dont know why/how ...Im using putty and it dont want type any symbols in terminal... trying figure out what happens
In the NeoSWSerial I have uncomment NEOSWSERIAL_EXTERNAL_PCINT otherwise I get compile error
now I have connected my Nano (CH340) board with Serial-USB(CH340) board as follow
GND - GND
14 - TX
15 - RX
and start arduino
I get welcome message on both, from setup()
Now, when I type some text "how are you" on com12 (serial) and send it, I can receive it on com7 (terminal) but... I want type on terminal "ok"..
I press on terminal "o" just one key w/o enter, immediately in the terminal I get "terminal" and on serial I get "ssserial"
I press on terminal "k" just one key w/o enter, immediately in the terminal I get "terminal" and on serial I get "ssserial"
I press on terminal "enter" just one key, immediately in the terminal I get "terminal" and on serial I get "ssserial"
I press on terminal "space" just one key, immediately in the terminal I get "terminal" and on serial I get "ssserial"
when I type any key on terminal I get the same message on both
i guess you did illustrate the issue with a complete code, but i am still wondering why.
I see no purpose, and the one of the main things about any swSerial is that it is provide as a possible solution to the lack of UARTs. You have on the other hand changed it into a problem. You have not shown that you need the vector elsewhere, and why you need two Serial connections.
About the issue at hand, i think you need to create your own ISR within the class, or at least call the ISR from yours.
// visible only so the ISRs can call it...
static void rxISR( uint8_t port_input_register );
//#define NEOSWSERIAL_EXTERNAL_PCINT // uncomment to use your own PCINT ISRs
};
and i think you need to attach it through the member function
But as before, if swSerial is a solution... Great !
if it is a problem, don't use it. Choose a different board or look for a different solution.
swSerial takes up a lot of resources, and many limitations.
because ? and why in combination with PinChangeInterrupts ?
If it can be done according to that post, then why doesn't it work ? Well the OP never told us i guess.
If you want to make an XY issue out of it that's fine, but i am not here to solve puzzles without a point.
I can be her to help people solve their issue, but i am afraid your issue is not with coding at all.
serial
sesssserial
sessssssserial
sesssssssssssssssssssssssserial
so looks text on nano , when I sent it from micro to nano (NeoSwSerial Rx pin). but text was "hi people" "hello my friend !!!" etc.... the larger the text, the longer it gets, but as 'ssssssssserial'
I think you may be missing something important, if you are detecting multiple pin change interrupts on the same port as NeoSWSerial, then you only call the rxISR when the interrupt was caused by the pin being used by NeoSWSerial.
In reference to my previous comment about printing within the ISR, you are going to quickly overflow the Tx buffer if you print the input value from the port for every level transition on the Rx pin.
Your two topics on the same or similar subject have been merged.
Please do not duplicate your questions as doing so wastes the time and effort of the volunteers trying to help you as they are then answering the same thing in different places.
Please create one topic only for your question and choose the forum category carefully. If you have multiple questions about the same project then please ask your questions in the one topic as the answers to one question provide useful context for the others, and also you won’t have to keep explaining your project repeatedly.
Repeated duplicate posting could result in a temporary or permanent ban from the forum.
Could you take a few moments to Learn How To Use The Forum
It will help you get the best out of the forum in the future.
I merged the 2 topics as the second one is clearly a continuation of the first one. Anyone wishing to help you can read the whole thing for context. If you have a new topic then someone trying to help might not be aware of the original and waste their time making comments that have already been made.
So no, you don't get to have a new topic on the same subject. Please don't start one, if you do it will get added to the end of this one and you'll get a warning and possibly be prevented from posting in the forum.