EmbeddedRelated.com
Forums

ISP thru RS485

Started by subb...@gmail.com February 4, 2009
Just a thing: RS485 is in nature Half duplex. It uses one differential pair to send and receive data, but only one of these at a time. So if you plan to use RS485, it's going to be half duplex.
Although, you might be thinkin in RS422 perhaps, which has 2 differential pairs (one to send and t
he other to receive).
The latter is as straight as you describe it. just put the appropriate transceiver and that's all.

> I use RS232 to RS485 converter between board and PC. The problem is
> the ISP utility look for pin no 4(RS232 version) status, where is in
> RS485 that is being used as Rx485+..that is where the confusion is..

>>Hi,

>>I am building a system using LPC2138. I intend to have RS485 (Full duplex) interface using UART0. I like to use ISP thru RS485. I can’t have secondary RS232(for ISP purpose at least) interface due to board space constrain. Could some one guide on this.
>>Thanks in advance,
>>Regards
>>

>

>

An Engineer's Guide to the LPC2100 Series

On Wed, 4 Feb 2009 18:02:39 -0500, you wrote:

>Just a thing: RS485 is in nature Half duplex. It uses one differential pair to send and receive data, but only one of these at a time. So if you plan to use RS485, it's going to be half duplex.
>Although, you might be thinkin in RS422 perhaps, which has 2 differential pairs (one to send and t
>he other to receive).
>The latter is as straight as you describe it. just put the appropriate transceiver and that's all.
>
>> I use RS232 to RS485 converter between board and PC. The problem is
>> the ISP utility look for pin no 4(RS232 version) status, where is in
>> RS485 that is being used as Rx485+..that is where the confusion is..
>
>>>Hi,
>
>>>I am building a system using LPC2138. I intend to have RS485 (Full duplex) interface using UART0. I like to use ISP thru RS485. I can’t have secondary RS232(for ISP purpose at least) interface due to board space constrain. Could some one guide on this.
>>>Thanks in advance,
>>>Regards
>>>
You probably won't be able to use the internal bootloader ISP with 485, as it will receive copies of
everything it sends and get confused (unless your 485 hardware auto-gates the RX/TX, which is
tricky)

You would have to do your own bootloader or other means of doing firmware updates, which was aware
of the bussed nature of the comms.
That solves the problem from the PC side, but they will need to
control the flow on their board too. Either the processor will have
to control it (modified ISP?), or they will have to incorporate some
type of automatic control. Some manufacturers include schematics of
their devices as I guide. Companies like B&B Electronics come to mind.
It's probably almost as much real estate as adding an alternate RS232
port on the board.

Mark

--- In l..., Hugh Molesworth
wrote:
>
> For info: there are some RS232 to RS485 converters which
> automatically control the RS485 direction depending on which end is
> transmitting, so if your data is in command/response style message
> packets (half-duplex) then you might be able to use one of those to
> get started without modifying code. See Google.
> Hugh
>
> At 04:16 AM 2/4/2009, you wrote:
> ----Original Message----
> From: l...
> [mailto:l...] On Behalf Of
> subbiah.r@... Sent: 04 February 2009 12:09 To:
> l... Subject: [lpc2000] Re: ISP thru
> RS485
>
> > I use RS232 to RS485 converter between board and PC. The
> > problem is the ISP utility look for pin no 4(RS232
> > version) status, where is in RS485 that is being used as
> > Rx485+..that is where the confusion is..
>
> You can't just use an RS232 to 485 converter because RS485 is only
> one-way. You will need a custom ISP utility which can change the
> direction of the RS485 line.
>
> --
> Tim Mitchell
>

mehiegl wrote:
> That solves the problem from the PC side, but they will need to
> control the flow on their board too. Either the processor will have
> to control it (modified ISP?), or they will have to incorporate some
> type of automatic control. Some manufacturers include schematics of
> their devices as I guide. Companies like B&B Electronics come to mind.
> It's probably almost as much real estate as adding an alternate RS232
> port on the board.

Or add a standard ISP header
http://www.open-research.org.uk/ARMuC/Standard_ISP_Header.html

It does take some room but not a lot. Depending on the product and your
test configuration you might be able to use some sort of test pad
arrangement as well.

Robert

--
http://www.aeolusdevelopment.com/

From the Divided by a Common Language File (Edited to protect the guilty)
ME - "I'd like to get Price and delivery for connector Part # XXXXX"
Dist./Rep - "$X.XX Lead time 37 days"
ME - "Anything we can do about lead time? 37 days seems a bit high."
Dist./Rep - "that is the lead time given because our stock is live....
we currently have stock."
--- In l..., subbiah.r@... wrote:
>
>
> Hi,
>
> I am building a system using LPC2138. I intend to have RS485 (Full
duplex) interface using UART0. I like to use ISP thru RS485. I can’t
have secondary RS232(for ISP purpose at least) interface due to board
space constrain. Could some one guide on this.
> Thanks in advance,
> Regards
>

The problem is controlling the transmit enable signal on your board's
RS485 interface chip. The ISP software doesn't allow for that.

However, you can tie the RS485 transmit (normally TX from the uP) low,
then operate the enable with your transmit line (TX goes low to enable
the driver), and tie pullups and pulldowns on the bus. This gives you
the equivalent of an "wired or" on your RS485 bus. It's not really
RS485 anymore, but it will work, at least when the bus capacitance is
low (short cable). You could even add some gates to switch to the
"real RS485" scheme during normal operation.

This is how a lot of RS232/485 converters work.

-Hershel