In SX Microcontrollers, SX/B Compiler and SX-Key Tool, natpie wrote: I am new to the sx. Just last night I was brain storming how to accomplish this. I haven't learned sx/b yet so my solution is entierly asmbly, but it might point you in the a helpful direction. I slapped some code together really quickly. My test seem to indicate that 24bit color is probably a bit much. running at 50mhz I had to update my duty cycle every 75 clock cycles to get rid of flicker. Here is a simple irq routine that will run a single rgb led with 256x3 resolution. [code]org $0 interrupt bank $10 incsz dutyt jmp red ;if cycle not over test rgb timmers incsz dtime setb moveon ;just a delay pointer for my latter doing color sweeps setb ledred ;reset rgb pins assume not equal zero setb ledblue setb ledgreen red jnb ledred, blue ;move on if already off csne redt, dutyt ;is this the end of on cycle clrb ledred ; if yes, turn off red led blue jnb ledblue, green csne bluet, dutyt clrb ledblue green jnb ledgreen, endirq csne greent, dutyt clrb ledgreen endirq mov w, #-75 retiw[/code] I've included a little demo program that cycles through some colors. I'm not sure this will help you with your led matrix isssue. It will probably work better if you pick a smaller resolution. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=301606#m302008 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)