How to Set DMD Brightness

The Dot Matrix Display (DMD) is a 32x16 array of high-brightness LEDs for visually striking effects. [Product Page]
42n8
Posts: 46
Joined: Wed Dec 26, 2012 8:10 pm
Location: Auckland, NZ

Re: How to Set DMD Brightness

Post by 42n8 » Tue Jun 04, 2013 1:01 pm

Hi Geoff,
A small update to my last post.
The only thing that nOE is used for by the PIC library is blanking.
I had to rewrite the un/blanking functions and am now running without any reference to nOE in the code. It's all controlled by the PWM system.

Code: Select all

DMD.h

/*********************************************************************
void blank(void);
void unblank(void);
Sets the PWM on or off as blanking to replace the nOE function.
CCPR1L_copy is the old value of the CCPR1L register.
*********************************************************************/
static byte CCPR1L_copy;
void blank(void);
void unblank(void);
/********************************************************************/
DMD.c
/********************************************************************/
void blank() {
	CCPR1L_copy = CCPR1L;
	CCPR1L = 0;
}

void unblank() {
	CCPR1L = CCPR1L_copy;
}
/********************************************************************/
It has also meant that I have now done away with the wired gate and freed up a port in the process

I am now of the opinion that the library author missed the point of using the PWM pin for nOE.
This in turn means that when, not if, you get your code modified that you might submit it as a patch to the standard code so that it is available from the outset to everyone.

Regards

42n8

42n8
Posts: 46
Joined: Wed Dec 26, 2012 8:10 pm
Location: Auckland, NZ

Re: How to Set DMD Brightness

Post by 42n8 » Wed Jun 05, 2013 7:52 am

Hi Geoff,
Just a couple more things to do and I think we can put this one to bed.

The PWM system is about 5 times faster than standard port addressing on the PIC, which means
a longer "ON" time is possible. The consequence of the improved scan speed and higher duty cycle is higher power; more heat; no significant increase in maximum brightness and a reduction in the life of the 4953 Quad MosFETs. Therefore the library should set a maximum brightness value to limit the ON period. Additionally, defaulting it to the ON state at a safe level will avoid problems for new users.
  • The maximum brightness (PWM) value assigned to the CCPR1L Register during the the setup process is 0x10.
  • The default brightness (PWM) value assigned to the CCPR1L Register during the the setup process is 0x04.
These settings work well for the PIC library; arduino values may differ but it seems like a good place to start. Then the user can override the values to suit the application.

The solution wasn't obvious because it really is a library issue and we seldom suspect them.
The moral of the story... "Just because it's in the library, doesn't mean it's right".
Happily, the fix turns out to be as trivial as it gets but it's been a long time getting there.

Regards

42n8

kitbots
Posts: 11
Joined: Tue Oct 30, 2012 2:39 am

Re: How to Set DMD Brightness

Post by kitbots » Tue Sep 24, 2013 12:50 pm

42n8 wrote:Hi Geoff,
Just a couple more things to do and I think we can put this one to bed.

The PWM system is about 5 times faster than standard port addressing on the PIC, which means
a longer "ON" time is possible. The consequence of the improved scan speed and higher duty cycle is higher power; more heat; no significant increase in maximum brightness and a reduction in the life of the 4953 Quad MosFETs. Therefore the library should set a maximum brightness value to limit the ON period. Additionally, defaulting it to the ON state at a safe level will avoid problems for new users.
  • The maximum brightness (PWM) value assigned to the CCPR1L Register during the the setup process is 0x10.
  • The default brightness (PWM) value assigned to the CCPR1L Register during the the setup process is 0x04.
These settings work well for the PIC library; arduino values may differ but it seems like a good place to start. Then the user can override the values to suit the application.

The solution wasn't obvious because it really is a library issue and we seldom suspect them.
The moral of the story... "Just because it's in the library, doesn't mean it's right".
Happily, the fix turns out to be as trivial as it gets but it's been a long time getting there.

Regards

42n8

Sorry but its still not clear to me what the solution is...........could you post a sample program which varies the brightness of the display?


xiaozheng6666
Posts: 150
Joined: Wed Jan 17, 2018 2:00 am

xiaozheng6666

Post by xiaozheng6666 » Wed Jan 17, 2018 2:13 am

2018-1-17 xiaozheng6666
ralph lauren shirts
ugg boots clearance
michael kors outlet
canada goose
coach outlet online
vintage nhl jerseys
mont blanc outlet
fred perry clothing
cheap uggs
clarks shoes
michael kors handbags clearance
true religion outlet store
pandora outlet
nfl jerseys
michael kors outlet online
tory burch outlet
oakley sunglasses wholesale
uggs outlet
lacoste clothing
canada goose outlet
michael kors outlet
nike outlet store
christian louboutin outlet
michael kors outlet clearance
polo outlet
mcm bag
valentino outlet
coach outlet store online
michael kors outlet
uggs outlet
polo ralph lauren
michael kors outlet
cheap authentic nba jerseys
mulberry sale
mcm outlet
air max 90
canada goose outlet
polo shirts
pandora outlet online
coach outlet
ralph lauren shirts
mbt shoes outlet
moncler coats
fitflops sale
coach outlet
nfl jerseys
ray ban outlet
christian louboutin shoes
ray ban outlet
michael kors outlet
ralph lauren polo
coach outlet online
coach outlet store online
uggs outlet
michael kors outlet
air jordan 4 retro
ugg outlet online clearance
ugg canada
michael kors outlet clearance
pandora charms
lunette ray ban
michael kors outlet clearance
ugg boots clearance
longchamp outlet store
mbt shoes
ralph lauren outlet
pandora charm
fred perry clothing
ugg outlet
michael kors outlet clearance
polo outlet
nike air jordan 4
cheap snapbacks
coach factory outlet
ralph lauren pas cher
coach outlet online
oakley sunglasses
yeezy boost
moncler outlet
michael kors outlet
mont blanc pens
cheap oakley sunglasses
christian louboutin outlet
michael kors outlet online
canada goose
ugg outlet
ugg boots clearance
canada goose
moncler outlet
adidas nmd r1
christian louboutin
polo outlet
cheap jordan shoes
uggs outlet
adidas nmd
uggs outlet
mbt outlet
ray ban sunglasses outlet
christian louboutin
coach outlet online

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests