NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Support Forum » I need to make the LED Array one line taller.....

February 08, 2012
by tpdcoyne
tpdcoyne's Avatar

Hi,

I need to make my LED Array one row taller.

So, rather than driving the 5 ROW wires (Row 0 to Row 4) from the PB Port (Pins 15 to 19...... PB1 to PB5), I am thinking of driving the 6 ROW wires from either the PC Port, i.e. Pins 23 to 28 (PC0 to PC5) or the PD Port Pins 4,5,6 and 11,12,13 (PD2 to PD7).

Has anyone ever tried this and is there an advantage to using PC or PD to drive ROW wires?

Many thanks.

Tim

February 08, 2012
by Rick_S
Rick_S's Avatar

You can use any pins you choose, you would just have to modify the code to acommodate it. Doesn't the LED Array use all the pins on the chip as it is though? It's been a while since I built the "stock" array but that was my recollection. If it does, where were you planning on getting the extra pin from?

Another option would be to go with an array driven by shift registers. This uses far fewer pins on the micro and can easily control displays of a fairly large size.

Rick

February 08, 2012
by tpdcoyne
tpdcoyne's Avatar

Hi Rick,

I was just planning on using one of the column pins and loosing 2 columns.....

but shift registers hey? I guess I'll have to read up about them....

By the way, here's a question......: How many characters, i.e. 6x6 "squares" of pixels can I store on the memory of the chip?

The Spec sheet says:

• High Endurance Non-volatile Memory segments – 4/8/16K Bytes of In-System Self-programmable Flash program memory – 256/512/512 Bytes EEPROM – 512/1K/1K Bytes Internal SRAM

but I don't know what any of that means....

Tim

February 08, 2012
by Rick_S
Rick_S's Avatar

If you want to see what can be done with shift registers on LED displays, you could check out my blog at rs-micro.com I haven't posted there in a while, but I've always been into blinky lights and have several posts of some boards I sourced on ebay that use shift registers. The videos will give you an idea of what can be done. The software I'm running on them is a modified version of the same code used on the Nerdkit array.

As to how many characters you can store, I'm not sure. But if you are running the stock 168, I'd recommend purchasing the 328P micro from here to double your capacity...

Rick

February 08, 2012
by tpdcoyne
tpdcoyne's Avatar

Thanks Rick.

I THINK I have figured out how to do it and have rewritten the code accordingly.

I am on the road for the next few days and can't wait to go home and see if it works.....

Very cool blog... I have had a quick look at it, but you are WAY more advanced than I am....

I am more like...

Step 1) Select "O.F.F." switch to the "O.N." position.
Step 2) Did it work? Yes? Good. Don't touch it, cause you'll only break it. No? Step away SLOWLY, and seek professional help....

:-)

T

February 08, 2012
by pcbolt
pcbolt's Avatar

Hi Tim -

The "4/8/16K Bytes of In-System Self-programmable Flash program memory" line in the AtMega guide refers to the three different models of chips the manual applies to. The NK chip (ATmega 168) is the last referenced so it has 16K Flash, 512 EEPROM, and 1K SRAM memory.

As far as memory goes, each character will take 6-bytes of memory so if you're using a charcter set of 0-9 and A-Z (no lower case) it will take a minimum of 36 characters to make your alphabet. This means 216 bytes will be used to store a lookup table for your alphabet. If you are using the standard "printf" functions, your program will be at least 8K so that leaves you with about 8K of flash and 1K of SRAM to store pre-defined text. Each text character is 1 byte so you should be able to store about 8,000 characters of text.

Hope it helps.

February 08, 2012
by tpdcoyne
tpdcoyne's Avatar

Thanks pcbolt,

That was VERY helpful.

I'll have to do a bit of research on the different types of memory... Flash, EEPROM and SRAM.

Thanks again.

Tim

February 11, 2012
by Ralphxyz
Ralphxyz's Avatar

The BootLoader also takes up memory, about 1k I believe!

Ralph

Post a Reply

Please log in to post a reply.

Did you know that a NerdKit can be used to build an iPhone-controlled R/C car? Learn more...