Subject:
|
Working with a different compiler 2
|
Newsgroups:
|
lugnet.robotics.handyboard
|
Date:
|
Mon, 4 May 1998 21:07:08 GMT
|
Original-From:
|
Jaron Paludanus <J.PALUDANUS@TIPstopspam.NL>
|
Viewed:
|
1436 times
|
| |
| |
Howdy All,
I am in a happy mood today. I finally got to the 'hello world' stage.
All I had to do was count the number of interrupts, * 2 (16 bit addresses),
subtract this from BFFF which is the reset vector and thus supply BFD6 to
my linker to start its vector table.
I learned a lot from the responses people gave me, thanks ! I came to a
solution by taking the time and actively looking for a solution using the
tools I have. Yes I am proud today.
Using the following code;
@port volatile unsigned char MOTOR @0x7000;
void main ()
{
int i,j;
while (1) {
for (i=0;i<=255;i++) {
MOTOR= i;
for (j=0;j<4000;j++) {
_asm("nop\n");
}
}
}
}
I managed to make my motor leds flicker,
the @0x7000 is a efficient way to use memory mapped peripherals
the included NOP instruction was just to slow things down and to try the
so-called in-line assembly.
After creating big database applications for companies I am as happy as a
kid with my Christmas lighting.
QUESTION - Why can the whole memory range from 7000 - 7fff be used to set
the motor drivers or to fetch the digital input signals?
thanks everybody,
I'll continue my quest ...
Jaron
|
|
Message has 1 Reply: | | Re: Motor Drivers in 7000 - 7fff
|
| Jaron, (...) This was done (obviously) to save extra decoding circuitry needed on the board. That is, if the handy board needed to assign (say) 7000 as the motor then sixteen address lines need to be decoded (binary 0111 000 000 000). Yet with the (...) (27 years ago, 4-May-98, to lugnet.robotics.handyboard)
|
2 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|