Jakes Daddy Posted March 26, 2007 Report Share Posted March 26, 2007 Hi,I wonder if anyone can help. I'm building a MB with 2 LCD panels. I can initialize and write to both LCD panels no problem, but now I want to define a couple of custom characters for each LCD.I am currently doing something like this: // define the bit patterns for the special chars which will be written to the LCD tables // we'll use these for pitch up and down indicators (and up and down arrow !) const unsigned char charset_arrows[2*8] = { 0x00, 0x04, 0x0e, 0x1f, 0x1f, 0x04, 0x04, 0x00, // this is the up arrow 0x00, 0x04, 0x04, 0x1f, 0x1f, 0x0e, 0x04, 0x00 // this is the down arrow }; void Init(void) __wparam { // setup to use 2 16X2 lcds MIOS_LCD_YAddressSet(0x00, 0x40, 0x80, 0xc0); // add the special characters to the LCDs (up and down arrows for pitch up and down) MIOS_CLCD_SpecialCharsInit(charset_arrows); <rest of Init code> } void DIN_NotifyToggle(unsigned char pin, unsigned char pin_value) __wparam { // we need to see if either decks pitch- or pitch+ has been pressed or released as we need to display the appropriate icon on screen // we need to do it here rather than waiting on a MIDI in signal as Traktor does not send enough MIDI info for us to determine if it was - or + // is it deck a pitch - if (pin==26) { // either clear or display the down icon on deck a MIOS_LCD_CursorSet(0x09); MIOS_LCD_PrintChar( pin_value==0 ? ' ' : 0x01 ); // this works, correct custom char is displayed } else // is it deck a pitch + if (pin==27) { // either clear or display the up icon on deck a MIOS_LCD_CursorSet(0x09); MIOS_LCD_PrintChar( pin_value==0 ? ' ' : 0x00 ); // this works, correct custom char is displayed } else // is it deck b pitch - if (pin==58) { // either clear or display the down icon on deck b MIOS_LCD_CursorSet(0x89); MIOS_LCD_PrintChar( pin_value==0 ? ' ' : 0x01 ); // this does not work, correct custom char is not displayed } else // is it deck b pitch + if (pin==59) { // either clear or display the up icon on deck b MIOS_LCD_CursorSet(0x89); MIOS_LCD_PrintChar( pin_value==0 ? ' ' : 0x00 ); // this does not work, correct custom char is not displayed } <rest of DIN_NotifyToggle code> } So, when I try display one of the custom characters on the 2nd LCD (by positioning the cursor at an offset of 0x80), it positions correctly but displays a random character. Doing this on the 1st LCD works perfectly.So, I can only assume that my call to MIOS_CLCD_SpecialCharsInit(charset_arrows) only did it for the 1st LCD. Does anyone know how to get custom characters into the 2nd LCD ??Thanks in advanceJD Quote Link to comment Share on other sites More sharing options...
stryd_one Posted March 26, 2007 Report Share Posted March 26, 2007 You'll need to init the special chars twice, once for each display... I haven't toyed with this much, but try setting the cursor position to one on the 2nd LCD before running the MIOS_CLCD_SpecialCharsInit the 2nd time.I've checked the MIOS source and I'm pretty sure that'll do it :) Quote Link to comment Share on other sites More sharing options...
Jakes Daddy Posted March 27, 2007 Author Report Share Posted March 27, 2007 try setting the cursor position to one on the 2nd LCD before running the MIOS_CLCD_SpecialCharsInit the 2nd time.Perfect, thats worked a charm !!Many thanksJD Quote Link to comment Share on other sites More sharing options...
Sasha Posted March 27, 2007 Report Share Posted March 27, 2007 Jakes, how do you plan arrange those displays on the panel? What is the idea? Quote Link to comment Share on other sites More sharing options...
stryd_one Posted March 27, 2007 Report Share Posted March 27, 2007 Ahh nice. Thanks for testing it :) Quote Link to comment Share on other sites More sharing options...
Jakes Daddy Posted March 27, 2007 Author Report Share Posted March 27, 2007 Jakes, how do you plan arrange those displays on the panel? What is the idea? I'm building a midibox version of a pro DJ CD deck - basically rip apart a broken CD control unit, stuff it with MB goodies, and use it with Traktor.My base hardware is a Denon 1800F (the top half of the picture - the bottom half is the CD players themselves and they are now in the bin !):I stripped out all of the inards including the original LCD panels (I think they are actually LED, but that does not matter - they are gone now !) - replaced both panels with a 16X2 LCD in exactly the same mounting position, and the plan is to display on it as much as I can based on the original units functionality (ie. pitch, play/pause indicator, time etc) - this is where I'm getting a bit stuck as Traktor does not send much MIDI data, and so pitch I am having to calculate myself based upon the AIN values for the pitch faders - and there is no hope that Traktor will ever send track info as MIDI data (such as time remaining) - never mind, its fun anyway ! Quote Link to comment Share on other sites More sharing options...
Sasha Posted March 27, 2007 Report Share Posted March 27, 2007 I respect Native Instruments very much, but Traktor sucks! Why... simple because not supporting MIDI good enough. I think current version is 3 and no anny kind of MIDI feedback. I switch to Ableton Live because of that. Not that it supports MIDI... it supports it very well.Be sure to check Wild Weasel pages about Denon conversion:http://www.midibox.org/dokuwiki/doku.php?id=wild_weaselhttp://stud3.tuwien.ac.at/~e0327352/ Quote Link to comment Share on other sites More sharing options...
Jakes Daddy Posted March 28, 2007 Author Report Share Posted March 28, 2007 I switch to Ableton Live because of that. Not that it supports MIDI... it supports it very well.So what MIDI events/data will Ableton send?From Traktor 3.2 (which is the version I have), it will send MIDI data, but its very basic - all you can do (AFAIK) is to duplicate a MIDI IN event and set it as output. EG. if you configure the DECK A PLAY function to respond to a given MIDI IN signal, you can make Traktor also send it back OUT on the same MIDI channel. So, you can write into the C code for the midibox to respond to this event. Its a bit like an acknowledgement of an event - I press the play button, mb sends the MIDI signal, Traktor receives it, Traktor sends the same MIDI signal back, mb receives it and lights the play led.I'd be very interested to know what Ableton will send back as MIDI dataBe sure to check Wild Weasel pages about Denon conversion:http://www.midibox.org/dokuwiki/doku.php?id=wild_weaselhttp://stud3.tuwien.ac.at/~e0327352/Wild Weasel is the man!, and I've already been in touch with him about his project. He gave me a lot of inspiration and ideas. Quote Link to comment Share on other sites More sharing options...
Sasha Posted March 28, 2007 Report Share Posted March 28, 2007 I'd be very interested to know what Ableton will send back as MIDI dataThe best way to know it is to try it yourself. I tested Live 5 with midifeedback command and it light my LEDs. Live 6 supports various control surfaces that sends midi feedback. I tried LC emulation and MB64 with Mackie control selected in the Live.EG. if you configure the DECK A PLAY function to respond to a given MIDI IN signal, you can make Traktor also send it back OUT on the same MIDI channel. So, you can write into the C code for the midibox to respond to this event. Its a bit like an acknowledgement of an event - I press the play button, mb sends the MIDI signal, Traktor receives it, Traktor sends the same MIDI signal back, mb receives it and lights the play led.So Traktor 3.2 does sends feedback? (ok, resend same MIDI to out) Didn`t know that.I don`t understand why you need anny C coding when you can configure MB DOUT registers to react on MIDI in. I tried it? Quote Link to comment Share on other sites More sharing options...
MTE Posted April 30, 2007 Report Share Posted April 30, 2007 Hi Jakes Daddy :)Im very interested in your final Code, would you like to share it ?Cause I need some snippets to learn for also programming my LCDs with some special characters ;)Best RegardsMTE Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.