Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronic Content > Electronic Projects


Electronic Projects A collection of small electronic circuits and projects you can build.

Reply
 
Tools
Old 10th September 2008, 08:07 AM   #16
Default

Quote:
Originally Posted by wy6k View Post
Just use current limiting resistors on the segment lines and connect the transistor collectors to 12 volts and you can have whatever brightness you want.

If you want to keep it a one power supply project, use 12 volts as the power supply and generate the 5v with a voltage regulator (7805).

Mike
Hi Mike, WY6K,

Keeping in mind the 5v PIC pins, an NPN/PNP pair or N-FET/P-FET pair for the high side drivers does indeed work well with traditional multiplexed displays but it's a bit problematic for Charlieplexed displays.

Regards, Mike, K8LH
Mike, K8LH is online now  
Old 10th September 2008, 08:18 AM   #17
Default

Quote:
Originally Posted by blueroomelectronics View Post
Personally I'm one of those types who tries to match the crystal frequency to the task at hand. Using the generic 4MHz or multiples thereof for everything always baffled me, after all crystals are about the same price and there are many common frequencies available. 19.6608MHz is a handy for both RTC & UART stuff.
Unfortunately, that's about all that crystal frequency is good for (grin).

Using wierd crystal frequencies always baffled me but if you can show me how to accomplish any operation in exact 1 usec increments using one of those crystal frequencies then you'll have a convert (grin)...
Mike, K8LH is online now  
Old 10th September 2008, 08:58 AM   #18
Default

I can see how a 19.6608MHz crystal is good for serial communications but how is it any better for a real time clock?

Mike.

Last edited by Pommie; 10th September 2008 at 08:58 AM.
Pommie is offline  
Old 10th September 2008, 09:30 AM   #19
Default

Quote:
Originally Posted by Pommie View Post
I can see how a 19.6608MHz crystal is good for serial communications but how is it any better for a real time clock?
I can't see how it's any better for serial either, it works 100% perfectly with a 20MHz or 4MHz crystal - so how does getting an exact frequency match give any improvement?.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 11th September 2008, 01:26 AM   #20
Default

Quote:
Originally Posted by Mike, K8LH View Post
Hi Mike, WY6K,

Keeping in mind the 5v PIC pins, an NPN/PNP pair or N-FET/P-FET pair for the high side drivers does indeed work well with traditional multiplexed displays but it's a bit problematic for Charlieplexed displays.

Regards, Mike, K8LH
Ahhh. I see that now. In that case, you need another set of column transistors and invert the logic on the n-1 line? (I'm not really familiar with Charlieplexing, but I think I get it). MPU output drives base of NPN which pulls down the base of the PNP with it's emitter connected to 12 volts. Right?
wy6k is offline  
Old 11th September 2008, 10:36 AM   #21
Default

Quote:
Originally Posted by wy6k View Post
MPU output drives base of NPN which pulls down the base of the PNP with it's emitter connected to 12 volts. Right?
Check the 'Hardware Extras' section of my tutorials for an example.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 15th September 2008, 02:48 PM   #22
Default

Quote:
Originally Posted by Pommie View Post
What a horrible piece of code and it uses Timer0. If you do a search Mike (the OP) posted a very good method to adjust for crystal inaccuracies in software.

Mike.
I don't see it. Mind pointing that out? What's the matter? Don't like assembler?
Space Varmint is offline  
Old 16th September 2008, 11:39 PM   #23
Default

The "software trimmer" routine is described briefly in the 3rd or 4th post in this thread...

Cap values for crystal
Mike, K8LH is online now  
Old 17th September 2008, 12:00 AM   #24
Default

Quote:
Originally Posted by Space Varmint View Post
I don't see it. Mind pointing that out? What's the matter? Don't like assembler?
What on earth is this all about. Everyone is free to program in the language of his or her choice.
__________________
Please post questions to the forums. PM's are for personal communication.

BCHS/3v0's Tutorials
Junebug USB PIC programmer kit., USB Bit Whacker,
The 15 Minute Printed Circuit Board! (+drill time)
3v0 is online now  
Old 17th September 2008, 03:15 AM   #25
Default

Quote:
Originally Posted by 3v0 View Post
What on earth is this all about. Everyone is free to program in the language of his or her choice.
Go back. There's two things. First let me say this guy has done a very fine job on his clock. I like it very much and clocks interest me to begin with. So I threw in an old clock I had done a few years back and it had what I think is a unique feature. All the clocks I have seen usually have an adjustable capacitor to compensate for crystal discrepancies or stray capacitance where the clock will run ever so slightly fast or slow. It is usually very fine and may take a week to show up. I put a programmable adjustment in it that will do the same thing as a capacitor. It is a very fine adjustment that uses the timer and two delay loops that inter-act with each other. He told me this program also had it and I asked him to point it out please because I didn't see it. Then he bashed my code. Well I can't figure that out either except that it is in assembler so I'm just trying to figure out why. I thought since the OP was still building his clock he might get some ideas from it. No biggy. No hard feelings here

edit:

Another thing is even on the 8253 TIC which is used in PC's their software correction occurs every few seconds to minutes. This one has all seconds the exact same length of time.

Last edited by Space Varmint; 17th September 2008 at 05:15 AM.
Space Varmint is offline  
Old 17th September 2008, 03:55 AM   #26
Default

SV,

I am a C guy. I can read and write a little ASM but it help if there are lots of good comments and I have the cheat sheet nearby. IMHO we invented compilers for a very good reason... but as I said to each his own.

But for the above reason I am not in any position to get in the middle of a debate about asm code.

EDIT: I know I sort of stuck my big nose in this one.
__________________
Please post questions to the forums. PM's are for personal communication.

BCHS/3v0's Tutorials
Junebug USB PIC programmer kit., USB Bit Whacker,
The 15 Minute Printed Circuit Board! (+drill time)

Last edited by 3v0; 17th September 2008 at 03:56 AM.
3v0 is online now  
Old 17th September 2008, 05:05 AM   #27
Default

Quote:
Originally Posted by 3v0 View Post
SV,

I am a C guy. I can read and write a little ASM but it help if there are lots of good comments and I have the cheat sheet nearby. IMHO we invented compilers for a very good reason... but as I said to each his own.

But for the above reason I am not in any position to get in the middle of a debate about asm code.

EDIT: I know I sort of stuck my big nose in this one.
Well you asked for it didn't ya? No prob man. It's just I was probably programming when he was in diapers and he's gonna tell me my code sucks? He don't even understand it.
Space Varmint is offline  
Old 17th September 2008, 07:15 AM   #28
Default

Quote:
Originally Posted by Space Varmint View Post
I don't see it. Mind pointing that out? What's the matter? Don't like assembler?
Mike (the OP) already pointed out the post I had in mind, see above.

I did not realise that you had written the code and I called it horrible because it is not even source code, it is a disassembly listing. This makes it very difficult to understand or use and practically impossible to alter. It also uses timer 0 which is a very bad timer to use for any sort of RTC. It writes values to the timer0 counter which always zeroes the prescaller. This combined with the variable latency of the interrupt will cause timing errors.

As for not liking assembler, I wrote my first assembler program around 1980 and have been writing in it every since.

Mike.
Pommie is offline  
Old 17th September 2008, 03:59 PM   #29
Default

Quote:
Originally Posted by Pommie View Post
Mike (the OP) already pointed out the post I had in mind, see above.

I did not realise that you had written the code and I called it horrible because it is not even source code, it is a disassembly listing. This makes it very difficult to understand or use and practically impossible to alter. It also uses timer 0 which is a very bad timer to use for any sort of RTC. It writes values to the timer0 counter which always zeroes the prescaller. This combined with the variable latency of the interrupt will cause timing errors.

As for not liking assembler, I wrote my first assembler program around 1980 and have been writing in it every since.

Mike.
There you are. I'm glad you didn't get banned. There was talk in chit-chat I'm sure you know.
Any latencies will be the same length of time as long as they are done the same way (TMR0). I know this without a doubt because I have used the same technique to produce a reference frequency for a PLL. I had a receiver tuned to the output frequency of the PLL with the BFO turned on so that I had a beat note (tone/pitch). If that were true what you said then I would hear a change in the pitch. The receiver was also digitally locked. I could purposely change the frequency by changing the "jam load" value and to demonstrate just how redundant the timing is with TMR0 I was able to use the timer to run through a do nothing loop and by changing an instruction I could change frequency just do to the different machine cycle times for different instructions.

Summary: Latencies are repetitive not random.
Space Varmint is offline  
Old 19th September 2008, 08:59 AM   #30
Default

Quote:
Originally Posted by Space Varmint View Post
All the clocks I have seen usually have an adjustable capacitor to compensate for crystal discrepancies or stray capacitance where the clock will run ever so slightly fast or slow. It is usually very fine and may take a week to show up. I put a programmable adjustment in it that will do the same thing as a capacitor. It is a very fine adjustment that uses the timer and two delay loops that inter-act with each other. He told me this program also had it and I asked him to point it out please because I didn't see it. Then he bashed my code. Well I can't figure that out either except that it is in assembler so I'm just trying to figure out why. I thought since the OP was still building his clock he might get some ideas from it.
Space Varmint,

Please get your facts straight. I am the Original Poster (OP) and I didn't make any comments about your example program, good or bad.

I also use a "software trimmer" of sorts in some of my Clock projects but did not include it in this novelty single-chip design.

Thank you for pointing out the feature and for the program example.

Mike
Mike, K8LH is online now  
Reply

Tags
chip, clock, k8lh, novelty, single

Thread Tools
Display Modes


Similar
Title Starter Forum Replies Latest
Single Chip BCD Clock Mike, K8LH Micro Controllers 4 3rd November 2008 05:00 AM
Drive 2 displays with a single 4511 chip? ghall426 Electronic Projects Design/Ideas/Reviews 1 18th December 2006 09:45 PM
Program a single modem chip without AT-Cmd? liupengjian Micro Controllers 0 26th July 2004 09:48 AM
About a suitable Single Chip CCD girishns Datasheet/Parts Requests 1 29th January 2004 03:42 PM
Single chip H-bridge Exo Datasheet/Parts Requests 4 24th November 2003 10:41 PM



All times are GMT. The time now is 12:02 AM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker