Journal #6509

Posted 14 years ago2010-04-17 18:12:56 UTC
For years now I wanted to make a hand-made digital clock with a PIC microcontroller. I haven't even thought a design for the circuit board, and I only have half the software done (the non-hardware-specific part). I wrote most of that program (should I call it Operating System?) while in math class last year, when I was bored of all that crap. I even took the time to figure out how to compensate for the time offset created by a power of 2 oscillator - which, if left unattended, would add up to 1 second every 14 minutes (with a 4MHz crystal oscillator)... and that would make a pretty shitty clock.

I never even drawn a line representing hardware design yet. I know how I want most of it, but I'm thinking I'm too lazy to actually finish the job.

And I don't even know why I'm posting this. Does anyone care? :P

9 Comments

Commented 14 years ago2010-04-18 06:26:26 UTC Comment #61911
I care, it's fun to read about other people's projects. Hope you'll finish it sometime. What language do you use for the programming? C? Assembly?
Commented 14 years ago2010-04-18 07:25:17 UTC Comment #61910
I care... in the future I really hope I'll know how to operate with things like you said there :P
Commented 14 years ago2010-04-18 08:46:47 UTC Comment #61906
Holy shit dude. RIGHT now i'm taking a PIC micro-controller programming class lmfao. That's a coincidence.
As for hardware design, all you could do is have the PIC keep seconds, minutes and hours, and output those numbers to a decoder into a few 7-segment displays, OR you could just get a LCD display....
I've been thinking of hooking my car up with ice blue LEDS for night cruising :) just under the foot rests and beneath the cupholders. With a simple 5v voltage-reg circuit and a on-off switch :)
I could get even fancier with a potentiometer controlling a PWM for brightness..... nah
Commented 14 years ago2010-04-18 19:57:07 UTC Comment #61912
@potatis: Assembly all the way. Nothing beats flipping every bit yourself.

@Striker: You'll learn. It's really fun! I love to do this.

@Tetsu0: Nice. It may be fun to share projects. I know all I need to make this thing work - I've done it before in school - down to driving 7-segments or even LCDs. I don't even need to think about it, I just need to take the time to actually write the code. As for the PWM, you can instead use two touch switches to increase or decrease a register? That'd be less A-D work.

I have a custom-made (built back in school) PIC programmer board, that apparently runs on generic software from the internet instead of the uber-expensive PicSTART with proprietary software. Sadly, not long ago I realised that I lost my notes on how it works (needs some bit-flipping configured) and it's been so long that I have long forgotten. I'm afraid it might blow my PICs if I use it wrong...
Commented 14 years ago2010-04-18 21:21:00 UTC Comment #61907
That's a shame. our school has brand new PIC boards, and we have USB attachments for it.
Commented 14 years ago2010-04-18 22:33:33 UTC Comment #61913
Sounds better than serial! Or was it parallel? I even forgot that. I haven't touched it in four years...

By the way, I also remember a small (abandoned) project in which I needed to measure voltage with a 16F877A, both negative and positive. Converting 0-30 to 0-5 is simple enough, but -30-0 to 0-5 got me stuck. Any ideas on how to do that? Maybe some of my knowledge of electronics is starting to fade away after all this time unused...
Commented 14 years ago2010-04-19 05:18:05 UTC Comment #61909
chea! me care too =)

I always wanted to do stuff like that--i wanted to build a chess clock--, but i never got around to it.. good for you!

)

Commented 14 years ago2010-04-19 10:26:48 UTC Comment #61908
What were you trying to do with the conversions? was that voltage? [0-30, -30-0v ?]

Oh... and would this help you at all? http://www.best-microcontroller-projects.com/schematic-drawing-program.html

and.. for a LCD 0-5v volt meter:
http://www.best-microcontroller-projects.com/lcd-volt-meter.html

Just found some while searching for your PIC
Commented 14 years ago2010-04-19 15:37:41 UTC Comment #61914
That program would indeed help me. Back in school, for some reason we had to use some DOS app (Tango PCB, I remember well) which I don't think I have anymore. So it will definitely come in handy the next time I need to make any kind of board.

As for the volt meter, it's not exactly that part I'm needing. I already know how to program the PIC itself, what I couldn't figure out back then was how to convert the output of a -30v-30v power supply to 0-5v. The PIC's A-D (obviously) can only read a 0-5v range. I can scale 0-30v to 0-5v, however it's -30-0 that I don't know how to invert.

You must log in to post a comment. You can login or register a new account.