Solved

Interfacing DS1216 and MC68HC11

Posted on 2002-04-11
10
376 Views
Last Modified: 2008-02-01
I AM WORKING WITH THE MOTOROLA 68HC11F1.
I AM TRYING TO MAKE A ROUTINE WHICH READS AND WRITES A
DALLAS DS1216C (REAL TIME CLOCK) AND/OR DS1202 SERIAL RTC
BUT UNTIL NOW IT DOESN'T WORK.
I MADE A SIMILAR ROUTINE FOR THE 8031/51 AND IT WORKS FINE.
FIRST I NEED A ROUTINE FOR THE 68HC11.

0
Comment
Question by:Shumba
  • 5
  • 2
  • 2
  • +1
10 Comments
 

Author Comment

by:Shumba
ID: 6934793
If you get this you must be very smart.
0
 
LVL 32

Expert Comment

by:jhance
ID: 6934822
>>If you get this you must be very smart.

Oh please, this is simple Digital Electronics 101!

What I think is the problem is that YOU have a homework assignment due and don't want to do the work yourself.

Did you realize that it's AGAINST Experts-Exchange policies to ask for someone to do your homework for you?

I'd suggest you try to do the work yourself and then come back and ask for clarification if there is some part of this you don't understand.
0
 
LVL 13

Expert Comment

by:magarity
ID: 6935584
"this is simple Digital Electronics 101!"

LOL, it was a lousy day til now; thanks for the laugh.

With 4 or 5 weeks left in the spring semester, it's about the right place in the course to get to something like this.

Perhaps this should be the correct version:
"If you get this you must have paid attention and taken notes"
0
 
LVL 13

Expert Comment

by:magarity
ID: 6935591
Furthermore, I find the constant stream of these digital circuit design homework questions pretty insulting.  This one, with its 'you must be very smart' is particularly rude.  Who do these kids think is providing the answers on this board, anyway?  Seems they think we're a bunch of second-year students.  This guy (?) even thinks we're no farther along his class than he is.
0
 

Author Comment

by:Shumba
ID: 6937328
Folks I am sorry if I sound rude. Infact this is not an assignment or all that stuff you are thinking of.On the ground Iam trying to get the D1216 to work. I have got some assembly codes that I have written to read the RTC.Let those without positive contributions proceed with their mockery but I am sure that it  proves something..
0
Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

 

Author Comment

by:Shumba
ID: 6937336
If anyone thinks its Digital Electronics 101!
or whatever you call it, then they must think again...
0
 
LVL 32

Expert Comment

by:jhance
ID: 6937374
Being an Electrical Engineer and a B.S.E.E. degree, I can assure you that this is indeed Digital Electronics 101 level stuff.

In fact, it's so trivial that it must be homework.  Why?

1) Nobody who has a real job doing this would be challenged by this.

2) Anyone who is qualified to do this kind of work would know exactly where to look if he was not sure how to do it.  (Like the manufacturer's application notes or data sheet.)

3) Nobody who asks such questions could possibly make a living by doing this kind of work.

Now it could be that you are simply a hobbyist playing around with some interesting circuits but your question has nothing in it that indicates this is the case.  In fact, it has all the marks of a homework assignment and a lazy student.  

You state the problem and ask for an answer.  So please understand that nobody here is trying to be difficult but to do your work for you helps out nobody.  If you do graduate someday one of us might have the misfortune of having to work with you and since you didn't do any of your own work in school you'll be a liability...
0
 

Author Comment

by:Shumba
ID: 6937400
sorry for that but the problem is still there!
0
 
LVL 2

Accepted Solution

by:
willinois earned 300 total points
ID: 6937553
FOR THE 68HC11 routine??????? It's Greek to me I am a hobbyist, but I can search the internet.
**********************************
*         GETKNOB                *
*  GET ENCODE KNOB DIRECTION     *
*  'A' REG HOLD DIRECTION        *
*  1= CLOCKWISE ROTATION         *
*  0= NO ROTATION                *
*  FF= COUNTERCLOCKWISE ROTATION *
*  ADD A TO TO OBJECT TO CHANGE  *
*  IN 8 BIT BLOW OFF CARRY BIT   *
**********************************
GETKNOB  PSHB
         PSHA
         LDAA     PORTE          GET PORT INFO
         ANDA     #$03           MASK OFF ALL BUT ENCODER BITS
         STAA     KNOBTEMP       TEMPORARY STORAGE
         LDAA     KNOBTEMP
         CMPA     KNOBLAST       COMPARE WITH LAST READING
         BEQ      KNOBNONE       NO CHANGE IN KNOB

KNOB00   LDAA     KNOBLAST       GET READINGS
         CMPA     #$00           IS IT "OO"
         BNE      KNOB01         NO TRY NEXT
         LDAA     KNOBTEMP
         CMPA     #$02           IS IT READING BELOW
         BNE      KNOB00H
         LDAA     #$FF           GOING DOWN
         BRA      KNOBDONE
KNOB00H  CMPA     #$01           ARE WE ABOVE
         BNE      KNOB01         NOT HERE(SKIP READ)
         LDAA     #$01           GOING UP
         BRA      KNOBDONE

KNOB01   LDAA     KNOBLAST       GET READINGS
         CMPA     #$01           IS IT "O1"
         BNE      KNOB03         NO TRY NEXT
         LDAA     KNOBTEMP
         CMPA     #$00           IS IT READING BELOW
         BNE      KNOB01H
         LDAA     #$FF           GOING DOWN
         BRA      KNOBDONE
KNOB01H  CMPA     #$03           ARE WE ABOVE
         BNE      KNOB03         NOT HERE(SKIP READ)
         LDAA     #$01           GOING UP
         BRA      KNOBDONE
         
KNOB03   LDAA     KNOBLAST       GET READINGS
         CMPA     #$03           IS IT "03"
         BNE      KNOB02         NO TRY NEXT
         LDAA     KNOBTEMP
         CMPA     #$01           IS IT READING BELOW
         BNE      KNOB03H
         LDAA     #$FF           GOING DOWN
         BRA      KNOBDONE
KNOB03H  CMPA     #$02           ARE WE ABOVE
         BNE      KNOB02         NOT HERE(SKIP READ)
         LDAA     #$01           GOING UP
         BRA      KNOBDONE
         
KNOB02   LDAA     KNOBLAST       GET READINGS
         CMPA     #$02           IS IT "02"
         BNE      KNOBNONE       NO TRY NEXT
         LDAA     KNOBTEMP
         CMPA     #$03           IS IT READING BELOW
         BNE      KNOB02H
         LDAA     #$FF           GOING DOWN
         BRA      KNOBDONE
KNOB02H  CMPA     #$00           ARE WE ABOVE
         BNE      KNOBNONE       NOT HERE(SKIP READ)
         LDAA     #$01           GOING UP
         BRA      KNOBDONE

KNOBDONE STAA     KNOBDIR        STORE KNOB DIRECTION
         LDAA     KNOBTEMP
         STAA     KNOBLAST
         JMP      KNOBOUT        JUMP NEXT COMMAND(SOMEBODY MOVED)

KNOBNONE LDAA     #$00           LOAD NO CHANGE IN KNOB
         STAA     KNOBDIR

KNOBOUT  PULA
         PULB
         RTS
0
 

Author Comment

by:Shumba
ID: 6938631
thanx pal.It seems sensible I will try it on my simulator.I will give you the 300 points as you are the only one who had shown positive contribution.

Thanks once again!
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Moving your enterprise fax infrastructure from in-house fax machines and servers to the cloud makes sense — from both an efficiency and productivity standpoint. But does migrating to a cloud fax solution mean you will no longer be able to send or re…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now