Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Algorithm for LEDs Moving Sign

Status
Not open for further replies.

boonreans

Junior Member level 3
Junior Member level 3
Joined
Jun 24, 2001
Messages
28
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
114
I want an algorithm for scan bitmap file for signbord please help!!

Thank! 8O
 

1. Use raster scanning method, see application circuit of NC6B595 shift register.
**broken link removed**
You will able to display binary data by shift to column register, then enable row driver. This scanning process must fast 30Hz (use timer interrupt to scan)

2. Convert bitmap file to raw binary, then you can show it by put to display buffer.
 

Thank you ZeRon!!

Do yo have how convert bitmap format in C language code..
 

I wrote converter by my self.
I can guide you How to convert the B&W .BMP format
to binary.
 

I don't know how to use timer with scanning prosses
Can you help me?
 

see interrupt relate doc in "ebook upload/download" for interrupt details.

-write code to config timer int. for 30Hz (~30mS.)
-write interrupt service routine to ...
- turn off ROW driver.
- increase ROW. (0-N, then overflow to 0)
- shift COL data at Nth bit of buffer to COL shift register.
- turn on ROW driver.

the LED dot matrix will scan row by row
automatically.
 

I made it witout timer interrupt, by scaning manual....
Can you give me c code with timer interrupt...

I couldn't do it with interrupt..
I will be happy if you help me..
 

There're some different in C code written The interrupt service routine for each Compiler.
Here is C code for KE*IL C-Compiler (MCS-51 family).
Just an example :!:

//#define CHIP_89C51RD2

#include <stdio.h>
#include <intrins.h>
#ifdef CHIP_89C51RD2
#include "reg51rd2.h"
#else
#include "reg51.h"
#endif

#define XTALFREQ 11059200
#define TIMERINTERVAL 0.030 /* Timer Interval 30mS. for 30Hz*/
#ifdef CHIP_89C51RD2
#define FCYCLE (XTALFREQ/6)
#else
#define FCYCLE (XTALFREQ/12)
#endif
#define TCONST (65536-((UINT)(TIMERINTERVAL*FCYCLE)))
#define HiTCONST (UCHAR)(TCONST/256)
#define LoTCONST (UCHAR)(TCONST%256)

#define TIMER0STOP (TR0=0)
#define TIMER0RUN (TR0=1)

#define ENABLE_INT (EA=1) /* enable interrupts */
#define DISABLE_INT (EA=0) /* disable interrupts */

// Timer0 Interrupt Service Routine
void timer0int_isr(void) interrupt 1 using 1 //USE REGISTERS BANK 1
{
TIMER0STOP;
TH0=HiTCONST;
TL0=LoTCONST;
TIMER0RUN;
// Do scan one row here
//...
//...
}


void timer0_init(void)
{
TH0=HiTCONST;
TL0=LoTCONST;
TMOD=(TMOD&0xF0)|0x01; /* 16 bits Timer */
ET0=1; /* Timer 0 Interrupt enabled */
TIMER0RUN; /* Timer 0 Started */
}

void main(void)
{
#ifdef CHIP_89C51RD2
AUXR=0x01;//Internal ERAM enabled, Reduce EMI (ALE off)
#endif
timer0_init();
ENABLE_INT;
//Do foreground process.
//...
//...
}
 

I did My LED display with 74164(eight bit shift register) which doesn't contain strobe pin......
I did it
Because of it ..
Can I use timer interrupt?
 

Thank You ZeRoN for your code,
my Dot matrix had been worked with loop but when i test your c code the screen start tremble you know why ??
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top