Re: elementary code needed
"bromio" <bromio_47@yahoo.com>, you wrote:
elementary code needed
The code you describe below is in no way "elementary".
can someone help me to make code for digital clock using AT89S52. The
specs of clock are 12 hour clock,am-pm display,use timer interrupts to
have delay.two external inputs to adjust hours and minutes,use 4 digit
hex display multiplexing.
Basically, what you said is, "I have neither the money to hire
someone to do my firmware project for me, nor do I have the
competence to do it myself; can someone please do it for me
for free?"
No.
But for a price, yes.
Where are you located? I'm in Tustin, CA. Dial 411, say
"Tustin, California" and "Robbie Hatley". Call me and we'll
talk business.
Or if you just want general C++ hints, here's a clock program
I wrote a while back; you can have this for free:
// clock3.cpp
#include <iostream>
#include <stdlib.h>
#include <string.h>
#include <time.h>
using std::cout;
using std::endl;
std::string GetTimeString();
int main(void)
{
cout << GetTimeString() << endl;
return 0;
}
std::string GetTimeString()
{
// Get calendar time:
time_t caltime; // variable to hold calendar time
time(&caltime); // Assign time to caltime using std. lib. "time" function.
// Generate struct tm structured version of caltime:
struct tm StructuredTime; // variable to hold structured time
StructuredTime = *localtime(&caltime); // Load structure.
// Make C-string and load with formatted time:
static char FormattedTime[51];
for (int i=0;i<51;++i) FormattedTime[i]='\0';
strftime(FormattedTime, 50, "%I:%M%p, %A %B %d, %Y\n", &StructuredTime);
// Convert to C++ style string and return this string:
std::string Time = FormattedTime;
return Time;
}
You'll have to figure out how to funnel the time info into your
hardware. Do your own research. Google is your friend. Either
that, or call me and offer me money.
--
Cheers,
Robbie Hatley
East Tustin, CA, USA
lone wolf intj at pac bell dot net
(put "[usenet]" in subject to bypass spam filter)
http://home.pacbell.net/earnur/