eliasaudio Posted September 19, 2014 Report Share Posted September 19, 2014 Hi all! I've been scouring the forums and site looking to see if a C version of the matrix led source code exists...My goal is to use it for metering.... Has anyone come across it, or is this even feasible in C on the pic? Thanks! Quote Link to comment Share on other sites More sharing options...
novski Posted September 19, 2014 Report Share Posted September 19, 2014 (edited) I don't realy understand. Are you just looking for the Code to adapt it to a selfmade project or are you looking to for a solution to get meters generaly? Edit: All code is availabe in a SVN Repository: svn://svnmios.midibox.org/mios32 http://svnmios.midibox.org Edited September 19, 2014 by novski Quote Link to comment Share on other sites More sharing options...
TK. Posted September 19, 2014 Report Share Posted September 19, 2014 Of course, it's possible to create a LED matrix with a PIC18F in C. Unfortunately there is no simple example available, only complex examples like this one: http://svnmios.midibox.org/listing.php?repname=svn.mios&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_mm%2F&# (see SR_Service_Prepare() function in src/main.c and the appr. code in src/mm_vpot.c) Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
eliasaudio Posted September 20, 2014 Author Report Share Posted September 20, 2014 Thanks! I've been working off the motormix version...but was hoping for a stripped-down example ;) No problem! Quote Link to comment Share on other sites More sharing options...
bill Posted September 20, 2014 Report Share Posted September 20, 2014 Nice ! I'm also very interested in creating a LED matrix with a PIC18F in C ! I'll try to digest the code, and propose a stripped down version when i find some time. Also i'm curious to know if a 16x16 leds is doable, and what would be the best hardware approach to do so ? Any ideas are very welcome :) Quote Link to comment Share on other sites More sharing options...
TK. Posted September 20, 2014 Report Share Posted September 20, 2014 Yes, 16x16 matrices can be handled in C w/o problems, especially because the actual DOUT transfers are handled by MIOS8 in background with an optimized assembly based routine. The mechanism is always the same: SR_Service_Prepare() will be called before the SRIO scan (each mS) In this function, increment a counter variable on each cycle, reset to 0 once it reaches 16 Transfer the new pattern (which corresponds to the counter and is ideally stored in an array) via MIOS_DOUT_SRSet Please note: a 16x16 LED matrix means that the 16 LED rows will only be visible for 6.25% of the time - the brightness won't be optimal! It's better to implement two 8x16 matrices instead (counter from 0..7) Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Phatline Posted December 10, 2014 Report Share Posted December 10, 2014 well anyone had done this up to now? i am starting programming today a 8x8 LED-Matrix (like SID-Matrix, but sid is ASM) , there are some usefull links here! but have anyobody stripped down it already? 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.