My led matrix Hello World
Agent420
Posts: 439
Recieved my Prop demo board and a $13 16 x 32 led matrix from Futurelec about the same time, so I decided to see if I could figure them both out over the weekend....
Pleased to report success...· Even got my first parallel app going with program control in one cog and another dedicated to refreshing the display [noparse]:)[/noparse]
Spin seems pretty easy to use, though not quite as fast as I thought it'd be considering an 80mhz clock, which I guess explains why so many of the demo apps are written in assembly.· I've been spoiled with high level languages for so long...
The led matrix board used 5V pullups onboard, so I used a 74HC244 as a level converter.· I looked through the Prop datasheet, but I'm not certain if the IO is 5V tolerant... any know?· Or what is the common method for dealing with 5V logic?
I've got a couple of Spin questions, I'll try to search around first.
Still - I see great things coming [noparse];)[/noparse]
Post Edited (Agent420) : 5/6/2008 1:48:14 PM GMT
Pleased to report success...· Even got my first parallel app going with program control in one cog and another dedicated to refreshing the display [noparse]:)[/noparse]
Spin seems pretty easy to use, though not quite as fast as I thought it'd be considering an 80mhz clock, which I guess explains why so many of the demo apps are written in assembly.· I've been spoiled with high level languages for so long...
The led matrix board used 5V pullups onboard, so I used a 74HC244 as a level converter.· I looked through the Prop datasheet, but I'm not certain if the IO is 5V tolerant... any know?· Or what is the common method for dealing with 5V logic?
I've got a couple of Spin questions, I'll try to search around first.
Still - I see great things coming [noparse];)[/noparse]
Post Edited (Agent420) : 5/6/2008 1:48:14 PM GMT
Comments
The IOs of the propeller are not 5V tolerant, but they can withstand 5V as inputs IF and ONLY IF you put a series resistor, around 1 kohm works well. As output you get something like 3 V, so a level shifter is needed to reise to 5V. I used some ACT logic (VCC at 5V for logic), that worked well. Your 244 is a good option also. Do not forget that there are specilized level shifters, like the SN74LVC8T245 and similars. There are extensive discussions here about level shifting.
Have fun, but you are already having lots of it
Post Edited (Ale) : 5/5/2008 11:10:22 AM GMT
And yeah, had to have a Prop as my first graphic [noparse];)[/noparse]
http://www.futurlec.com/MiniBoards.shtml
about 1/2 the cost for Sparkfun's stuff.· A month does seem like a long time to wait though...
As an example, this last order was submitted on·4/5, recieved on 5/1.· It's usually closer to the 3 week period, but i feels like forever when you're waiting on goodies [noparse];)[/noparse]
Here is the BS2 link (last post at the bottom):
http://forums.parallax.com/showthread.php?p=651690
Here is the SX28 link:
http://forums.parallax.com/showthread.php?p=658966
You might also want to look at:
http://forums.parallax.com/showthread.php?p=676596
Good job!
Fwiw, I initially had some erratic display, and eventually tracked it down to the timing of the Strobe signal.· After some trial & error, I dscovered that I could simply leave the Strobe signal low (enabled) and it worked fine - stable as a rock; it does not need to alternate levels along with the clock or latch signals.·· I look at it now more as a global on/off signal than anything else.
There's also no real reason needing to have the clock signal symetrical... I don't bother with timing, as the Spin code doesn't go fast enough to exceed the chip's maximum rate of 5mhz.· I just get a set of 16bit data for the row, col_left and col_right then clock it over by back to back pin-set / pin-clr statements (data is shifted on the rising edge of clock high).· When all 16 bits are shifted, I do a back to back latch signal toggle to set the data.· No waits, timers, counters, nothing; just two 0 to 15 loops.· The only prerequisite is a latch toggle before things get going to set a known reference point for the 16 bit sycle.
So provided you do not need to turn the display on and off via code, you can save an io pin by hardwiring it low.
Also, with the Propeller anyway (or an equivalent ISR in another architecture), I have no troubles modifying the display ram - which I have set as a·16 element ·long (32bit) variable array - while the display operations run in the background.· So to manipulate the display, I just modify the variables.· Scrolling and other fx·are programming things like bit shifting or copying one array element to another.
Post Edited (Agent420) : 5/5/2008 5:38:00 PM GMT