danners430
Member
Hey guys,
I'm looking to multiplex a 14x14 LED matrix using a 40X2, and was just wondering if you guys could confirm a couple of things.
Firstly, I'm guessing this would make some sense - if I scan the rows, then the columns which are to be activated could be stored in variables, with a command such as pinsb = myVariable. This would allow me to store the status of all the LEDs in 14 wordvariables, which would make altering the status easy... in theory? I'd store these in w1-w14.
Next, the 40X2 would be receiving commands over a serial connection using the hardware serial pins, set to receive in the background. Once per cycle of the matrix, the chip would check if the hserinflag is set - if not it'll just continue pulsing the matrix, and if data has been received it would look up the "position" of the LED in the matrix using a lookup or lookdown command, and update the appropriate variable. To update, I'd copy the variable in question to w0, allowing me to easily set or clear the individual bit for the LED. Does this make sense?
Finally, would the processing time for the updating of LEDs be particularly noticeable? Especially if I overclocked the chip to 16MHz?
And yes, I know I could use chips like the MAX7219, but I simply prefer doing it like this - it serves as a learning experience, and allows me to completely customise everything in theory
I'm looking to multiplex a 14x14 LED matrix using a 40X2, and was just wondering if you guys could confirm a couple of things.
Firstly, I'm guessing this would make some sense - if I scan the rows, then the columns which are to be activated could be stored in variables, with a command such as pinsb = myVariable. This would allow me to store the status of all the LEDs in 14 wordvariables, which would make altering the status easy... in theory? I'd store these in w1-w14.
Next, the 40X2 would be receiving commands over a serial connection using the hardware serial pins, set to receive in the background. Once per cycle of the matrix, the chip would check if the hserinflag is set - if not it'll just continue pulsing the matrix, and if data has been received it would look up the "position" of the LED in the matrix using a lookup or lookdown command, and update the appropriate variable. To update, I'd copy the variable in question to w0, allowing me to easily set or clear the individual bit for the LED. Does this make sense?
Finally, would the processing time for the updating of LEDs be particularly noticeable? Especially if I overclocked the chip to 16MHz?
And yes, I know I could use chips like the MAX7219, but I simply prefer doing it like this - it serves as a learning experience, and allows me to completely customise everything in theory