bill Posted July 12, 2006 Report Share Posted July 12, 2006 Hello,few times ago, i build a midimon http://ucapps.de/midimon.html with it's MTC display (very nice)Now, i'm interested in driving the Display module, with C code.But, I dont know how to start (i still dont understand very well the mutliplexing stuff), so i ask you, as usual ;)I think it could kick ass to see, pattern position, tempo, CC,'s, Hex values etc, on those nice glowing numbers :) Quote Link to comment Share on other sites More sharing options...
jdelgoulet Posted July 12, 2006 Report Share Posted July 12, 2006 Hi all !Just to let you know that the commander.de stite is un reachable but ... I've been hunting and YES !!! the sdcc installer (thanks god ! that's really cool) is available here for all OSX super Star Users !!! : http://www.1710.co.uk/picosx/Resources/Thanks you very for all those installers !!! Jules - Toulouse, France. Quote Link to comment Share on other sites More sharing options...
bill Posted July 13, 2006 Author Report Share Posted July 13, 2006 Hem, i reply to myslelf, not bcause i'm stupid but because i have some clues, and i dont want you waste your time :I found many interesting informations in the leddigits.inc file, from the midimonV2 application :)I think the most important was : ;; -------------------------------------------------------------------------- ;; FUNCTION: LEDDIGITS_Update ;; DESCRIPTION: This function should be called periodically by ;; USER_SR_Service_Prepare before the DOUT registers will be updated ;; from MIOS ;; ..... ;; -------------------------------------------------------------------------- LEDDIGITS_Update ;; increment LED digit counter, wrap at 4 ;; (0, 1, 2, 3, 0, 1, 2, ...) SET_BSR LEDDIGITS_CTR ; (use bank mechanism so that the registers can be located at addresses >= 0x80) incf LEDDIGITS_CTR, W, BANKED andlw 0x03 movwf LEDDIGITS_CTR, BANKED ;; get shift register pattern for the select line: ;; LED digit 0 and 4 -> b'10001000' ;; LED digit 1 and 5 -> b'01000100' ;; LED digit 2 and 6 -> b'00100010' ;; LED digit 3 and 7 -> b'00010001'I'm on the way to do it working the same way, but without asm. Quote Link to comment Share on other sites More sharing options...
audiocommander Posted July 13, 2006 Report Share Posted July 13, 2006 Hi Bill,as I understood, the main trick is to wire the LEDs correctly (I think a sample can be found with the LED-Rings wiring PDF). Then you need kind of a matrix array for each figure you want to display... this matrix is then switched line-by-line...sorry if I'm so unconcrete... I'm very short in time these days, I'll watch this thread, maybe I can contribute more details when I get my LED-meters working :)Cheers,Michael@jdelgoulet: thanks for your kind words :) although this is a bit off-topic, just for the record, my site has never been down: http://www.audiocommander.de/blog/?p=48 and Ben (http://www.1710.co.uk/picosx/) had only temporary troubles 'cause the server got struck by a lightning :o Quote Link to comment Share on other sites More sharing options...
bill Posted July 17, 2006 Author Report Share Posted July 17, 2006 Hello,the main trick is to wire the LEDs correctlyI have this part done (i allready have my midimon+led display working perfectly)I tried this simple code, with no success, anyone can help me ?(i thought) this code should send the pattern 0x7f to every led-chars, but they are all off :(any idea ?unsigned char led_c=0;//led counter const char led_b[8] = { 0,0,0,0,0,0,0,0,};//led buffer const char led_sr[4] = { 0x88,0x44,0x22,0x11,};//shift register patterns /* ;; LED digit 0 and 4 -> b'10001000' 0x88 ;; LED digit 1 and 5 -> b'01000100' 0x44 ;; LED digit 2 and 6 -> b'00100010' 0x22 ;; LED digit 3 and 7 -> b'00010001' 0x11 */ void SR_Service_Prepare(void) __wparam { //LEDDIGITS_Update MIOS_DOUT_SRSet(1,led_sr[led_c]);//char selection (0123) MIOS_DOUT_SRSet(0,0x7f);//first 4 digits (test pattern) MIOS_DOUT_SRSet(2,0x7f);//next 4 digits (test pattern) led_c++; if(led_c>3)led_c=0; } Quote Link to comment Share on other sites More sharing options...
bill Posted July 17, 2006 Author Report Share Posted July 17, 2006 STupid me !!! ;DI forget to "init MIOS_SRIO_NumberSet();"It's working perfectly 8)Now, i'm pretty interested on doing the algorythm to fill the led_buffer (dec2led and hex2led)then "how to drive 16 chars with another 74hc595" :) 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.