CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

picc/driver/modbus.c

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Guest








picc/driver/modbus.c
PostPosted: Thu Jun 21, 2007 7:43 am     Reply with quote

Hello all,

I tried to use Modbus.C provided in the driver folder.
I used the wizard, to create A master and a slave project.

I encountered many problems , i wonder if as there is no example of using this library, it is or not good ?

minor problem ! :

for exemple the wizard generates some
fprintf(PC," text");

that means that you have to declare another useRS232 using other pins than the ones used for rs485 . but in modbus .c the rs485 is delcared like this

#use rs232(baud=MODBUS_SERIAL_BAUD, xmit=MODBUS_SERIAL_TX_PIN, rcv=MODBUS_SERIAL_RX_PIN, parity=N , force_sw , stream=MODBUS_SERIAL)

and the force_sw flag cannot allow you to declare another users232

Major Problem

for my slave i do not use the Int Interrupts.
By llookng the modbus.c looks like SLave check for incoming messages in int_timer2.

but i cannot find anywhere an enable_interrupts( timers2)

so i wonder if this code libary has een tested , or i simply should not be in the directory?

( by the way i guess the master works fine , i sends something on the RS485 bus, ( i check with an oscilloscope ) )
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group