|
"Aaron Goodman" wrote:
> I was able to find the doc here:
> http://www.renesas.com/avs/resource/japan/eng/pdf/mpumcu/e602025_h8300.pdf
Yep, but you will also need the User's Manual (at the URL I
mentioned previously) that describes the on chip I/O features
of the H8 if you plan on doing any work with the sensors.
> your post about the motor seems helpful, so if I understand right the way to
> run motor A forward would be
> "mov 0x030003,r0h
> mov 0x80,r0h"
> and for the motor C the same except 0x06?
> How does the instruction get to the motors? is there a sepearte routine that
> needs to be run to do this or is it taken care of by the ROM?
To turn on motor C forward you would do this:
mov #0x02,r0h
mov r0h,@0x80:8
The second instruction writes the value to the motor control
register (described at Kekoa's RCX Internals). Here's
another example:
; A: reverse, B: float, C: forward
mov #0x42,r0h
mov r0h,@0x80:8
> also I was a little confused by the @ signs in the c code of legos can someone
> explain these to me?
Do you mean in the asm code? The @ signs are used in
the source or destination operand of an instruction to refer
to a memory location. I think this is probably covered in
the Programmer's Manual you mentioned above.
> When I was looking at the brickOS code for dsensor.h I noticed a command "beq"
> which I coudn't find in the documentation for the chip. What is this?
Look under the instruction group labeled "Bcc" in the Programmer's
Manual. This is a conditional branch instruction (in this case, branch
if the zero flag is set).
Cheers,
Mark
|
|
Message has 1 Reply:
Message is in Reply To:
9 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|