PDA

View Full Version : When using dmx code on renard



intwoit2002
08-26-2010, 11:39 AM
I am using Phils code for DMX and have a question when using internal clock.

Pin 2 is normally used for CLOCK in when using Renard code. When using DMX it is clock input.

What should be done with pin 2 leave it alone (open), tie it to ground, tie it hi with a pullup.

Just seems wrong to leave it open.

Any thoughts.

Thanks,
Al

budude
08-26-2010, 11:45 AM
You don't do anything different - it still uses the clock from the external oscillator into pin 2 whether using Renard/Serial or Renard/DMX.

LabRat
08-26-2010, 01:13 PM
You don't do anything different - it still uses the clock from the external oscillator into pin 2 whether using Renard/Serial or Renard/DMX.

Really?? I don't have the source to look at right now, but I was under the impression that in the case of DMX using the internal oscillator was preferred, as you end up with a better match to the DMX Baud rate (250kbits). The external oscillator(s) allow for better/closer matching to what we would consider "standard baud rates" (57600, 115200 etc).

Again.. I don't have the code handy to justify this view. It's simply how I thought things were/would work.

That being said.. I've got a bread-boarded "pixel".. and the clock lines were left hanging. No ill effects detected.

intwoit2002
08-26-2010, 02:31 PM
It only works when "int_clock" is selected. Just seems a little strange leaving a pin open, might be susceptable to static or noise.

Just looking for confirmation to either pull hi or lo.

P. Short
08-26-2010, 07:51 PM
Pin 2 has a weak pull-up, which is enabled in firmware (by simultaneously clearing bit 7 of the OPTION_REG and setting bit 5 of the WPUA register). And this doesn't matter at all if you leave the external oscillator in place.

intwoit2002
08-27-2010, 12:21 AM
Does that mean that the external osc. is ignored by the software and I can just ignore the pin, leaving the osc. connected to pin 2?

P. Short
08-27-2010, 10:54 AM
Does that mean that the external osc. is ignored by the software and I can just ignore the pin, leaving the osc. connected to pin 2?

Yes. The oscillator will draw a little extra power from the +5V supply, but that's OK.

intwoit2002
08-27-2010, 12:11 PM
Phil,
Thank you for clearing that up for me, I really appreciate it.

Al

budude
08-27-2010, 12:14 PM
Phil,
Thank you for clearing that up for me, I really appreciate it.

Al

Sorry for the misdirection - was going from memory which is a scary thing! :???:

Jrd
08-27-2010, 01:46 PM
Phil,
Thank you for clearing that up for me, I really appreciate it.

Al

So are you editing the current or writing new Renard DMX code?