Putting robotics at your service™

Free shipping on orders over $200

basic atom pro- real time clk

Print view Share :
Previous topicNext topic

Page 1 of 1 [ 7 posts ]

New ( offline )
Posts: 4
Posted: 2011-09-15 01:00 
hi,
can anyone explain setting procedure of real time clk(RTC)?




thanks


User avatar
Guru ( offline )
Posts: 4915
Posted: 2011-09-15 10:07 
My guess is you are "mini" on the BasicMicro forums :D. So I know that you are asking about a BAP40, which underlying chip is the H8/3687 which has RTC support, but I am pretty sure it requires an external 32.xxxmhz crystal to be fed into the chip, which I am pretty sure is not on the BAP40. Nathan(AcidTech) is the best one to say for sure.

Kurt


New ( offline )
Posts: 4
Posted: 2011-09-15 11:45 
kurte wrote:
My guess is you are "mini" on the BasicMicro forums :D. So I know that you are asking about a BAP40, which underlying chip is the H8/3687 which has RTC support, but I am pretty sure it requires an external 32.xxxmhz crystal to be fed into the chip, which I am pretty sure is not on the BAP40. Nathan(AcidTech) is the best one to say for sure.

Kurt



Of course your guess is correct.Actually my doubt is that in pid controller program we should give dt value for calculating ki and kd. So I thought that it would be possible with RTC.But i don't know how to use it. Is there any other function to get the loop execution time.


User avatar
Guru ( offline )
Posts: 4915
Posted: 2011-09-15 11:57 
If you write your code in assembly language you can count clock cycles (been there, done that... for writing my own Serin/serout).

Or you can setup and use one of the other system clocks, such as TimerZ0/1(16 bit), TimerV(8 bit) or TimerB1(8 bit). These will be in some multiple of clock cycles (20mhz on Bap40 I believe). Depending on the length of time you need and resolution and which clock you use, you will probably need to setup an overflow interrupt and handler. Not hard, I have several examples up on the forum, including the thread: viewtopic.php?f=4&t=3496

Kurt


New ( offline )
Posts: 4
Posted: 2011-09-15 12:02 
Thanks for your reply and I'll try to do it using timers.


New ( offline )
Posts: 4
Posted: 2011-09-19 02:45 
I read in the 3664 manual that the real time clock time base function is available when a 32.768khz crystal is connected to it. That means I have to connect the crystal externally or is it there on bap40? Can't we use that function without crystal? Will you give any example of real time clock time base function?


Thanks


User avatar
Guru ( offline )
Posts: 4915
Posted: 2011-09-19 09:50 
Yes the 3687 chip used on the Basic Atom Pro 40, Arc32, and Mad Hatter can have a RTC with the external crystal. But Basic Micro did not attach one to any of the boards other than the Mad Hatter. They also did facilitate any easy way to add them either. It may be possible to attach some jumpers to the actual processor and try to hook one up, but it will also probably require a couple of capacitors as well... If I tried it, I would end up destroying the board...

Kurt


 

All times are UTC - 5 hours [ DST ]. It is currently 2014-10-31 13:03
Feedback Form
Feedback Form