Question about pin assignment
Don M
Posts: 1,652
For example let's say I have PST (or any serial terminal program for that matter) connected to P30 & P31 using fullduplexserial.spin and I have a WiFi module's uart pins connected to P20 & P21. I would have a menu system in my spin code to perform various functions through P30 & P31 with PST.
Now let's say that one of the menu selections might be to configure the WiFi module through it's uart connection using PST. Assuming that P30 & P20 are RX and P31 & P21 are TX respectively could I do something like:
to temporarily re-assign the flow of serial commands?
If it can be done would the baud rate follow through to the new pins and how would I un-assign these (turn that feature off)? Can I do this without launching another instance of fullduplexserial.spin?
Or is there a better way of doing this? Maybe this is a dumb suggestion I don't know......
Thanks.
Don
Now let's say that one of the menu selections might be to configure the WiFi module through it's uart connection using PST. Assuming that P30 & P20 are RX and P31 & P21 are TX respectively could I do something like:
if (some selection is made to program WiFi) ina[20] := ina[30] outa[21] := outa[31]
to temporarily re-assign the flow of serial commands?
If it can be done would the baud rate follow through to the new pins and how would I un-assign these (turn that feature off)? Can I do this without launching another instance of fullduplexserial.spin?
Or is there a better way of doing this? Maybe this is a dumb suggestion I don't know......
Thanks.
Don
Comments
you can not do it like you wrote. Pin-redirection is a feature that will be included in P2 (group-wise) but is not there in P1
But you can Start a second Fullduplexserial on P20/21 and then read one and write to the other in a loop.
Both Fullduplexserial can have different BaudRates als lon gas your buffers are big enought.
so FDS1 talking to PST and FDS2 talking to you WIFI module.
then you can do something like this
Enjoy!
Mike