No chance. That takes pins. I'm using all of them already.
No chance. That takes pins. I'm using all of them already.
Charles Linquist
Without knowing more about you application, I would say that you are running out resources with a PIC18. May be time to look at more powerful hardware and/or software.
What if...and this is a big ol' what if...
Since you're already using the first UART for serial, that pin is taken up...
The 2nd serial port is 'free' for the moment but you want to use it, but can't because there's not enough space for the code.
How about you use that second serial port pin as an I/O and use it to 'steer' the 1st UART's output (and/or input if need be).
I think the code impact would be minimal, just set a pin high or low depending on where the serial has to go...
You won't believe this, but I do that trick already. I use a 74HCT125 as a data selector to switch between an RS-232 port, and a Lantronix XPORT (which does telnet).
What I really need is HSERINx/HSEROUTx !!!
Charles Linquist
Oh...I believe it...
Sounds like you're into messing with HSERIN in the libs then!What I really need is HSERINx/HSEROUTx !!!
Maybe you could throw a 'PORT QUALIFIER' as the first character of every HSEROUT statement which would trip another I/O select pin into said library function.
I.E.
HSEROUT ["1", data, data, data]
would always go to the first port
HSEROUT ["2", data, data, data]
would always go to the second port
I would think it wouldn't be that hard to modify the libraries to do recognize the first character in the output stream and switch ports accordingly.
In fact, I'm going to have a look at the libraries right now...
Just had a quick look see at the library and it's immediately obvious that modifying the library to do what I suggested above will add a lot more code than just using HSEROUT2.
I don't support you could post the source...maybe we could find a few places to save some code space for you. I'm up for it...
Sorry, can't post the code (it is the property of the company I work for).
But, you are probably correct in stating that the extra assy structures needed to switch between TX/RX REG1 and TX/RX REG2 would add too much code also.
I'll have to look into this more.
Charles Linquist
I really appreciate the offer, though. I just saw where I can do some "compacting" myself.
One part that takes up too much space - I have a complete SNMP agent running. I'll start there.
Charles Linquist
Bookmarks