A discussion group for the PICMicro microcontroller. Also called the Microchip PIC, this list is dedicated to the use and abuse of this fine, simple, microcontroller. Close to topic posts are welcome, ie. general electronics.
|
Hi- I'm pretty new to this PIC programming stuff, but I was wondering if anyone has examples of PIC RS-485 communication to share. I've searched the archives of this list as well as other websites and have not been able to find any actual code examples. Hope someone might be able to help. Thanks, -- Matt |
|
|
|
You might want to look at: http://www.maxim-ic.com/appnotes.cfm/appnote_number/1063/ln/en There are a number of app notes available at www.maxim-ic.com, just search the site. It is important to note that RS-485 is an electrical specification for signal transmission, not a commmunication protocol. The protocol is built on top of RS-485 and may be system specific. --- In , "Matt" <mws715@y...> wrote: > Hi- > > I'm pretty new to this PIC programming stuff, but I was wondering if > anyone has examples of PIC RS-485 communication to share. I've > searched the archives of this list as well as other websites and have > not been able to find any actual code examples. > > Hope someone might be able to help. Thanks, > > -- > Matt |
|
|
|
Thanks. As far as software is concerned, I can probably adapt something intended for RS-232? Basically the PIC needs to listen for its ID and then send the appropriate data? -- Matt --- In , "rtstofer" <rstofer@p...> wrote: > > You might want to look at: > http://www.maxim-ic.com/appnotes.cfm/appnote_number/1063/ln/en > > There are a number of app notes available at www.maxim-ic.com, just > search the site. > > It is important to note that RS-485 is an electrical specification > for signal transmission, not a commmunication protocol. The protocol > is built on top of RS-485 and may be system specific. > > --- In , "Matt" <mws715@y...> wrote: > > Hi- > > > > I'm pretty new to this PIC programming stuff, but I was wondering > if > > anyone has examples of PIC RS-485 communication to share. I've > > searched the archives of this list as well as other websites and > have > > not been able to find any actual code examples. > > > > Hope someone might be able to help. Thanks, > > > > -- > > Matt |
|
|
|
Right, and the USART on the 16F877 has a scheme for detecting an address byte (parity set). See section 10.2.3 of the datasheet. Lots of details to work out on the Master - how to deal with no response, etc. But the schemes that work for RS232 will work for RS485. --- In , "Matt" <mws715@y...> wrote: > Thanks. As far as software is concerned, I can probably adapt > something intended for RS-232? Basically the PIC needs to listen for > its ID and then send the appropriate data? > > -- > Matt > > --- In , "rtstofer" <rstofer@p...> wrote: > > > > You might want to look at: > > http://www.maxim-ic.com/appnotes.cfm/appnote_number/1063/ln/en > > > > There are a number of app notes available at www.maxim-ic.com, just > > search the site. > > > > It is important to note that RS-485 is an electrical specification > > for signal transmission, not a commmunication protocol. The > protocol > > is built on top of RS-485 and may be system specific. > > > > --- In , "Matt" <mws715@y...> wrote: > > > Hi- > > > > > > I'm pretty new to this PIC programming stuff, but I was wondering > > if > > > anyone has examples of PIC RS-485 communication to share. I've > > > searched the archives of this list as well as other websites and > > have > > > not been able to find any actual code examples. > > > > > > Hope someone might be able to help. Thanks, > > > > > > -- > > > Matt |
|
with the remark that you may have a half duplex (2wire) or a full duplex(4wire) EIA485 connection. If choose half duplex, then the slave remains in receive state and jump as transmitter only after it receives the ID. At 115200 you need failsafe bias on the end of the network. On Mon, 30 Jun 2003, Matt wrote: > Thanks. As far as software is concerned, I can probably adapt > something intended for RS-232? Basically the PIC needs to listen for > its ID and then send the appropriate data? > > -- > Matt > > --- In , "rtstofer" <rstofer@p...> wrote: > > > > You might want to look at: > > http://www.maxim-ic.com/appnotes.cfm/appnote_number/1063/ln/en > > > > There are a number of app notes available at www.maxim-ic.com, just > > search the site. > > > > It is important to note that RS-485 is an electrical specification > > for signal transmission, not a commmunication protocol. The > protocol > > is built on top of RS-485 and may be system specific. > > > > --- In , "Matt" <mws715@y...> wrote: > > > Hi- > > > > > > I'm pretty new to this PIC programming stuff, but I was wondering > > if > > > anyone has examples of PIC RS-485 communication to share. I've > > > searched the archives of this list as well as other websites and > > have > > > not been able to find any actual code examples. > > > > > > Hope someone might be able to help. Thanks, > > > > > > -- > > > Matt > > to unsubscribe, go to http://www.yahoogroups.com and follow the instructions |
|
|
|
I believe we should be thinking physical versus protocol. RS485 is the physical layer for multi-drop differential voltage (balanced) transmission, what protocol you put on top of it is up to you. --- Vasile Surducan <> wrote: > with the remark that you may have a half duplex (2wire) or a full > duplex(4wire) EIA485 connection. If choose half duplex, then the > slave > remains in receive state and jump as transmitter only after it > receives > the ID. At 115200 you need failsafe bias on the end of the network. > > On Mon, 30 Jun 2003, Matt wrote: > > > Thanks. As far as software is concerned, I can probably adapt > > something intended for RS-232? Basically the PIC needs to listen > for > > its ID and then send the appropriate data? > > > > -- > > Matt > > > > --- In , "rtstofer" <rstofer@p...> wrote: > > > > > > You might want to look at: > > > http://www.maxim-ic.com/appnotes.cfm/appnote_number/1063/ln/en > > > > > > There are a number of app notes available at www.maxim-ic.com, > just > > > search the site. > > > > > > It is important to note that RS-485 is an electrical > specification > > > for signal transmission, not a commmunication protocol. The > > protocol > > > is built on top of RS-485 and may be system specific. > > > > > > --- In , "Matt" <mws715@y...> wrote: > > > > Hi- > > > > > > > > I'm pretty new to this PIC programming stuff, but I was > wondering > > > if > > > > anyone has examples of PIC RS-485 communication to share. I've > > > > searched the archives of this list as well as other websites > and > > > have > > > > not been able to find any actual code examples. > > > > > > > > Hope someone might be able to help. Thanks, > > > > > > > > -- > > > > Matt > > > > > > > > to unsubscribe, go to http://www.yahoogroups.com and follow the > instructions > > > > > > > __________________________________ |