Jump to content

HawThorn

Members
  • Posts

    24
  • Joined

  • Last visited

    Never

Everything posted by HawThorn

  1. Bonjour, Je voudrais réaliser un projet avec des boutons, des faders et des encodeurs rotatifs. Si j'ai bien lu, les fader s'utilisent avec un module AIN. Et ce module se connecte au CORE via les Ports J5 et J6 de celui-ci. Les encodeurs rotatifs, quand à eux, s'utilisent avec un module DIN, mais pour leur cas précis (ce ne l'es pas avec de simples boutons), le module DIN se connecte aussi au port J6 du Module CORE. Donc si mon raisonnement est juste, Si je souhaite une application avec des faders & des encodeurs rotatifs, il me faut deux modules CORE chainés ? Je vois aussi qu'en faite dans ce shémat-ci http://www.ucapps.de/mbhp/mbhp_midibox64e_full.gif, il lie les modules DINX4 avec encodeurs rotatifs au ports J9. Si effectivement, c'est faisable, j'ai une seconde question qui surgit : Puis-je mettre des encodeurs rotatifs et des boutons sur un même module DINX4 ?
  2. Once still while working and studying, that functioned. But I've a little problem. I use my own module based on a PIC16F88 to send some information to the Core Module. It's perfectly working, I send a CC. Like for example after the address: 0x0b 0xb0 0x04 0x23 It’s perfectly working; the core received the value like a CC. My problem is after. I send this value in loop (it’s just for testing my module and I²C actually). But after a little time (a few second or less) the Core Module reboot. And again, and again… Did I forget something?
  3. So, I'm not a programmer and I have a question. I reprogrammed the IIC module. I would like to integrate in my assembler file the codes which manage the I²C. But it’s impossible for my little knowledge. Which code do I have to recover to allow the two modules to communicate? Thanks
  4. ok, I will test that. And nothing to chang into the code of the firware of the IIC module ?
  5. a precise question: where to go to change the baudrate, the speed of reception of module I²C? It's a little bit hard for me to understand the code... Thanks Laurent
  6. I need some help to find a way of working to begin the job... I have a Core module with mios and my own application inside (C is easy compared with assembler for me) and I have an I²C module. With the I²C module I want to received and analyse dmx frame and convert it in midi message for my core module. Just the 24 first dmx channels… The best way is to create a completely new asm file or to modify the current one? I’ve an asm file that analyse and convert in an analog signal with a pic18f876… So I think it’s possible. It’s the last straight line before the end of my project… If you can give me a way of working… I know what I want to do, but I don’t know how…
  7. Well, I forgot this problem for the moment... I have a other one :'(
  8. Hello, I try to use and configure the watchdog with the mios. I read the part of the watchdog in the datasheet. And I have a look in the files of the sdcc_skeleton. And I found this code in pic18f452.h extern __sfr __at 0xfd1 WDTCON; typedef union { struct { unsigned SWDTEN:1; unsigned :1; unsigned :1; unsigned :1; unsigned :1; unsigned :1; unsigned :1; unsigned :1; }; struct { unsigned SWDTE:1; unsigned :1; unsigned :1; unsigned :1; unsigned :1; unsigned :1; unsigned :1; unsigned :1; }; } __WDTCONbits_t; extern volatile __WDTCONbits_t __at 0xfd1 WDTCONbits; but I'm not sure it's the good place to do my modification. In the WDTCON the bit 5, 6 and 7 are unimplemented (read as 0) It's hard to found the right place of the watchdog in the sdcc skeleton.... the wathdog is more a assembler fonction than a C. So, where do I have to have a look to found and modify the watchdog timer period bits? Laurent
  9. Hello... Well I think I understand (and it's working). I use this code void Init(void) __wparam { // initialize the AIN driver MIOS_AIN_NumberSet(2); // just 2 buttons for my test MIOS_AIN_UnMuxed(); // no AINX4 modules are used MIOS_AIN_DeadbandSet(0xFE); // 0 or 254... } And this one void AIN_NotifyChange(unsigned char pin, unsigned int pin_value) __wparam { MIOS_LCD_Clear(); MIOS_LCD_CursorSet(0x00); MIOS_LCD_PrintBCD3(pin); // to see the pot when he change his state MIOS_LCD_CursorSet(0x40); MIOS_LCD_PrintBCD3(pin_value); // to see the value of the pot } I use switches with resistor like this http://www.ucapps.de/mios/j5_din.pdf And it’s working :) Some question more: Ideally the value of my switch must be 0 or 255… but some time it’s 254 or 48 or anything else. Is it a problem of my button (really bad one)? It’s not a problem for my application but I want to know. slowly but surely Laurent
  10. ??? well it's really hard for me. I compare the code but I don’t understand. If I want to use j5 as a digital input, I must put some files of j5_din_v1_3 in my sdcc_skeleton, but not all. The link between the files is hard to understand for me. I make some tests, but it’s not a good way. Programming is not my cup of tea but I try to understand. :'(
  11. It's a little bit hard for me to understand. I'm really bad in ASM, so what's the easiest way to use the j5 as a digital input? I download the zip who explains this with the code, but I don't understand everything. How use the ASM code with my existing C code?
  12. Well... it's working... and making what I want... I'm happy ;D
  13. Parfais, tout cela fonctionne. Question subsidiaire : mon écran lcd allume… mais rien ne se passe… comment chercher l’erreur ? Y a-t-il une procédure à suivre pour le débogage ?
  14. Avec MIOS studio : En cochant "wait for upload request before starting upload" et "use feedback from core" tout ce passe bien, mais mon module à la fin de l'oppération recommence à m'envoyer son signal toute les deux secondes. Avec Midi-ox, je n'ai pas vu qu'il fallait faire un fichier spécifique pour lui.
  15. Bonjour, Voilà un titre long pour un problème que j'espère simple. Je viens de finir mon core (ouf). Je l’ai monté, branché, et il envoie ce fameux message (F0 00 00 7E 40 00 01 F7) toute les deux secondes. Jusque là , tout va bien. Ensuite je tente de loader mon ficher sysex que je viens de compiler. Le mios réagis (il envoie un message après chaque bloc reçu). Mais rien, après il continue à m’envoyer son message initial toutes les deux secondes. Je diminue le buffer de midiOX, et recommence. Rien. Je teste avec les Led, je teste les résistances, tout le bataclan. Mais hooo, malheur tout fonctionne. Alors pourquoi est-ce que le mios reçoit, réagis, mais refuse de loader le programme que je lui envoie ? Si quelqu’un à une idée d’autres tests que je pourrais faire pour cerner mon problème… merci
  16. Well, If I want to read and use only 24 dmx values (to resolve the problem of memory and speed), is it better to use two CORE modules linked or one CORE module and one I2C midi module? One who read and translate the dmx and one for my "traditional" midi mapping.
  17. Super solution... ;) MIOS POWER ;D
  18. Thanks for this explanations… it’s become more limpid in my mind… Now I can use it, and I can understand it...
  19. It's a product like this : http://www.cinetix.de/interface/english/midmxbox.htm or like this http://www.artisticlicence.com/item192.htm but mine is a ABD.
  20. Well, I've a box how convert a dmx message into a midi one. But I must have after a MIOS how translate my midi message (can’t work with a pc on site during show). So I thought: "why not to do everything in a same box". My actual box converts all the 128 first dmx channels in NoteOn. The first value of the NoteOn is the channel of the dmx (0-127) and the second is the intensity of the dmx channel (8bit convert to 7bit). The PIC16F can’t do the same? Too much information during a too short time? Can I must store the entire dmx frame before sending it in a midi message? I can detect the break of dmx message, store the first 8bit value of dmx convert it in 7bit and send it with a other message for the channel (and a other for statue message). Then increase the channel bye one (detection of stop bit, Mark time and start bit) and doing the operation 128 times, forget the 128 last dmx channel, detecting the break of the dmx frame, etc, etc… The PIC16F can do this, or is it too slow? Thanks Laurent
  21. I must control just 3 buttons with my MIOS, can I without a module? If yes, what the way of working? Thanks Laurent
  22. Well, I read some topic about midi to dmx, but I try to do the opposite. I just need a way to beging my reflection about it : Is it possible ? Can I use the port J4 for the dmx in ? and can I program my soft in C or just in assembler ? Thanks Laurent
  23. Hello again, I finished the program. Well, not exactly. I do not understand perfectly how to use function which scales a value. Programming is hard for me :'(... I can use this : unsigned char Scale_7bit(unsigned char evnt2, unsigned char min, unsigned char max) { // scaled value is (<8-bit random> * ) >> 8 PRODL = evnt2 << 1; // 8bit value PRODH = max-min+1; // range __asm movf _PRODL, W mulwf _PRODH, 0 __endasm; return min + PRODH; } and evnt2 = Scale_7bit(evnt2, 0x01, 0x64); but I can't understand how it's working. I can't test actually, my PIC arrives in 2 week. So with the minimum value 0x01 and the maximum value 0x64... If I understand, when evnt2 have a value of 0x00 it become 0x01 and for a value of 0x7F it become 0x64. Other example, for 0x55 it become 0x44. The fonction stretch the value ? Thanks Laurent
  24. ok, thanks, I will test... It's the better way... Just a last question... about the memory of the PIC. How can I know if my programming code is too big for the memory without sending it in the PIC?
  25. Well, but is my code correctly programmed? If I send it (with the skeleton) in the MIOS, is it working?
×
×
  • Create New...