newbie Q:some basics to the can and profibus

Hi,

I'm currently on a project, where we need either a can or a profibus connection to an embedded system (atmega 128 avr-device).

Well I started to and found that for can-bus there are some can-buscontollers e.g. MCP2510 available, that (as I understand), are doing the whole comunication stuff.

My first question might sound trivially to you: Is it so, that I have to connect all devices on the can bus to the same physical wires (canSend and canRecieve)? Or do I need another phy-driver (e.g PCA82C250)? Is there a well defined protokoll also necessary or is that done by the controller: My idea is something like: The atmega tells the canbus controller: Send to device 2 the start-command...Is there a difference in implementing an master or slave device?

On the other hand, the profibus can be hardware based on the rs485. So an simple I/O driver (e.g. maxim) should work. But as I understand, I'd have to implement the profibus protokoll (I need the dp Variant) in the avr, right? I didn't find a controller, but at profichip.com an asic probably doing some protokollstuff is selled? Any experience with this? Is there a difference in implementing an master or slave device?

Ok a lot of newbie question. Perhaps you have some answers. Thanks in advance.

Michael

--
Remove the sport from my address to obtain email
www.enertex.de - Innovative Systemlösungen der Energie- und Elektrotechnik
Reply to
Michael Schuster
Loading thread data ...

Your further question cast serious doubt on this "need". How can you know you need a CAN bus connection when you apparently have no idea how CAN bus works?

Depends on the particular CAN controller (in other words: RTF datasheet). But typically, CAN handling is indeed split into two separate chips, MAC and PHY. This is so you can use whatever type of physical connection you want, and still use the same MAC. There are also controllers that have a CAN MAC integrated, too.

Since mention your MAC has canSend and canReceive pins coming out of it, odds are you will need a PHY chip to go with it --- the actual CAN bus has no such lines, but just two wires 'can+' and 'can-' that form a differential signal.

CAN itself only defines a transport layer, no routing or application protocols. There are quite a number of pre-defined protocols on top of CAN. You'll have to decide for yourself whether you want (or can) use one of those, or roll your own.

No. That's because CAN doesn't distinguish between masters and slaves. Your protocol may, but that's a different story.

--
Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.
Reply to
Hans-Bernhard Broeker

I have to connect to devices which are available either with CAN or profibus interface

[snip]

Ah, I see. Thanks, you made things more clearly to me.

Michael

--
Remove the sport from my address to obtain email
www.enertex.de - Innovative Systemlösungen der Energie- und Elektrotechnik
Reply to
Michael Schuster

Also I have found now the

formatting link
(it's rather near to our office) and bought two excellent books on CAN (Lawrenz) band CanOpen(VDE Verlag). They also have an international Internetshop. Michael

--
Remove the sport from my address to obtain email
www.enertex.de - Innovative Systemlösungen der Energie- und Elektrotechnik
Reply to
Michael Schuster

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.