This is a group for folks designing and programming embedded systems using the Rabbit Semiconductor C-programmable microcontroller. Rabbit Semi is a spin-off from Z-World who makes a variety of embedded modules and tools. This group is not affiliated with either Rabbit or Z-World, but is a user forum for sharing ideas, asking questions,
flaunting knowledge, and other typical user group stuff. The Rabbit is a powerful uC, supported by a full-featured C-compiler.
Does PK2200 have RTC support? - "Fernand Francis T. Robles" - May 1 9:34:16 2008
I needed to know how to obtain the rtc values from the PK2200 BIOS so I
asked the Rabbit support I was given an answer which did'nt worked and
also asked to look at the sample program named RTCTEST.C the file was
not in the sample library and some of the topics regarding RTC is not
found in the PK2200 manual even though the Index says it is in some of
the pages. Does PK2200 really have such a function or am I just
searching for something that was no longer implemented on a PK2200.
------------------------------------

(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )
RE: Does PK2200 have RTC support? - Nathan Johnston - May 1 18:53:50 2008
I just took a look at one of our old PK2200 projects and we just used
tm_rd to read the time. At one stage ZWorld changed from using Toshiba
RTC chips to using Epson which resulted in library changes. This should
all be in the latest version of 5 (5.26) but if you're using an older
version you may need to port the library back to it.
Regards,
Nathan
-----Original Message-----
From: r...@yahoogroups.com [mailto:r...@yahoogroups.com]
On Behalf Of Fernand Francis T. Robles
Sent: Thursday, 1 May 2008 3:59 PM
To: r...@yahoogroups.com
Subject: [rabbit-semi] Does PK2200 have RTC support?
I needed to know how to obtain the rtc values from the PK2200 BIOS so I
asked the Rabbit support I was given an answer which did'nt worked and
also asked to look at the sample program named RTCTEST.C the file was
not in the sample library and some of the topics regarding RTC is not
found in the PK2200 manual even though the Index says it is in some of
the pages. Does PK2200 really have such a function or am I just
searching for something that was no longer implemented on a PK2200.

(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )
Re: Does PK2200 have RTC support? - "Fernand Francis T. Robles" - May 1 22:59:10 2008
Were using Dynamic C v6.x our device is a z180 PK2200.
what libraries should I use, I already received an from rabbit about
RTC and a sample RTC program but it didnt work it still displayed an
8 on every variable I tried to use from the struct tm variable. or
atleast everytime i read from the clock "tm_rd(&variable);" all the
variables in tm will chang into 8. did my clock fail or is my methods
obsolete?
Here's an email I'm gonna send them now! If any of you can spare some
advice regarding the problem I'd appreciate it.
The idea of obtaining the RTC value from the PK seemed so simple I
can't understand why I'm it's not working even their sample is not
working well, I plan to request another PK to use but it's unlikely
that I'll get a different result because I already got
another "8:8:8" on the first time i tried using another PK?
==============beginning of email===================
I tried the sample but to it was not able to display anything only a
beep then nothing whatsover?
My device is a PK2200 with a number on the right side of the
keypad "901-0014" probably the serial#
//22_RTC
#use cplc.lib
char month[12][4] =
{"Jan", "Feb","Mar","Apr","May","Jun", "Jul", "Aug",
"Sep","Oct","Nov","Dec"};
main()
{
struct tm t;
char array[10];
char old_sec;
uplc_init();
printf("please enter year (2008) ");
gets(array);
t.tm_year = atoi(array) - 1900;
do
{
printf("please enter number of month (1 = Jan, 12 =
Dec) ");
gets(array);
t.tm_mon = atoi(array);
}while(t.tm_mon < 1 || t.tm_mon > 12);
printf("please enter day of the month ");
gets(array);
t.tm_mday = atoi(array);
printf("please enter hour ");
gets(array);
t.tm_hour = atoi(array);
printf("please enter min ");
gets(array);
t.tm_min = atoi(array);
printf("please enter sec ");
gets(array);
t.tm_sec = atoi(array);
if(tm_wr(&t))
{
printf("clock not installed or failing\n");
while(1);
}
old_sec = 0;
while(1)
{
do
{
tm_rd(&t);
}while(t.tm_sec == old_sec);
printf("%s %d/%4d %2d:%02d:%02d\n",
month[t.tm_mon - 1],
t.tm_mday,
t.tm_year + 1900,
t.tm_hour,
t.tm_min,
t.tm_sec );
old_sec = t.tm_sec;
}
}
<<<<<<<<<<<<<<<<<<<1st attempt running code as it
is>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
output: just a beep sound
<<<<<<<<<<<<<<<<<<<2nd attempt running code as it
is>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
output: another beep sound "it sounded like the first one."
*I waited for 2 mins. and there was no display or whatsoever.
<<<<<<<<<<<<<<<<<3rd attempt running code as it is>>>>>>>>>>>>>>>>>
output: a beep sound
waited for 10 mins still no output from the monitor
After wards I removed the line "uplc_init();" and this was the output
<<<<<<<<<<<<<<<1st attempt w/out "uplc_init
()">>>>>>>>>>>>>>>>
please enter year (2008)2008
please enter number of month (1 = Jan, 12 = Dec) 5
please enter day of the month 2
please enter hour 8
please enter min 46
please enter sec 0
Aug 8/1988 8:08:08
============end of email====================
------------------------------------

(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )
RE: Re: Does PK2200 have RTC support? - Nathan Johnston - May 1 23:17:12 2008
Sorry I can't help you with DC6 as I've never used it.
Just a tip with getting support. Keep the example as simple as possible
e.g. just hardcode some values into a tm struct, use tm_wr, then read
back the results with tm_rd.
Regards,
Nathan
-----Original Message-----
From: r...@yahoogroups.com [mailto:r...@yahoogroups.com]
On Behalf Of Fernand Francis T. Robles
Sent: Friday, 2 May 2008 11:40 AM
To: r...@yahoogroups.com
Subject: [rabbit-semi] Re: Does PK2200 have RTC support?
Were using Dynamic C v6.x our device is a z180 PK2200.
what libraries should I use, I already received an from rabbit about
RTC and a sample RTC program but it didnt work it still displayed an
8 on every variable I tried to use from the struct tm variable. or
atleast everytime i read from the clock "tm_rd(&variable);" all the
variables in tm will chang into 8. did my clock fail or is my methods
obsolete?
Here's an email I'm gonna send them now! If any of you can spare some
advice regarding the problem I'd appreciate it.
The idea of obtaining the RTC value from the PK seemed so simple I
can't understand why I'm it's not working even their sample is not
working well, I plan to request another PK to use but it's unlikely
that I'll get a different result because I already got
another "8:8:8" on the first time i tried using another PK?
==============beginning of email===================
I tried the sample but to it was not able to display anything only a
beep then nothing whatsover?
My device is a PK2200 with a number on the right side of the
keypad "901-0014" probably the serial#
//22_RTC
#use cplc.lib
char month[12][4] =
{"Jan", "Feb","Mar","Apr","May","Jun", "Jul", "Aug",
"Sep","Oct","Nov","Dec"};
main()
{
struct tm t;
char array[10];
char old_sec;
uplc_init();
printf("please enter year (2008) ");
gets(array);
t.tm_year = atoi(array) - 1900;
do
{
printf("please enter number of month (1 = Jan, 12 =
Dec) ");
gets(array);
t.tm_mon = atoi(array);
}while(t.tm_mon < 1 || t.tm_mon > 12);
printf("please enter day of the month ");
gets(array);
t.tm_mday = atoi(array);
printf("please enter hour ");
gets(array);
t.tm_hour = atoi(array);
printf("please enter min ");
gets(array);
t.tm_min = atoi(array);
printf("please enter sec ");
gets(array);
t.tm_sec = atoi(array);
if(tm_wr(&t))
{
printf("clock not installed or failing\n");
while(1);
}
old_sec = 0;
while(1)
{
do
{
tm_rd(&t);
}while(t.tm_sec == old_sec);
printf("%s %d/%4d %2d:%02d:%02d\n",
month[t.tm_mon - 1],
t.tm_mday,
t.tm_year + 1900,
t.tm_hour,
t.tm_min,
t.tm_sec );
old_sec = t.tm_sec;
}
}
<<<<<<<<<<<<<<<<<<<1st attempt running code as it
is>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
output: just a beep sound
<<<<<<<<<<<<<<<<<<<2nd attempt running code as it
is>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
output: another beep sound "it sounded like the first one."
*I waited for 2 mins. and there was no display or whatsoever.
<<<<<<<<<<<<<<<<<3rd attempt running code as it is>>>>>>>>>>>>>>>>>
output: a beep sound
waited for 10 mins still no output from the monitor
After wards I removed the line "uplc_init();" and this was the output
<<<<<<<<<<<<<<<1st attempt w/out "uplc_init
()">>>>>>>>>>>>>>>>
please enter year (2008)2008
please enter number of month (1 = Jan, 12 = Dec) 5
please enter day of the month 2
please enter hour 8
please enter min 46
please enter sec 0
Aug 8/1988 8:08:08
============end of email====================

(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )
Re: Does PK2200 have RTC support? - "Fernand Francis T. Robles" - May 2 8:54:27 2008
thanks for the advice although were going to change the approach in
getting the time values. We opted to use a variable for seconds and
then increment it per second rather than rely on tm_wr and tm_rd
although, 'how to use tm_rd and tm_wr' may be a question that will
keep me up at night. It really seemed simple I'm still not sure if the
problem was in the programming or in the hardware of the PK.
------------------------------------

(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )