Renard Firmware

From doityourselfchristmas.com
Jump to navigation Jump to search

Intro

All current firmware uses version 1 of the Renard protocol. The regular and Ren-C firmware operate at 57600 baud by default. This can be increased to 115200, 230400, or even 430600 baud by editing the source. However, high baudrates do not work with all PICs and/or may require different clockrates. It is wise to thoroughly test the setup when using such high rates.
The diagnostic firmware operates at 19200 baud.

Regular Firmware

The firmware can be configured for either PWM or non-PWM operation. By editing the firmware file and changing the #define statements you can select which mode of operation you want.
  • Non-PWM operation causes a narrow output pulse (30 μS, or so) to turn on the SSRs. This results in the lowest PCB current requirements, because the waveform driving each SSR has a 1:256 duty cycle. The drawbacks of non-PWM operation is that it will not properly control any channel status LEDs (present only on the Renard64 board), and may cause some issues when driving LED strings (e.g. they may possibly not turn on at the upper 25% of the brightness range).
  • PWM operation sends a variable-width output pulse to turn on the SSRs (the output turns on at a variable time in the AC power cycle, and stays on until the end of the cycle). This presents a PWM signal to any attached channel status LEDs, causing them to have a variable brightness that somewhat corresponds to the brightness of lamps attached to the SSRs. It will also be better at driving LED strings on the output of the SSR (because the PIC drives the SSRs throughout the cycle, rather than relying on the current through the opto-isolator to latch the opto).


Operation with 50 Hz power
The Renard firmware is designed to sense the power line frequency and change how it works according to the line frequency. In a 60 Hz locale the duration of each (non-PWM) pulse to the SSR is about 30 μS, and the pulses are placed about 30 μS earlier in the AC cycle for each higher dimmer value. For 50 Hz locales the width of each pulse is 40 μS (approx), and they are placed on multiples of 40 μS across the AC waveform. The PWM versions operate in a similar manner, with the pulse widths being a multiple of 30 μS and 40 μS (roughly) for 60 and 50 Hz locales, respectively.


Testing has taken place in both environments.

Firmware for Ren-C

renard-595-192-20071211.asm

There is a newer version of the firmware that is still under test, and has not been released yet. It may be found in this forum message:

http://doityourselfchristmas.com/forums/showpost.php?p=65451&postcount=59

Beta firmware

DMX firmware

This version of firmware was created to provide DMX capability to the Renard based controller boards. Initial testing has shown that the firmware does work but there has not been extensive testing done to prove how robust the firmware is.


Another feature added to this firmware that requires more testing is that the attributes for each output can be individually set. Each output can be set for either PWM or non-PWM mode and also can be set to be either a sinking or sourcing output. These attributes can be modified by changing the #define PWM_map and #define SINK_map statements in the firmware.


Renard-dmx-20080814.asm


Diagnostic Firmware

There is also a special firmware available to help in diagnosing hardware problems. This firmware uses the output channel signals to provide indications of which features are working. The safest way to use this firmware is to temporarily replace the SSRs with LEDs (and current limit resistors) between the output pin of the PIC and +5V on the board. Also note that this firmware does not re-transmit the serial data, so the 'downstream' PICs won't see any serial data.


The function of the output LEDs/lamps is as follows:
  • Channel 2 - blinks on and off as a heartbeat (if you see blinking, the PIC has power, clock, and is basically working ok). If this channel is not blinking (either solid ON or OFF) there is an error condition that must be fixed. This will be usually be either a bad PIC, bad oscillator or bad power on the controller.
  • Channel 5 - blinks on and off if the PIC is seeing a more or less proper Zero-crossing signal. If this channel is not blinking (either solid ON or OFF) there is an error condition that must be fixed (unless you plan to run the controller in 'DC' mode).
  • Channel 6 - blinks or turns on as the PIC receives good serial data (no framing error, no over-run errors). It will usually appear as a solid 'ON' when Vixen is sending data, although it may appear to blink if Vixen is changing the display infrequently.
  • Channel 7 - blinks if the PIC receives bytes on the serial line with framing errors (usually wrong baudrate or inverted data). The LED may also appear as a solid 'ON' if the errors are occurring in rapid succession. If this channel is ON (or blinking) there is an error condition that must be fixed before the controller will work properly.
  • Channel 8 - blinks if the PIC has overrun error on the serial line (no known causes for this, other than possibly a bad PIC). If this channel is ON (or blinking) there is an error condition that must be fixed before the controller will work properly.


Here is the latest version of the diagnostics firmware, intended for operation with an external 18.432 MHz oscillator. It is set up for 19200 baud, which can be changed by the user if desired (change the #define statement).
ren-diag-20070815a.asm
Here is an older version of the diagnostics firmware that does not require an external oscillator. This is also set up for 19200 baud, which should not be changed.
ren-diag-20060905.asm


Beta Diagnostic Firmware

This new version of the diagnostic firmware adds a full channel test at initial power up. This test is intended to allow the user to verify that all the outputs are operating correctly before the PIC starts testing for the Zero Cross signal. This firmware is set to a default baudrate of 57600.
The test sequence is as follows:
  • All channels ON for approx. 2 seconds
  • All channels OFF for approx. 2 seconds
  • Channel 1 turns ON for approx. 1 second then turns OFF
  • Channel 2 turns ON for approx. 1 second then turns OFF
  • Channel 3 turns ON for approx. 1 second then turns OFF
  • Channel 4 turns ON for approx. 1 second then turns OFF
  • Channel 5 turns ON for approx. 1 second then turns OFF
  • Channel 6 turns ON for approx. 1 second then turns OFF
  • Channel 7 turns ON for approx. 1 second then turns OFF
  • Channel 8 turns ON for approx. 1 second then turns OFF
{The above routine is done three times}


The above sequence should be allowed to complete all three cycles before attempting to send Vixen data to it. Once the above routine is completed, the firmware continues same as the current diagnostic firmware.


Ren-diag-beta--20090117.asm


Instructions on how to use the Diagnostic Firmware are contained in this page.


Start Address Firmware

This firmware includes a START_ADDR variable which can assign a specific Renard controller to start working at a specific channel out of a large group of channels.
Be sure to read the configuration guide before attempting to use this firmware.