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

Search found 20 matches
CCS Forum Index
Author Message
  Topic: Conversion Library
José Aparecido

Replies: 3
Views: 10716

PostForum: General CCS C Discussion   Posted: Thu Jun 06, 2019 5:16 pm   Subject: Conversion Library
Hi, I'm developing a project using a PIC18F4550 microcontroller and an LM044L LCD display. I need a library that converts hexadecimal values (int) to decimals.
Then I will display these decimal value ...
  Topic: Error 44 When Trying to Compile
José Aparecido

Replies: 6
Views: 15952

PostForum: General CCS C Discussion   Posted: Wed Jun 05, 2019 5:12 pm   Subject: Error 44 When Trying to Compile


I already read this post, but he did not help me.n Sad

In that case, maybe email CCS as it says. Usually they respond pretty fast during business hours.

okay
  Topic: Error 44 When Trying to Compile
José Aparecido

Replies: 6
Views: 15952

PostForum: General CCS C Discussion   Posted: Wed Jun 05, 2019 5:07 pm   Subject: Error 44 When Trying to Compile


I already read this post, but he did not help me.n Sad
  Topic: Error 44 When Trying to Compile
José Aparecido

Replies: 6
Views: 15952

PostForum: General CCS C Discussion   Posted: Wed Jun 05, 2019 3:51 pm   Subject: Error 44 When Trying to Compile
Hi, I'm developing a MODBUS RTU RS-485 Master-Slave project and I'm using the examples that are in the CCS folder.
I'm trying to compile the file ex_modbus_slave.c but the CCS gives the error 44.
Wh ...
  Topic: (Help Me!) MODBUS RTU RS-485 Master-Slave
José Aparecido

Replies: 26
Views: 50917

PostForum: General CCS C Discussion   Posted: Tue Jun 04, 2019 12:16 pm   Subject: (Help Me!) MODBUS RTU RS-485 Master-Slave
Unfortunately, that is the part that you will need to do the work yourself. Start by building the hardware and writing the basic blinking program, and start building up from there. Use the code provid ...
  Topic: (Help Me!) MODBUS RTU RS-485 Master-Slave
José Aparecido

Replies: 26
Views: 50917

PostForum: General CCS C Discussion   Posted: Tue Jun 04, 2019 12:11 pm   Subject: (Help Me!) MODBUS RTU RS-485 Master-Slave
Sorry for my ignorance, I'm

Yes, you need to define MODBUS_SERIAL_RX_ENABLE and MODBUS_SERIAL_ENABLE_PIN as two IO pins (c4 and c5)

You also need to define these two:
MODBUS_SERIAL_TX_PIN PIN_ ...
  Topic: (Help Me!) MODBUS RTU RS-485 Master-Slave
José Aparecido

Replies: 26
Views: 50917

PostForum: General CCS C Discussion   Posted: Tue Jun 04, 2019 12:06 pm   Subject: (Help Me!) MODBUS RTU RS-485 Master-Slave
To be clear, Modbus is not something that you can throw together in a few minutes...

There's a lot to understand:
hardware protocol
communication protocol
your own hardware interface to the prot ...
  Topic: (Help Me!) MODBUS RTU RS-485 Master-Slave
José Aparecido

Replies: 26
Views: 50917

PostForum: General CCS C Discussion   Posted: Tue Jun 04, 2019 12:03 pm   Subject: (Help Me!) MODBUS RTU RS-485 Master-Slave
They are not directly.

If you are the slave, _you_ determine what is sent for any particular
register request. It could be a value from a variable, or just a constant.
Completely up to you.
The ...
  Topic: (Help Me!) MODBUS RTU RS-485 Master-Slave
José Aparecido

Replies: 26
Views: 50917

PostForum: General CCS C Discussion   Posted: Tue Jun 04, 2019 11:59 am   Subject: (Help Me!) MODBUS RTU RS-485 Master-Slave
If you read modbus.c comments at the header, it also tells you what kind of defines you need to make to make it work. You have not done all of them. For example, the DE and RE pins are not defined.
...
  Topic: (Help Me!) MODBUS RTU RS-485 Master-Slave
José Aparecido

Replies: 26
Views: 50917

PostForum: General CCS C Discussion   Posted: Tue Jun 04, 2019 11:44 am   Subject: (Help Me!) MODBUS RTU RS-485 Master-Slave
You will need to provide a modbus master driver for the master and a slave driver for the slave.

read_holding_registers will put the contents of the slave's holding registers into modbus_rx.data
...
  Topic: (Help Me!) MODBUS RTU RS-485 Master-Slave
José Aparecido

Replies: 26
Views: 50917

PostForum: General CCS C Discussion   Posted: Tue Jun 04, 2019 11:42 am   Subject: (Help Me!) MODBUS RTU RS-485 Master-Slave
One thing: I say that you should use MODBUS_INT_RDA for this because I notice that you are using C6 and C7, which are the hardware UART pins. If you really intend to use MODBUS_INT_EXT then you should ...
  Topic: (Help Me!) MODBUS RTU RS-485 Master-Slave
José Aparecido

Replies: 26
Views: 50917

PostForum: General CCS C Discussion   Posted: Tue Jun 04, 2019 11:30 am   Subject: (Help Me!) MODBUS RTU RS-485 Master-Slave
I notice a few things:
1. your DE and RE pins are still set to your TX and RX pins in your code. You need to set the DE and RE pins to what they are connected to, and also tell the modbus driver that ...
  Topic: (Help Me!) MODBUS RTU RS-485 Master-Slave
José Aparecido

Replies: 26
Views: 50917

PostForum: General CCS C Discussion   Posted: Tue Jun 04, 2019 11:12 am   Subject: (Help Me!) MODBUS RTU RS-485 Master-Slave
I notice a few things:
1. your DE and RE pins are still set to your TX and RX pins in your code. You need to set the DE and RE pins to what they are connected to, and also tell the modbus driver that ...
  Topic: (Help Me!) MODBUS RTU RS-485 Master-Slave
José Aparecido

Replies: 26
Views: 50917

PostForum: General CCS C Discussion   Posted: Tue Jun 04, 2019 10:51 am   Subject: (Help Me!) MODBUS RTU RS-485 Master-Slave
Can you show your code? You need to show the full setup, where you are trying to read the Modbus register, and where you try and store the incoming data. Try and write the most minimal code you can to ...
  Topic: (Help Me!) MODBUS RTU RS-485 Master-Slave
José Aparecido

Replies: 26
Views: 50917

PostForum: General CCS C Discussion   Posted: Tue Jun 04, 2019 10:44 am   Subject: (Help Me!) MODBUS RTU RS-485 Master-Slave
GPIO = general purpose input/output

You need to fix your hardware first. Going on without the proper hookups guarantees that you have no chance of getting it working.

So before you start playing ...
 
Page 1 of 2 Goto page 1, 2  Next
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group