Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

How to make snake on LEd display....

Status
Not open for further replies.
To select a single LED in a row of eight.....

10000000 = 128... bit 7
01000000 = 64 .... bit 6
00100000 = 32 .... bit 5
00010000 = 16 .... bit 4
00001000 = 8 ...... bit 3
00000100 = 4 ...... bit 2
00000010 = 2 ...... bit 1
00000001 = 1 ...... bit 0

if I want to manipulate bit 3 I can AND ,OR and XOR with...

C:
//... lets assume backbuffer location = 0xff.
mask = backbuffer[location]; // .... get the state of the row of LED's
x = pow[3]; //... x now equals 8

mask ^= x;  // XOR 0xff with 0x08;
mask |= x; // OR 0xff with 0x08;
 
Hi again,

The way you were doing row scanning was giving good brightness to LED!
so, can we do scanning for all fonts which was used in column scanning( i mean to say the buffer created by that method?) ??
 
Anyway but then how to send it through PORTB..because there will be no array so, how we will pick the buffer to PORTB?
as here it was send like this
const char anim[] = {
0x00,0x00,0x00,0x00, //

one more question can't we send the buffer data in such away that the connection LEFT to right or it s opp right to left can be changed by software......
 
Anyway but then how to send it through PORTB..because there will be no array so, how we will pick the buffer to PORTB?
as here it was send like this

What do you mean... The font IS in an arry... fnt[];..

When you specify an array with no size... then initialize with the contents, the array can be traversed through like any array..

one more question can't we send the buffer data in such away that the connection LEFT to right or it s opp right to left can be changed by software......

I use the method that EVERYONE else uses... That way you can grab fonts of the web and also font creating software has it this way round...
 
Ritesh...

Look at this..... To fully understand "plotting pixels"


led example.png


You make a pixel routine to identify the bits (LED's) in a picture so you can turn them off or on

The LED's are in an array of 32x8... We draw a picture to fit

help.png

As you can see the pixels match the screen..

We we plot the pixels we make the buffer the same shape as the array of LED's ie 4 bytes in a row and 8 rows.

to locate ANY LED within the array... take 5 across and 3 down from the left.. We normally call the variables x and y..

y is 3 down so we need 3 rows of 4 bytes.. and as its in the next row we now work out how far across x is there are 8 leds to one byte

so LED will be in buffer [ 3 * 4 + 5 / 8 ].. so buffer[13]...The pixel is modulus 8 5 mod 8 = 5.. The pow table selects the bit_weight.... pow[5] = bit 4...

The bits are right to left ( same as the T6963C) to rotate them just mirror the POW table...
 
HI,
I am working on LED display PCB designing so, i need to what will be better for scanning :
1. The column connected as we were doing originally in past ||||||||| like this?
2. The Row section connection as you suggest in previous post??
1 2 3 4
5 6 7 8 like this??
and which shift register to be use 74hc164 or any other???
 
I need help how to design PCB layout for 16x32 display here it is...i mean to say how to do connection???
 

Attachments

  • 12.jpg
    12.jpg
    1.2 MB · Views: 149
You have started down the route of column scanning again..

Look at this picture.. If you offset the led's by 45°, you can use straight tracks to make it easier.

The RED tracks are row connections.. The blue tracks are connected to the shift registers.
best way.png
 
You have started down the route of column scanning again..
NO no, i am ding ROw scainning please ignore that blue line on layout just tell me for Row scanning which you have suggested!!
 
If you connect as the picture I posted you should be good to go ( I suppose it doesn't matter which way you connect them )

As long as all the columns connect to the DATA and all the rows connect to the shift registers..

Once you have your LED board working... I'll help you make a snake game...
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top