The DMX512.com Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

SMF - Just Installed!

Pages: 1 ... 5 6 [7] 8 9 10
 61 
 on: March 19, 2010, 03:06:52 AM 
Started by tendai02 - Last post by DMX512
One method I use to ensure 100% reliable DMX512 break reception is by using an external counter, see attached schematic.
Although I cant see the schematic (not attached), using a counter to detect break is an excellent idea, much better than misusing framing errors, which is the most widely used approach.  However, depending on your choice of processor, and how much the resources offered by the processor are utilised, you could possibly use on on-board counter to do the same thing as an external counter.

 62 
 on: March 19, 2010, 01:44:10 AM 
Started by tendai02 - Last post by jpk
Might be of some use but possibly overboard for your project, I have released my USB DMX512-A product as open source. One method I use to ensure 100% reliable DMX512 break reception is by using an external counter, see attached schematic.

Firmware is at http://code.google.com/p/dmxking-usbdmx512/ and you can become a fan on the facebook page http://www.facebook.com/pages/DMXking/335067574205

Jason

 63 
 on: March 14, 2010, 06:00:11 PM 
Started by tendai02 - Last post by tendai02
i have done a program with .asm extension for my project. i have assembled it and have no errors. after this i created a hex file using Quickbuild in MPLAB IDE version 8.43 and still no problem. the program is supposed to accept a DMX512 signal from a console and then control a PIC16F876 to produce a dimmable light using pulse width modulation.
the programmer i mnaged to get is a Velleman K8048 whic is supposed to program the pic without any problems. when i load the hex file, it does not give me the message to indicate that the pic was programmed successfully.
does my program have anything to do with this?
please help
i have included the .asm file
Code: [Select]
;**********************************************************************
;   This file is a basic code template for assembly code generation   *
;   on the PIC16F876.
;                                                                     *
;    Filename:     xxx.asm                                           *
;    Date:                                                            *
;    File Version:                                                    *
;                                                                     *
;    Author:    charles01                                             *
;    Files Required: P16F876.INC                                      *
;                                                                     
;    Notes:  DMX512 demo program for an LED light to respond to the DMX signal   *
;                                                                     
;*********
      list      p=16f876            ; list directive to define processor
    #include <p16f876.inc>        ; processor specific variable definitions
    errorlevel -302
;*****
   __CONFIG _CP_OFF & _WDT_ON & _BODEN_ON & _PWRTE_ON & _RC_OSC & _WRT_ENABLE_ON & _LVP_ON & _DEBUG_OFF & _CPD_OFF
;*****
      #define CHANNEL .000 ;select the receiver slot/channel 
;*****
;***** VARIABLE DEFINITIONS
     w_temp        EQU     0x7E        ; variable used for context saving
     status_temp   EQU     0x7F        ; variable used for context saving

       CBLOCK 0x20
    CountH ;16-bit counter
   CountL
   RxBuffer: .512 ;512 bytes buffer allocation
           ENDC
;**********************************************************************
ORG     0x000             ; processor reset vector
clrf    PCLATH            ; ensure page bits are cleared
  goto    main              ; go to beginning of program
;*****
ORG     0x004             ; interrupt vector location
movwf   w_temp            ; save off current W register contents
movf STATUS,w          ; move status register into W register
movwf status_temp       ; save off contents of STATUS register
; isr code can go here or be located as a call subroutine elsewhere
movf    status_temp,w     ; retrieve copy of STATUS register
movwf STATUS            ; restore pre-isr STATUS register contents
swapf   w_temp,f
swapf   w_temp,w          ; restore pre-isr W register contents
retfie                    ; return from interrupt
;*****
        main
      call SetupSerial ;Setup Serial port and buffers
;******************************************************************************
       Start
;          first loop, synchronizing with the transmitter
       WaitBreak
      btfsc PIR1,RCIF ; if a byte is received correctly
        movf  RCREG,W ; discard it
        btfss RCSTA,FERR ; else
        goto  WaitBreak ; continue waiting until a frame error is detected
        movf  RCREG,W ; read the Receive buffer to clear the error condition
;second loop, waiting for the START code
WaitForStart
        btfss PIR1,RCIF ; wait until a byte is correctly received
        goto  WaitForStart
        btfsc RCSTA,FERR
        goto  WaitForStart
        movf  RCREG,W
; check for the START code value, if it is not 0, ignore the rest of the frame
        andlw 0xff
        bnz    Start ; ignore the rest of the frame if not zero
; init receive counter and buffer pointer
        clrf CountL
        clrf CountH
;;        clrf RxBuf
        clrf RCREG; third loop, receiving 512 bytes of data
WaitForData
        btfsc RCSTA,FERR ; if a new framing error is detected (error or short frame)
        goto    RXend ; the rest of the frame is ignored and a new synchronization is
;                     attempted
        btfss PIR1,RCIF ; wait until a byte is correctly received
        goto    WaitForData ;
        movf  RCREG,W ; MoveData
        movwf RxBuffer ; move the received data to the buffer
; (auto-incrementing pointer)
        incf  CountL,F ; increment 16-bit counter
        btfss STATUS,C
        goto    WaitForData
        incf  CountH,F
        btfss CountH,1 ; check if 512 bytes of data received
        goto  WaitForData
;******************************************************************************
; when a complete frame is received
; use the selected CHANNEL data to control the CCP1 & CCP2 module duty cycle
RXend
        clrf  RxBuffer ; use indirect pointer 0 to address the receiver buffer
GetData
        movlw  LOW(CHANNEL) ; add the offset for the select channel
        addwf  FSR,F
        movlw  HIGH(CHANNEL)
        addwf FSR,F
;;        movwf  INDF,CCPR2L ; retrieve the data and assign MSB to control PWM2
;;        movwf  INDF,CCPR1L ; retreive the data and assign MSB to control PWM1
        movlw  INDF
        movwf  CCPR2L ; retreive the data and assign MSB to control PWM2
;*****           
        movlw  INDF
        movwf  CCPR1L ; retreive the data and assign MSB to control PWM1
;*****           
        goto    Start ; return to main loop
;******************************************************************************
; Setup Serial port and buffers
SetupSerial
; Clear the receive buffer
;*****
        clrf    RxBuffer
CBloop
        clrf    RxBuffer ; clear INDF register then increment pointer
        incf    CountL,F
        btfss   STATUS,C
        goto    CBloop
        incf    CountH,F
        btfss   CountH,1
        goto    CBloop
; Setup EUSART
        banksel TRISC
;;        bsf     TRISC,7 ;B'10000000' ; allow the EUSART RX to control pin RC7
;;        bsf     TRISC,B'10000000'; allow the EUSART TX to control pin RC6
movlw B'11000000'
movwf TRISC
        movlw   0x04 ; Disable transmission
        movwf   TXSTA ; enable transmission and CLEAR high baud rate
        movlw   0x90
        movwf   RCSTA ; enable serial port and reception
;;        bsf     BAUDCON,BRG16 ; Enable UART for 16-bit Asyn operation
        bsf     TXSTA,BRGH
        clrf    SPBRG
        movlw   .15 ; Baud rate is 250KHz for 16MHz Osc. freq.
        movwf  SPBRG
; Setup PWM module
        movf    CCP1CON,W               ; configure CCP1 for PWM mode
        andlw   0xF0
        iorlw   0x0C
        movwf   CCP1CON
;*****
        movf    CCP2CON,W             ; set CCP2 as PWM mode
        andlw   0xF0
        iorlw   0x0C
        movwf  CCP2CON
;*****
  ; Timer1 control
        movf  T1CON,W              ; configure Timer1 to oscilation
        andlw   0x09
        iorlw   0x04
        movwf   T1CON       
;Timer2 control
        movlw   0x04                    ; enable Timer2, select a prescale of 1:1
        movwf   T2CON
          ; PWM period
        movlw   0xFF ; 256 x .25us = 64us period
        movwf  PR2
; init  I/O
        banksel TRISA
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;        bsf     TRISA;;;;;;;;;;;;;
movlw 0x00
movwf TRISA
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
        movlw   b'11111111'             ; make pins on PortA inputs
        movwf   PORTA
;int   I/O
        banksel TRISB
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;        bsf     TRISB;;;;;;;;;;;;
movlw 0x00
movwf TRISB
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
        movlw   b'11111111'              ; make pins on PortB inputs
        movwf   PORTB
;init I/O
        banksel TRISC
;;        bsf     TRISC;;;;;;;;;;;;;;
movlw 0x00
movwf TRISC
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
        movlw   b'11110111'             ; make pin RC2 (CCP2) output
        movwf   PORTC
        return
;*****
    END                       ; directive 'end of program'

 64 
 on: February 11, 2010, 02:03:01 AM 
Started by Slotracer - Last post by DMX512
I think you are saying that one of these things has a 3 pin XLR and the other has a 5 pin XLR.

There is no electrical compatibility problem, its just different connectors, just a pain in the neck - what you need is a simple cable converter like this.

The Behringer is correct here, and the American DJ is wrong here - the correct connecter is (and always has been) the five pin connector, but many manufacturers have fitted the three pin over the years.  In the most recent version of the DMX512 specification, the use of 3 pin XLRs is specirfically banned.

 65 
 on: February 11, 2010, 01:51:22 AM 
Started by Slotracer - Last post by Slotracer
I'm also a novice to the lighting world so forgive me if this has been discussed already. I have an American DJ set of 4 LED par 36s and a Behringer LC2412 DMX controller. I had no idea that the two would be incompatible though. The Behringer uses a DMX512 connector and the lights have DMX regular XLR connectors. Am I sunk here? Is there any sort of interface available?
Thanks!

 66 
 on: January 25, 2010, 04:55:01 PM 
Started by Chris - Last post by Chris
Our drama club has just bought a new desk and we are using a Zero88 demux 24 to drive 2 Tempus 6 way dimmers and 2 Pulsar 6 way dimmers. The Tempus work ok but the Pulsars don't. what should the pin connections be. Am I correct in believing that they should be 1 - 7, 2 - 8, 3 - 1, 4 - 2, 5 - 3, 6 - 4, 7 -5, 8 - 6. I already am aware that Tempus is -ve and Pulsar is +ve.

 67 
 on: January 20, 2010, 11:30:51 PM 
Started by tendai02 - Last post by DMX512
Yes you can use the IDE without any programmer(s) connected.




 68 
 on: January 14, 2010, 02:42:26 PM 
Started by Ruselb - Last post by Ruselb
Hi everyone,

New to lasers but really love this. I have a StageLine DMX5120 controller and am looking to purchase a KAM TRI160 ILDA laser to make animations etc to add to shows. I understand the principles of ILDA and have been toying with a demo version of Moncha 2.1. All seems good but I'm a little lost as to the running of the ILDA laser under DMX. Obviously it would be better to run the laser from the desk with animations etc pre-loaded onto an SD card unique to the event etc. But how do I, if possible, control these with DMX? I'm sure it's possible. There is KAM's own ILDA software but this runs the laser 'on the fly'. Can I use both DMX and ILDA to run pre-loaded and on the fly animations? What about using multiple 160's running different animations?

I'd be grateful for any advice. Many thanks,
Rusel.

 69 
 on: January 12, 2010, 08:11:28 PM 
Started by tendai02 - Last post by tendai02
I HAVE DONE A PROGRAM FOR MY LED LIGHT MODULE TO RUN ON DMX PROTOCOL, I AM TRYING TO BUILD THE CODE IN MPLAB IDE AND THEN LATER ON UPLOAD TO MY PIC MICROCONTROLLER WHICH WILL PRODUCE 3XPWM PULSES. CAN I DO THE BUILD ALL PROCESS WHEN I HAVE NO PIC PROGRAMMER SOFTWARE  INSTALLED ON MY PC?????? AT THE MOMENT I AM GETTING ERRORS FROM MY PROGRAM WHIC POINT TO ALMOST THE WHOLE PROGRAM
PLEASE ADVISE
 :(

 70 
 on: December 17, 2009, 12:30:35 AM 
Started by Pickleworth_pie123 - Last post by Pickleworth_pie123
The same problem is happening with some new lights i have, so this can't just be a coincidence. so my guess is its ether the leads or the controller. Heres a link to the controller I am using- just wondering if anyones had any problems with this same one. Also the leads I am using are just general XLR rather than specific DMX cables, does this also make a difference?

Pages: 1 ... 5 6 [7] 8 9 10