hi guys,
I wanted to know How are Protocols Like Can Bus Protocol implemented in software.
I mean when one studies various protocol stacks theories Like Modbus ,CAN etc,we get to know their Packet formats and sizes at various OSI layers.
But even after studying various protocols i am all at sea regarding their Software or hardware implementation.
modbus can be implemented in c software (see modbus.org for spec).
You can also buy modbus stack or see their manual for getting idea on how to implement API functions.
CAN protocol is hardware protocol mostly,you should buy microcontrollers with CAN interface(AT90CAN64,32,... from atmel or STR712 from st.com) or stand alone CAN controllers(check microchip.com).
You need only to write the driver for CAN registers in the device.
You can also implement CAN in fpga.
(if u have CAN IPCore)
It is better for you to start modbus and CAN in micros then you can find your way easily at future.
CAN bus is mostly used in Car Automotive and some Industrial Automation side.
The main Objective of the CAN bus is it can tx and rx upto 1mb of datas.
Like in Car automative field 3 or 4 ECU's are used for Power train and Car safety systems (like ABS, ESP) so all these functions are inter-related.
So all this units are must be interconnected,for that purpose we are using CAN protocol. this is very efficient upto 42 m.
The standard tool used by Automotive for can development is Canalyzer. You can download a fully working demo program, not time limited, it needs the hardware to work on the can bus.
Canalyzer implements most protocols so you can get an idea by looking at the program.
hi,
for harware implementation u can use mcp2515 microchips uses spi interface, its easy to use.software for controlling is farily simple.if user target does not have spi,general i/o can be programed for spi but it costs performance
I wrote a library for the PIC18F458 to handle CAN communications, Microchip provide a few application notes to help. I managed to abstract all the hardware related code so you just use send and receive functions and the rest is handled by queues implemented in software and the interrupts.
I have only experience with Microchip - you can download following application notes related to CAN: ADN004, AN228a, AN713a, AN754 and couple of additional documents like 00876b.pdf, 91089a.pdf as well as free Microchip CANOPEN stack (incl. sources).
Some interesting CAN implementation projects can also be found here: **broken link removed**
I think it is from microchip (stand alone CAN controoler with SPI interface to micro). availability in india is a question. if required you can order in net.