Subject:
|
Sharp GP2D02 and assembly language
|
Newsgroups:
|
lugnet.robotics.handyboard
|
Date:
|
Tue, 23 Feb 1999 03:09:08 GMT
|
Original-From:
|
Barry Brouillette <barry@barry.!antispam!detroit.sgi.com>
|
Viewed:
|
1153 times
|
| |
| |
Hi,
I've written a short assembly language routine to access the Sharp GP2D02
sensor and it works just great but... I have one question.
Since I use the expansion board's digital outs to control the sensor I
need to make sure my routine doesn't stomp on any other digtal outs in
the process. I used Fred's libexbd.asm to see how to do digital outputs.
Apparently, you can't read the output latch back in so he keeps a local
variable USERVAL to keep track of which outputs are set.
My question is this: How can my assembly program access Fred's USERVAL so
that my program can also know what bits are set by Fred's set_digital_out
routine?
I assume that I could simply #include libexpd.asm in my program and use
the resulting .icb file in place of both his libexpbd.icb and my
GP2D02.icb but that seems kludgy to me and difficult to explain when
posting the code. Any ideas?
Barry
|
|
Message has 1 Reply: | | Re: Sharp GP2D02 and assembly language
|
| Hi, I have the same problem. For now I don't care since the GP2D02 is the only thing connected to an digital output. I am using the following: Include: subroutine_get_userval: ldab USERVAL ; load USERVAL to d register clra ; clear upper byte rts ; (...) (26 years ago, 23-Feb-99, to lugnet.robotics.handyboard)
|
2 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|