Jump to content

macsurfer4

Members
  • Posts

    13
  • Joined

  • Last visited

    Never

About macsurfer4

  • Birthday 07/21/1975

Profile Information

  • Gender
    Male
  • Location
    Berlin

macsurfer4's Achievements

MIDIbox Newbie

MIDIbox Newbie (1/4)

0

Reputation

  1. Found! Microchips offers an example for DMX Signals with PIC´s. Just type DMX at www.microchip.com or follow the link: http://ww1.microchip.com/downloads/en/AppNotes/01076A.pdf On side 9 you find an assembler code which generates a DMX Signal with a PIC 18F24J10. Quote: This source code uses the PIC18F24J10 to transmit a DMX-512 packet via the EUSART peripheral. An external 16Mhz clock input is used. The DMX transmitter code is written as a polled state machine with 4 states. The state machine is called periodically from the main software loop and a jump tamble dtermines the present state. Timer0 is used to control the state machine timing, including length of the Break signal and the spacing between transmitted bytes. The CCP module is configured to start an ADC conversion every 10 msec. A potentiometer voltage is sampled with the ADC and the result is written to the first data slot in the DMX frame to control a remote device. Unfortunately I am not able to understand the code on my own. So please help. My questions: Which functions calls the Poti Value in the code? Could the setup of the serial port (example RC6 for TX on the 18F24J10) be changed? Also I like to know if the code could be transfered to a PIC18F4620? Ähm, yes, one more maybe really newbie question :-\: Could this ASM example also programmed with the MIOS C functions in general? My idea is to change the ASM Code to replace the value of the Poti-Sampling with a Mios Function. I want to use MIOS_MIDI_TxBufferGet or maybe USER_MIDI_NotifyTx to get the Midi data. So if the Midi data is like 0xB0 Control Change message the selected channel and value of the Midi data could be transformed to the DMX channel and value. ::)Just dreaming it could be so eeaasyy! Thanks for your replies, I learn a lot! I will be busy the next 5 weeks, so don´t expect a quick answer from me but I wanted to send you this link before I am offline. Greetings Micha
  2. Hey Forum People and specially Thorsten getting deeper into the microcontroller world and I would say: I am getting to understand how complex the topic is. Sorry I don´t want to be pretentious. Micha versus RS 485 >:( Greetings
  3. Hey Mike, sorry but I don´t like that Laptop based controller software something. I want to do this: Change brightness and colour of a spotlight in sync with the 8th HiHats of my song or if you play a long sound, opening cutoff frequency the light show should be in sync to the filter with brightness, colour or maybe movement. I think of a small moving head device with 5 DMX channels for colour, brightness, gobo pattern, pan and tilt. Don´t you think SEQ could reserve 8 channels with CC´s for a little light show? See you!
  4. So here are my new ideas for having DMX Output with the I2C Modul: I like to programm a few tracks on the SEQ with CC messages which will be converted to a DMX signal. Because I am a beginner in programming I want to write my idea as text first. Maybe you could give me a idea how to program this. Using the I2C Interface the Midi data is forwarded to the I2C Midi modul using the MIOS_MIDI_InterfaceSet(0x10) and MIOS_MIDI_TxBufferPut(=xb0) After that a special firmware on the PIC16F88 analyses the I2C Messages. The possible 128 CC messages will be assigned to DMX Channel 0-127 and the CC Values will be assigned to the DMX Value for the according channel. Its half the resolution but I dont care. So these variables are scanned and then "imported" to the DMX-Sending-routine. This routine creates the DMX compliant signal and begins with a Break Signal and a Mark after Break.(88 us and 8 us). See here: http://mikrocontroller.cco-ev.de/de/dmx512.php Then the variables will be set to the according location of the DMX Signal. (Attention, the first Data Byte is always set to a zero value). The receivers need a sufficient duration to analyse the signal. So I like to send always 128 DMX channels and values, or so called frames. Not needed values should be set to zero. After that the next Break (or Reset) signal is sent again. :-\ Thorsten mentioned that I need to connect a MAX 485 to the Tx pin of the PIC to create the bipolar potential. Also the output speed must be set to 250 kbit/s. So I like to know which functions I should use to programm this with MIOS, rather C than Assembler. Is it right to use the timer function to create the 88 us Break signal and the other signals. Could it be a problem that the PIC16F88 has "only" a 96 bytes buffer? Thank you very much so far. Greetings Micha
  5. Me again, would it be a good idea to somehow link I2C and DMX? I have read that DMX is also called RS485, maybe this is a possibility without changing signal to analog and then back. OK, till next time. Micha
  6. Just did what you said. Found a building kit on http://digital-enlightenment.de/mux.htm You get 64 analog inputs (0-5V) and transform it to DMX Channel 1-64. I just asked them about readymade boards because I have no experience in etching PCB´s. Sometimes I think I have really not much experience generally, hoho ;) But I like electronics. So thank you guys (any girls here), that you read this post at all. Enjoy your days Micha
  7. Hey Guys, I want to use the MidiboxSEQ for DMX Signal Output. Like this: Midi Channel 1- DMX Channel 1, Note Number or CC to DMX Value When you make a Midi sequence you should be able to pick the DMX Modul Output like now the I2C or Aout. I have only small experience in programming but maybe somebody would like to help this idea go further. Here are some links about the DMX protocol: http://de.wikipedia.org/wiki/DMX_%28Lichttechnik%29 http://www.hoelscher-hi.de/hendrik/light/demux.htm It seems to me that DMX is similar to Midi. From this website http://www.theater-technisch-lab.nl/dmxdu.htm I have following information: The DMX 512 signal consists of a repeating Bit-flow The beginning is marked through a "0" send for 88us, this is called "break" After the break signal the "startbyte" follows. This startbyte assigns the target for the following bytes. After the startbyte maximal 512 Bytes follow up with information for the control channels. The potential between the conductors of the cable is +2,5V or -2,5 V. If the potential is positiv for 4 us it is a "1", if the potential is negative for 4 us it is a "0" Image: http://www.theater-technisch-lab.nl/dmxsign.gif or http://www.soundlight.de/techtips/dmx512/vpdmxti.gif Is it possible to generate such a signal with the PIC? Greetings Micha
  8. Sorry, that i made time stress. A friend was ordering the parts right now. But we can do our own order if we will find minimum 5 people Here are the possible adresses to buy the Speakjet. England: www.totalrobots.com USA: www.acroname.com www.speechchips.com www.thebotshop.com I think the possible way to order will be with a paypal account. Because the payment is international with small costs and easy to use. So i wait for your requests and for the people who already mailed: Thank you, think about the paypal method and i will write you on the list. See you soon. Greetings Micha
  9. Hi there, i have the possibility to buy speakjet chips for 25 Euro + shipping from the States. Anyone here who also wants a speakjet? Please contact me soon, till sunday 5.11.06 Greetings Micha
  10. The box is for a friend of mine. He is performing live with some orchestral sounds triggered by a midi keyboard. This keyboard has no prg-change function, so he asked me to build a simple Box with buttons. I built the box that he can use it also as a small Midibox 64, the upper 4 buttons and the lcd are for the menu navigation.
  11. :) :D ;D 8) Hi there, what fun is programming, yeeh ha!! OK, i´m normal now. I did get help from a friend who is a good programmer. He showed me some functions: I can MIOS_MIDI_TxBufferPut(0xC1), I mean send Prg-Change, I can light up the right led, in connection with a pushed button, I can display "Programm 1-8" on the LCD, I can merge midi in to out with MIOS_MIDI_MergerSet(0x01) I´m really happy right now, this little box is working fine and it was quite easy. So i am waiting for the parts now but the programming part is done! The Box will have 8 Prg Change Buttons with Status LEDs, 2 Buttons for future functions, 1 Panic Button (Controller 123), and maybe a lcd display. But i have one more question, is it possible to display e.g. Programm 1,2,... a bigger type, i mean over 2 lines of the 2x20 display instead of a 8 digit display? Greetings macsurfer4 (micha) So here is some code, if you want please do some advices: ///////////////////////////////////////////////////////////////////////////// // This function is called by MIOS when an button has been toggled // pin_value is 1 when button released, and 0 when button pressed ///////////////////////////////////////////////////////////////////////////// void DIN_NotifyToggle(unsigned char pin, unsigned char pin_value) __wparam { if(pin_value == 0 && pin <= 8) { // send program change status byte MIOS_MIDI_TxBufferPut(0xC1); // send program number MIOS_MIDI_TxBufferPut(pin); // switch all leds off MIOS_DOUT_PinSet0(0); MIOS_DOUT_PinSet0(1); MIOS_DOUT_PinSet0(2); MIOS_DOUT_PinSet0(3); MIOS_DOUT_PinSet0(4); MIOS_DOUT_PinSet0(5); MIOS_DOUT_PinSet0(6); MIOS_DOUT_PinSet0(7); // switch pressed led on MIOS_DOUT_PinSet1(pin); //diplay Program number MIOS_LCD_Clear(); MIOS_LCD_CursorSet(0x00); MIOS_LCD_PrintCString("Program"); MIOS_LCD_PrintBCD3(pin+1); } else if(pin_value == 0 && pin == 11) { // send controller status byte MIOS_MIDI_TxBufferPut(0xB1); // send controller number MIOS_MIDI_TxBufferPut(0x7B); MIOS_MIDI_TxBufferPut(0x00); } } and one more for the merger ///////////////////////////////////////////////////////////////////////////// // This function is called by MIOS after startup to initialize the // application ///////////////////////////////////////////////////////////////////////////// void Init(void) __wparam { // set shift register update frequency MIOS_SRIO_UpdateFrqSet(1); // ms // we need to set at least one IO shift register pair MIOS_SRIO_NumberSet(16); // for 128 pins // debouncing value for DINs MIOS_SRIO_DebounceSet(10); //set midi merger on MIOS_MIDI_MergerSet(0x01); }
  12. Hi, all of you. I´m building a small Midibox 64. It has only 8 Buttons with Prg-Change Commands from 1 to 8. It works fine but there´s a additional wish i have. May it be possible to display the last pushed button (e.g. Prg-Change 5) on a 8 digit display? Or the other way, can i have the led lighting up and hold when i press another button?(e.g Prg-Change 4, LED 5 off and LED 4 on) I have no idea of programming assembler or C but i will learn if you want me to- ;) See you later. Macsurfer4
  13. http://de.farnell.com/jsp/endecaSearch/partDetail.jsp?SKU=3120892&N=401 is the link at farnellinone.de Or type 312-0892 Leiterplattentaster At segor.de type Kurzhubtaster 12 x 12 mm or KHT 5 and you will find it. Farnell has caps in yellow but only for the 9x9mm buttons, segor has caps only in black, i checked that. Nice Weekend Micha
×
×
  • Create New...