That's what I get for posting before coffee.How would you connect a single push button switch to disconnect GP0/ICSPDAT and GP1/ICSPCLK from the LED circuitry when you push it and hold it down?
led[0] = led[19] = 31;
led[1] = led[18] = 23;
led[2] = led[17] = 18;
led[3] = led[16] = 14;
led[4] = led[15] = 11;
led[5] = led[14] = 9;
led[6] = led[13] = 7;
led[7] = led[12] = 5;
led[8] = led[11] = 3;
led[9] = led[10] = 2;
while(1){
temp=led[0];
for(x=0;x<19;x++){
led[x]=led[x+1];
delay_ms(3);
}
led[19]=temp;
delay_ms(3);
}
}
led[0] = led[19] = 12;
led[1] = led[18] = 9;
led[2] = led[17] = 7;
led[3] = led[16] = 5;
led[4] = led[15] = 3;
led[5] = led[14] = 1;
led[6] = led[13] = 0;
led[7] = led[12] = 0;
led[8] = led[11] = 0;
led[9] = led[10] = 0;
while(1)
{ temp=led[0];
for(x=0;x<19;x++)
{ led[x]=led[x+1];
delay_ms(3);
}
led[19]=temp;
delay_ms(3);
}
}
Hey, that looks great!I've still got the red led bars in mine and they're incredibly bright so I toned it down a little. I also wanted a little more dark area in there, so.....
I had noticed that my delays were ridiculously short and yet worked fine. Figured (correctly) it was because it's a very busy chip.Also note that the BoostC delay routines will run about 42% slower due to the ISR 'overhead'.
I don't understand.
You wouldn't need a slide switch at all for GP3 because that would be connected to a normally open push button switch.
How would you connect a single push button switch to disconnect GP0/ICSPDAT and GP1/ICSPCLK from the LED circuitry when you push it and hold it down?
I think what Mike was suggesting was to use a momentary switch for GP3 instead of a slider. Hold the button down for programming mode. Either way, it's still a switch and you'd still have the use of GP3 for input.after the switch provision, GP3 could also be used as Futz put it in an earlier reply. Perhaps could expand the design further,using GP3 .
led[0] = led[19] = 12;
led[1] = led[18] = 8;
led[2] = led[17] = 5;
led[3] = led[16] = 3;
led[4] = led[15] = 2;
led[5] = led[14] = 1;
led[6] = led[13] = 1;
led[7] = led[12] = 0;
led[8] = led[11] = 0;
led[9] = led[10] = 0;
while(1)
{
temp=led[0];
while(colpos != 0b00100000); // sync' to 16-msec frame interval
for(x=0;x<19;x++)
{ led[x]=led[x+1];
}
led[19]=temp;
delay_ms(26);
}
}
Sorry for the confusion guys. I installed a push button switch on my board to use within the program for selecting different modes. Then I suggested that you don't really need the ICSP/RUN slider switch because the push button switch is normally open and it won't adversely affect PICKit2 programming operations.I think what Mike was suggesting was to use a momentary switch for GP3 instead of a slider. Hold the button down for programming mode. Either way, it's still a switch and you'd still have the use of GP3 for input.
OK, now I'm really confused.Sorry for the confusion guys. I installed a push button switch on my board to use within the program for selecting different modes. Then I suggested that you don't really need the ICSP/RUN slider switch because the push button switch is normally open and it won't adversely affect PICKit2 programming operations.
Nice. Smooth as buttah!When you get a chance could you try this snippet?
I removed the delay within the loop to smooth out the transitions. I also synchronized the LED update to the 16 msec frame rate. Please tell me if you notice any difference? It looks incredibly smooth here...
Well I don't have an ICSP jack on my board but if I did the switch would always be connected to the VPP pin on the ICSP connector so you would have to make sure you didn't press the push button while you were programming the PIC.Oh. It's connected to VPP until you press the button? That makes sense.
Very Nice Mike! Perhaps top row can be from left to right while bottom on the reverse. like two trains traveling in opposite directions.Well I can see there's a whole new set of skills I need to master to put videos up on YouTube (grin). You guys make it looks so easy (grin).
Anyway, here's a link to the video of that last program in operation; Charlieplexed PWM-32
The LEDs are still washing out or overloading the camera and I don't know how to tone it down to get good video. Those LED patterns are really very crisp and clear in person with a very nice fading effect.
I've also attached an updated program listing because the listing in the very first post is missing an instruction at the top of the ISR to clear the Timer 2 interrupt flag (oops!). Sorry guys.
Mike
It's the sensors they use in these digi cameras. Mine can't take a decent picture of any LED, including LCD backlights. Colors are always wrong and blown out over-bright like you say.The LEDs are still washing out or overloading the camera and I don't know how to tone it down to get good video. Those LED patterns are really very crisp and clear in person with a very nice fading effect.
It's vitally important to have tons of light for macro photography. Here's a quote from an older post of mineFutz, your photos and videos still look much better than mine. As I look at them it seems you have much better (brighter) lighting in many of them. Perhaps I'll give that a try when I have more time.
How did that pic get to be so white? Did you use flash? If so, here's my tip of the day. In general, NEVER use flash on macros. If you have a fancy remote flash that you can bounce off the ceiling or something to diffuse it, then fine. If it's just a garden variety point-and-shoot camera, disable the flash while shooting macros. Use daylight or artificial, but lots of it, because these little cameras have little lenses. They don't gather much light. Your light should be diffused and non glarey and from all directions to prevent sharp shadows
Use the tightest aperture (biggest F number) you can (AV Priority), to get decent depth of field. This means you gather less light (smaller aperture) so you have to pour the light to it.
Depth of field means that nearer parts and farther away parts of your photo will both be in focus. Shallow DOF (large aperture = small F number) means that your focus range might be as narrow as 1/2". Everything else is out of focus. But you need less light because of the bigger aperture. Deep DOF (small aperture = large F number) means that your focus range will be much larger. But you need more light because of the smaller aperture. (Aperture is the size of hole the light goes thru inside the lens to get to the film (or sensor, in digi cams)).
Using a smaller aperture (bigger F number) to get good DOF also means that, unless you can provide a LOT of light, you need to use longer exposures. That means using a tripod and the timer (unless you have a remote shutter release) to prevent your finger pushing the button from shaking the camera.
Digital cameras sort of emulate film by providing you with a range of ISO's. Depending on your camera, you might get away with as high as 200 - 400 (I stay down at 50 - 100), but the higher you go, the more noise. The pics get more grainy and crappy. Keep the ISO as low as possible. If your camera has auto-ISO, disable it for technical shooting. It's fine for pics of the fam damily outdoors, but not for tech shoots. This again means you need more light. Higher ISO films are "faster" and need less light. But their photo quality is lower.
And last, but not least, THE MOST IMPORTANT THING YOU MUST KNOW ABOUT DIGITAL CAMERAS is how to manage White Balance. Before you shoot any photo, put a piece of pure white paper or card stock where your target is going to be, and at the same angle, and custom set your white balance. Don't rely on auto white balance (AWB). The presets are sort of ok sometimes, but not very accurate.
Different shots at different angles, different times of day, different kinds of artificial and natural light, etc., all can strongly affect where your white balance should be set. For fun, custom adjust it to crazy colors, effectively telling the camera that green is white or blue is white or whatever.
If you don't set white balance correctly you'll spend lots of time in Photoshop or Gimp color correcting your photos. I color correct probably 90% of my pics anyway, at least a little, even with good white balance. That's another article. It's real easy to color correct with those tools, but the technique isn't obvious if you haven't done it before. The auto-color-correct filters in those programs DO NOT WORK. They might do an acceptable job on 1 out of 1000 photos, if you're lucky. You must do it manually.
For macro shooting, a dirt cheap homebuilt light box (or light tent) is a perfect cure for a lot of the above problems. They're very simple to make. Here's some links:
Light Box / Light Tent Photo Gallery by Bill Huber at pbase.com
**broken link removed**
**broken link removed**
End of lesson 1
They are two different things.Mike please help me I have a problem.
I’m confused with the duty cycle & the refresh rate in a LED matrix system.
Are they are two different things or one?
Yes, each LED can be lighted 20% or 1/5th of the time. A 20% duty cycle is pretty good for a multiplexed LED display.In your schematic it says 20% duty cycle. Does it means each LED driving on 20% duty cycle? 20% means almost 1/5 from the brightness, which is too dim.
My understanding is that a refresh rate of less than about 60 Hz may cause an LED display to be perceived as flickering.If I have a matrix of 5 columns & 8 rows is there any formula to calculate the best delay in between the columns? So I can display it nicely without flickering & with a decent brightness.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?