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

dmx.c file

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



Joined: 21 Nov 2005
Posts: 15
Location: Montreal, Canada

View user's profile Send private message Send e-mail

dmx.c file
PostPosted: Sat Oct 15, 2016 9:56 am     Reply with quote

I know we have covered this topic. There has been a lot of discussion on this and unfortunately, there is no correct answer. I have tried the file that is supplied in the "drivers" folder, dmx.c. Other than being a software UART, it seems to have no provisions for being a DMX receiver. I thought there might be a switching of the "xmit" pin for bi directional use but it is not clear. Besides, I think that pin reacts as an output. Do I need to deal with interrupts myself or is this handled by the dmx.c file?

I am looking to make a simple DMX to single PWM. The PWM is working as expected but I cannot get a single byte of DMX. Has anyone got the DMX.c and DMX.h files working or are they buggy?? Thanks,

Mark

PS I am using CCS 5.11 and PIC16F887
temtronic



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

View user's profile Send private message

PostPosted: Sat Oct 15, 2016 12:41 pm     Reply with quote

rcving DMX is rather simple...just use Google to find any of 3 or 4 dozen programs that do that.
The CCS dmx.c is a transmitter from what I recall.

Jay
Ttelmah



Joined: 11 Mar 2010
Posts: 19538

View user's profile Send private message

PostPosted: Sat Oct 15, 2016 12:44 pm     Reply with quote

For the receiver, the UART is setup in ex_dmx_slave.c, which then loads the driver. Look at this.

The software UART is used by the transmit only.
mewanchyna



Joined: 21 Nov 2005
Posts: 15
Location: Montreal, Canada

View user's profile Send private message Send e-mail

PostPosted: Sat Oct 15, 2016 10:42 pm     Reply with quote

Thanks for the responses. As it turns out it seems that version 5.011 doesn't have this example file in it's library. As Jay mentioned, I have already looked at so many versions of doing this that my head is spinning. Is there any way to get a copy of the ex_dmx_slave.c file?

Mark
Ttelmah



Joined: 11 Mar 2010
Posts: 19538

View user's profile Send private message

PostPosted: Sun Oct 16, 2016 1:17 am     Reply with quote

Talk to CCS.
Easiest honestly, upgrade the compiler. 5.011, is a rather early V5 compiler.
temtronic



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

View user's profile Send private message

PostPosted: Sun Oct 16, 2016 4:49 am     Reply with quote

If you ask CCS nicely, they may send it to you. They actually sent me the entire examples folder eons ago when I went from 2.5xx to 3.5xx. Yeesh, that was eons ago.....

Or just let Google find working 'slave' or rcvr' code. I've seen lots over the years. Essentially it's nothing more than a serial 'setup', get the data string, parse and then do 'whatever'.

Jay
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