| Author |
Message |
smitchell
Joined: 06 Aug 2004 Posts: 23
|
14 Sep 2004 14:51 modbus on codevision |
|
|
|
|
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
|
|
| Back to top |
|
 |
Google AdSense

|
14 Sep 2004 14:51 Ads |
|
|
|
|
|
|
| Back to top |
|
 |
C-Man
Joined: 19 Jul 2001 Posts: 1235 Helped: 73
|
14 Sep 2004 14:59 codevision modbus rtu |
|
|
|
|
You can take a look here:
http://www.ccsinfo.com/forum/viewtopic.php?t=19306
But this is for a completely different architecture and compiler!!
Just to give you some ideas where to start ...
best regards
|
|
| Back to top |
|
 |
smitchell
Joined: 06 Aug 2004 Posts: 23
|
15 Sep 2004 1:50 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
|
|
| Back to top |
|
 |