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

munication

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



Joined: 07 Jun 2010
Posts: 50
Location: Banned - spammer

View user's profile Send private message

munication
PostPosted: Tue Nov 29, 2011 1:28 pm     Reply with quote

fgh
_________________
Banned for spamming his own posts


Last edited by vortexe9000 on Sun Feb 19, 2012 7:45 am; edited 2 times in total
temtronic



Joined: 01 Jul 2010
Posts: 9243
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Tue Nov 29, 2011 1:55 pm     Reply with quote

Couple of items.

Schematic does NOT show resistors for the LEDs. You should have say 470r - 1k to limit current.

You can join re_ and de on the MAX487s to save a pin as well as have 'better' code(easier).

12k pullup/pulldown resistors for the 485 bus seem high, I think they should be 1k2 not 12k.

MAX487 A should be tied to the other MAX487 A(pin 6 to 6
MAX487 B "" MAX487B (pin 7 to 7)

You show that they are a<--->b(6 to 7), b<--->a(7 to 6) !


Please confirm hardware is setup right..then the software should work....
vortexe9000



Joined: 07 Jun 2010
Posts: 50
Location: Banned - spammer

View user's profile Send private message

THANKS
PostPosted: Wed Nov 30, 2011 12:16 am     Reply with quote

dddd
_________________
Banned for spamming his own posts


Last edited by vortexe9000 on Sun Feb 19, 2012 7:23 am; edited 1 time in total
RF_Developer



Joined: 07 Feb 2011
Posts: 839

View user's profile Send private message

PostPosted: Wed Nov 30, 2011 2:43 am     Reply with quote

You have this define:

#define RS485_USE_EXT_INT TRUE

This forces the RS485.c to use software uarts and external interrupts rather than the hardware and rda interrupt.

You also have your own rda isr which buffers data, but then you don't do anything with that data. That doesn't matter as with RS485_USE_EXT_INT == TRUE the interrupt will never happen.

So, remove #define RS485_USE_EXT_INT TRUE - its defined FALSE by default by rs485.c - and delete your rda interrupt routine completely. Let rs485.c handle the interrupts and buffering. It will; I've used it successfully before (as a stepping stone while working up a MODBUS project). Do all the hardware things suggested by Temtronic, and remember A goes to A, B goes to B.

RF Developer
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