LED scrolling message using ATmega32,dot matrix

6 replies [Last post]
nataraja
User offline. Last seen 10 weeks 3 hours ago. Offline
Joined: 06/11/2009
bOt Points: 90

hi

friends i have made a simple inexpensive(costing less than RS350) ...

LED scrolling message using

ATmega32,few transistors(2N2222),DOT matrix and breadboard to keep it simple

used WIN AVR C compiler and the coding goes like this

//sample code

#include <avr/io.h>
#define F_CPU 4000000UL
#include <util/delay.h>
typedef unsigned char u8;
typedef unsigned int u16;

int main(void)
{
  u8 i,k;
   u16 data[7]={1,2,4,8,16,32,64},da;
        DDRA=255;//data O/p to dot matrix
        DDRC=255; //control o/p to dot matrix
 da=1 ;
while(1)
{

for(k=0;k<5;k++)
{
PORTA=da;
PORTC=data[k];
for(i=0;i<99;i++)
{
_delay_ms(10);
}
da++;
if(da>=65)
{
da=1;
}

}//end K
}// end while

}//end of program

 

and have used the same(hardware) to play PING PONG game on DOT matrix

check this link for visuals

http://www.youtube.com/watch?v=-U4E0WWZr9A

 

nataraja
User offline. Last seen 10 weeks 3 hours ago. Offline
Joined: 06/11/2009
bOt Points: 90
re:vedio

the position of right base and left base where the ball bounce's can be controlled

using 4 switches

when the base does not come in the path of ball(obstruct)

the game ends ....

we can see this as all the LEDs of that side/column glow as in vedio left side column glows

 

350 lines of C code without using a timer"  for ping pong

heloitsadi
User offline. Last seen 50 weeks 3 days ago. Offline
Joined: 03/15/2009
bOt Points: 1321
Very good work natraja can

Very good work natraja can you provide me the link for the hardware circuitry used by you.. 

nataraja
User offline. Last seen 10 weeks 3 hours ago. Offline
Joined: 06/11/2009
bOt Points: 90
RE:heloitsadi

i have used control pins to sink the current and data pins to source current

we can use the opp too .....

used 2N2222 to sink current ...... and use MCU pins directly to drive the LEDs  when the matrix size increases this is not feasible


Link

nataraja
User offline. Last seen 10 weeks 3 hours ago. Offline
Joined: 06/11/2009
bOt Points: 90
hardware diagram
heloitsadi
User offline. Last seen 50 weeks 3 days ago. Offline
Joined: 03/15/2009
bOt Points: 1321
Ok thanks for that.. nice

Ok thanks for that.. nice work done by you.. keep posting,.. Some of my works can be found at my blog.. http://robozeal.blogspot.com

Join their as a moderator if you are interested in robotics. 

nataraja
User offline. Last seen 10 weeks 3 hours ago. Offline
Joined: 06/11/2009
bOt Points: 90
another vedio of my project