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 15 matches
CCS Forum Index
Author Message
  Topic: Protocol for MAX485
Salfer

Replies: 14
Views: 17551

PostForum: General CCS C Discussion   Posted: Thu May 15, 2014 5:31 pm   Subject: Protocol for MAX485
I think that the PROBLEM is the INTERFERENCES between transmissions. If I connect only a Master and slave the sistem works OK but If I connect other slave the sistems works rarely. The protocol that I ...
  Topic: Protocol for MAX485
Salfer

Replies: 14
Views: 17551

PostForum: General CCS C Discussion   Posted: Fri May 09, 2014 1:50 am   Subject: Protocol for MAX485
a google visit to search:

MODBUS 485

might profitably guide your thoughts

also see MODBUS_xxx drivers in the CCS folder

I think that the problem is my code but I follow the code like say ...
  Topic: Protocol for MAX485
Salfer

Replies: 14
Views: 17551

PostForum: General CCS C Discussion   Posted: Thu May 08, 2014 7:37 am   Subject: Protocol for MAX485
Hi Salfer,

To share an image, you need to upload it to a free hosting site and then post the link.

Creating a 'micro' RS485 network on a breadboard should be pretty trivial even if you complete ...
  Topic: Protocol for MAX485
Salfer

Replies: 14
Views: 17551

PostForum: General CCS C Discussion   Posted: Thu May 08, 2014 6:23 am   Subject: Protocol for MAX485
For correct RS-485 network you need the 120R PLUS a pullup (on A)and pulldown(on B) resistor ,usually 4K7, though that depends on the make/model of RS-485 interface chip. If you don't follow the specs ...
  Topic: Protocol for MAX485
Salfer

Replies: 14
Views: 17551

PostForum: General CCS C Discussion   Posted: Thu May 08, 2014 5:26 am   Subject: Protocol for MAX485
Since your hardware seems to work( master and one slave is OK), then probably it is your software that has problems. You should post the code for both master and slaves for others to test.
CCS does s ...
  Topic: Protocol for MAX485
Salfer

Replies: 14
Views: 17551

PostForum: General CCS C Discussion   Posted: Thu May 08, 2014 4:43 am   Subject: Protocol for MAX485
Hi everyone! I have a doubt using MAX485. I Use three pics with three MAX485. Each pic use a MAX485.

Mi protocol is:

-The first pic request a answer of the other two pics (Pin RE/DE high and, ...
  Topic: BIG problem with Serial interrupt
Salfer

Replies: 14
Views: 14442

PostForum: General CCS C Discussion   Posted: Thu May 08, 2014 2:34 am   Subject: BIG problem with Serial interrupt
The code now works OK. I installed a new version of CCS and redefined the variables and the code now works ok. Thanks everyone.
  Topic: BIG problem with Serial interrupt
Salfer

Replies: 14
Views: 14442

PostForum: General CCS C Discussion   Posted: Wed May 07, 2014 4:12 am   Subject: BIG problem with Serial interrupt
The problem was the version. If I use CCS 5.015 code works OK. But the value of ADC not change. I need clear de adc before read adc?
  Topic: BIG problem with Serial interrupt
Salfer

Replies: 14
Views: 14442

PostForum: General CCS C Discussion   Posted: Tue May 06, 2014 3:37 pm   Subject: BIG problem with Serial interrupt
I suggest you 'revector' the print.

Code as:

void putc_gie(char chr)
{
putc(chr);
enable_interrupts(GLOBAL);
}


//then where you printf
printf ...
  Topic: BIG problem with Serial interrupt
Salfer

Replies: 14
Views: 14442

PostForum: General CCS C Discussion   Posted: Tue May 06, 2014 1:27 pm   Subject: BIG problem with Serial interrupt

#fuses HS, NOWDT, NOLVP, NOBROWNOUT, NOPROTECT, PUT, INTRC_IO
#use delay (internal=8MHz)
#use RS232(UART1)


Which are you using, a xtal or the internal osc.?
Specify one or the other ...
  Topic: BIG problem with Serial interrupt
Salfer

Replies: 14
Views: 14442

PostForum: General CCS C Discussion   Posted: Tue May 06, 2014 5:16 am   Subject: BIG problem with Serial interrupt
Then a few comments on coding style:
- Please check the formatting of your code. It is now difficult to read because indentation for the lines is using different styles and sizes everywhere.
- Pleas ...
  Topic: BIG problem with Serial interrupt
Salfer

Replies: 14
Views: 14442

PostForum: General CCS C Discussion   Posted: Tue May 06, 2014 5:12 am   Subject: BIG problem with Serial interrupt
Several other comments though:


#include <16f88.h>
#device ADC=10
#fuses HS, NOWDT, NOLVP, NOBROWNOUT, NOPROTECT, PUT, INTRC_IO
#use delay (internal=8MHz)
#use RS232(UART1, E ...
  Topic: BIG problem with Serial interrupt
Salfer

Replies: 14
Views: 14442

PostForum: General CCS C Discussion   Posted: Mon May 05, 2014 5:06 pm   Subject: BIG problem with Serial interrupt
try removing this line from your handler

clear_interrupt(INT_RDA);

the CCS code does it FOR you at the end of the function

also you might try to test that the pointer in the handler does not ...
  Topic: BIG problem with Serial interrupt
Salfer

Replies: 14
Views: 14442

PostForum: General CCS C Discussion   Posted: Mon May 05, 2014 4:58 pm   Subject: BIG problem with Serial interrupt
try removing this line from your handler

clear_interrupt(INT_RDA);

the CCS code does it FOR you at the end of the function


OK but the program continue without work :( I'm very worried I ha ...
  Topic: BIG problem with Serial interrupt
Salfer

Replies: 14
Views: 14442

PostForum: General CCS C Discussion   Posted: Mon May 05, 2014 4:29 pm   Subject: BIG problem with Serial interrupt
Hi everyone! I have a big problem with serial interrupt (#INT_RDA) because my program enter in this interrupt the first time but don't enter the second time.

I don't know if the problem is the ver ...
 
Page 1 of 1
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group