PDA

View Full Version : master HSEROUT to mixed slaves



Dennis
- 19th December 2009, 23:54
Hi all

This may be a simple or silly question but I am curious to know whether or not I can send data with HSEROUT and receive it on another PIC or PICS using something like SERIN,SERIN2or DEBUG and what the best choice would be.
Up until now I have only used the same both sides, in other words if the transmitter is using HSEROUT then te receiver(s) use HSERIN
The reason I am asking is because I would like to use hardware usart on a transmitter PIC (yes, one that supports it!) and use any other pic as a receiver (one that does not have a usart)

Any info would be appreciated

Kind regards
Dennis

Charles Linquis
- 20th December 2009, 02:37
It works perfectly. You just have to make certain that you have the right state. HSEROUT "idles" high, and that generally can't be changed.

Of course, it works in reverse as well. You can use SEROUT2 to send messages to another PIC that has a hardware receive port.

Dennis
- 21st December 2009, 01:59
Hi Charles

Thanks a million for the reply :)
Not quite sure what you mean by the right ildles?
Are you referring to wait states ?
Care to elaborate some more?

Kind regards

Dennis

Charles Linquis
- 21st December 2009, 02:33
Not wait states. I'm referring to the SERIN2 MODE. You have the option of TRUE and INVERTED. You will want INVERTED.

Dennis
- 21st December 2009, 02:35
Thanks Charles,

I will try it with SERIN/OUT :-)

Keep well

Dennis

Archangel
- 21st December 2009, 04:43
Hi Charles


Not quite sure what you mean by the right idles?

Kind regards

Dennis
When no communication is going on, the port status is high for TRUE and Low for Inverted. The resistors should pull the port to to the appropriate idle state.

Dennis
- 21st December 2009, 07:35
Hey Joe

Thanks for the clarification and tip :-)
So to confirm ..
If mode is set TRUE a pull-up is required (any recommended value in particular?)
and if mode is set to Inverted a pull-down resistor is needed.
Would this prevent a possible 'floating' PIN and reduce the garbage received ?

Kind regards
Dennis

Archangel
- 21st December 2009, 16:44
Hey Joe

Thanks for the clarification and tip :-)
So to confirm ..
If mode is set TRUE a pull-up is required (any recommended value in particular?)
and if mode is set to Inverted a pull-down resistor is needed.
Would this prevent a possible 'floating' PIN and reduce the garbage received ?

Kind regards
Dennis
I like something around 4 to 5 K, enough to handle it without too much power waste. I suppose that is a way of looking at it, as I see it, True switches the circuit to a low status and the pull up returns it to high and inverted switches it to high and pull down returns to a low idle state. Now I'm going to say this with <b>absolutely NO AUTHORITY</b>, As I picture it in my mind, the communication must switch between low and open impedance for true "and/or" high and open impedance for inverted, and the resistors make the circuit.