Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Modbus code written in C for AVR chips

Status
Not open for further replies.

smitchell

Junior Member level 2
Joined
Aug 6, 2004
Messages
23
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
283
Hi,

I'm working on a project at uni where I want to implement the Modbus protocol in Atmega16's. I'm pretty new to microcontrollers so I'm using codevision to write the code instead of assembler.

I've got as far as getting a voltage reading from the ADC in a slave and transmitting it via the USART to the master and displaying it on an LCD. So now I need to start sending requests for data, which is where modbus will come in..

Does anyone have any links for Modbus code written in C for AVR chips that I could use as a reference?

In the end I guess I'll try to do it from scratch using the Modbus manual from modbus.org, but I'm a bit short on time, and my C skills are still pretty sh#thouse...

I'd much appreciate any help you guys can give me.

Thanks,

Sam
 

modbus codevision

thanks for the link, but I've only just started learning C in codevision and AVR are the first chips ive used.

I had a read through the code, and I can see how it works but I'd still like to see an example for AVR.

Does anyone know where to find some example code?

even just examples of transmitting packets, error checking, and addressing would be more than helpful. if i can learn how to do these things for AVR, its shouldn't be too hard to put it all together and make a modbus protocol.

Thanks a lot,

Sam
 

i am working on same project ...
if you have codes they will be helpful to me ...
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top