![]() | ![]() | ![]() |
| | #16 |
|
Refresh Rate = 1 / (column1period + column2period + column3period + column4period + column5period)
Last edited by Mike, K8LH; 26th June 2008 at 12:21 PM. | |
| |
| | #17 | |
| Quote:
I've been following your progress on the Clock/Calendar/Thermometer project (with Predko 2-pin 74LS174 LCD interface) and I suspected that you didn't have to change much code when porting from the 16F88 to the 18F248. Very nice project and writeup btw (as always)... Would you consider testing my DayOfWeek routine now that you have calendar capability? Mike Code: unsigned char Month = 6; // 1..12
unsigned char Day = 18; // 1..31
unsigned char Year = 08; // 0..99 (2000-2099)
// 71 instructions on 12F683 (BootsC 16)
unsigned char DayOfWeek() // Mike McLaren, K8LH, Aug '07
{ // returns 0..6 (Sun..Sat)
unsigned char Leap = 0;
const char Base [] = { 5, 1, 1, 4, 6, 2, 4, 0, 3, 5, 1, 3 };
Leap = (Year & 3) || (Month > 2);
return (Base[Month-1] + Day + Leap + Year + Year/4) % 7;
}
Last edited by Mike, K8LH; 26th June 2008 at 12:55 PM. | ||
| |
| | #18 |
|
Mike, I can confirm your algorithm works correctly until 1st March 2100. I wrote a little excel sheet to confirm it. ![]() Mike. | |
| |
| | #19 |
|
I breadboarded Mike's creation, going by the schematic he provided. Holy hell!!! That's a lot of wires to squeeze onto a little breadboard! As you can see, I gave up keeping it neat after a while. Just too many... ![]() The switches switch GP0 and GP1 between programming mode and run mode. But it doesn't work!! Some LEDs light, but no action. Mike! How accurate is that schematic? It doesn't say the resistor values, so I did some educated guessing.
__________________ ========================= Futz's Microcontrollers & Robotics ========================= | |
| |
| | #20 |
|
Sorry you're having problems. Transistors are 2N3904 NPN. Most people see that they're sourcing drivers and assume they're PNP (because the drawing is so fuzzy). I originally used 510 ohm base resistors and 20 ohm current limiting resistors on the rows but the board in the picture has been taken apart so many times that there are NO resistors at all at the moment. Bad practice I know. It just shows how forgiving this stuff is... Let me know how it goes? Mike Last edited by Mike, K8LH; 27th June 2008 at 04:50 AM. | |
| |
| | #21 | ||
| Quote:
Quote:
Guess I'll go over the whole thing and trace every wire again. Sigh...
__________________ ========================= Futz's Microcontrollers & Robotics ========================= | |||
| |
| | #22 |
|
Wrote some test code and I have something happening. LED's are flashing, but not quite properly under my control yet. It's not dead. I just haven't figured out what the problem is yet.
__________________ ========================= Futz's Microcontrollers & Robotics ========================= | |
| |
| | #23 |
|
I don't see a bypass cap' across VDD and VSS pins in that photo'.
Last edited by Mike, K8LH; 27th June 2008 at 06:00 AM. | |
| |
| | #24 |
|
Nice design Sir ...I like it very much.... May I hack your hardware design? but not the code ![]() Also can you show the underneath of your board Sir if you don't mind? | |
| |
| | #25 | |
| Quote:
OK, OK! I'll put one on there! ![]() I have it working as expected with my code. Wonder if it's my current limiting resistor values that's making yours not appear to work?
__________________ ========================= Futz's Microcontrollers & Robotics ========================= Last edited by futz; 27th June 2008 at 06:08 AM. | ||
| |
| | #26 |
|
A YouTube video of the test code at work.
__________________ ========================= Futz's Microcontrollers & Robotics ========================= | |
| |
| | #27 |
|
Futz nice video ![]() I like to compact my real Knight Rider Running Lights project with a compact matrix arrangement on a 8 pin PIC. I like to do the hardware like Mike did.Anyway I need his rights. | |
| |
| | #28 | |
| Quote:
I'm not sure what you mean by "hack my design". Attached is picture of bottom of board. It contains one surface mount PNP row driver transistor on GP0 (an experiment to increase peak current from 20 ma to around 50 ma). Mike | ||
| |
| | #29 | |
| Quote:
Mike | ||
| |
| | #30 |
|
Hi Mike, Nice demo, what do you have planned for the practical usage of the plex.? I expect it will be a slighter larger PIC, to enable an external input of some kind. Regards
__________________ Eric " Good enough is Perfect " I will NOT answer PM's requesting technical help, please use the Forum PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/ | |
| |
|
| Tags |
| boostc, charlieplexed, pwm |
| Thread Tools | |
| Display Modes | |
| |
Similar | ||||
| Title | Starter | Forum | Replies | Latest |
| BoostC question.. AddressOf | Mike, K8LH | Micro Controllers | 8 | 25th June 2008 12:20 AM |
| LCD degree symbol with sprintf (BoostC) | futz | Micro Controllers | 29 | 5th June 2008 05:19 AM |
| math.h and lib for BoostC? | futz | Micro Controllers | 3 | 31st March 2008 06:29 AM |
| Charlieplexed code segment for the Cricket Thermostat | William At MyBlueRoom | Micro Controllers | 2 | 14th March 2006 05:12 PM |
| My PIC Projects Site NEW (includes 2 Charlieplexed Display) | William At MyBlueRoom | Electronic Projects Design/Ideas/Reviews | 0 | 28th February 2006 02:31 PM |