I'm starting with this

I'm starting with this

Post by Alex Hornun » Fri, 04 Jul 2003 02:34:47



Hi,
I have some questions about the m68k and how to use it. I would be very
pleased if someone answered me:

- How can I "execute" a progam on a m68k? Has it internal memory to store
the program?

- If not, how could I do to use it to execute some code?

- How can I access and control peripherals?

- Where could I store a program so the m68k executes it?

Thanks in advance,
 Alex Hornung
 MADRID/SPAIN

 
 
 

I'm starting with this

Post by Nikk » Fri, 04 Jul 2003 20:12:02




> Hi,
> I have some questions about the m68k and how to use it. I would be very
> pleased if someone answered me:

> - How can I "execute" a progam on a m68k? Has it internal memory to store
> the program?

> - If not, how could I do to use it to execute some code?

> - How can I access and control peripherals?

> - Where could I store a program so the m68k executes it?

> Thanks in advance,
>  Alex Hornung
>  MADRID/SPAIN

Hola Alex

I'm not sure I understand your problem fully. I have a Mac background;
'execution' is more in the style of Mr Gates.

What OS are you talking about?  What computer?

Nikki

 
 
 

I'm starting with this

Post by kgol » Fri, 04 Jul 2003 23:54:48


Most 68k family members have no internal memory.  You typically add
some sort of ROM memory (e.g. Flash) for the program and some sort of
RAM (e.g. DRAM) for the data.

When the 68K comes out of reset, it determines the starting PC and SP
from the reset vector and starts executing.

Basic 68K members have no internal peripherals, but have a general
purpose bus used to connect it to memory and peripherals.  Some glue
logic is needed.

683xx members have various peripherals on the chip, and also have
memory controllers.


> I have some questions about the m68k and how to use it. I would be very
> pleased if someone answered me:

> - How can I "execute" a progam on a m68k? Has it internal memory to store
> the program?

> - If not, how could I do to use it to execute some code?

> - How can I access and control peripherals?

> - Where could I store a program so the m68k executes it?

--
--

 
 
 

I'm starting with this

Post by Alex Hornun » Mon, 14 Jul 2003 23:19:58



> Hola Alex

> I'm not sure I understand your problem fully. I have a Mac background;
> 'execution' is more in the style of Mr Gates.

> What OS are you talking about?  What computer?

> Nikki

Hi Nikki

I never used windows so the word "execution" is not in the style of Mr
Gates. ;)
I mean storing a "program" that for example acquires data from a peripheral
and sends it to another one. Kgold said most of the m68k don't have
internal memory but you can attach ROMs. So, how does the m68k know that it
has to run the program stored in an attached ROM?

The idea I had was to build something like a little PC, no graphical data
output but serial or even ethernet output.

Alex

 
 
 

I'm starting with this

Post by Alan Gosseli » Tue, 15 Jul 2003 03:18:37


Alex,

I hate to say this, but it sounds like you're way over your head.

Every computer, and I mean EVERY computer, does the same thing.
Somewhere inside, there is a processor. Some are made by Motorola,
some by Intel, some by AVR, etc. etc. There is no real difference
between an embedded system and a "computer" (like a PC), except in the
use to which it is put. After reset, the processor puts an address on
the bus. Some hardware, somewhere, recognizes that address and comes
up with some data for the processor to use. The value of that data, in
concert with the exact processor in use, determines what happens with
that data. This cycle of events happens over and over, causing the
processor/system/computer to do something useful, if you're lucky :-).

Sometimes the address recognition hardware is inside the processor.
This is common in "microcontrollers". Sometimes the recognition
hardware is connected to a peripheral. For instance, if you wanted to
send a character down an RS-232 line, the processor would just write a
byte to a specific address. From the processor's point of view, there
is nothing to distinguish that address from any other address. Once
that byte is written, a separate piece of hardware (either internal or
external) converts it to serial, adds start and stop bits, converts it
to RS-232 voltages, and sends it out at the correct speed.

There are a wealth of books out there that can explain all of this, in
much greater detail. I have stacks of them at work. Get the users's
manual for a simple processor, such as the 68000. Look for the
pictures that show a "typical" system, consisting of RAM, ROM, and
peripherals. Now get the user's manual for a microcontroller. Find the
picture of the internal architecture, and compare it to the other
picture. Notice the similarities and differences.

Keep asking questions.

Alan

 
 
 

I'm starting with this

Post by Alex Hornun » Tue, 15 Jul 2003 05:10:34


Thank you all very much!
 
 
 

I'm starting with this

Post by kgol » Wed, 16 Jul 2003 01:58:39




> > Hola Alex

> > I'm not sure I understand your problem fully. I have a Mac background;
> > 'execution' is more in the style of Mr Gates.

> > What OS are you talking about?  What computer?

> > Nikki

> Hi Nikki

> I never used windows so the word "execution" is not in the style of Mr
> Gates. ;)
> I mean storing a "program" that for example acquires data from a peripheral
> and sends it to another one. Kgold said most of the m68k don't have
> internal memory but you can attach ROMs. So, how does the m68k know that it
> has to run the program stored in an attached ROM?

It doesn't specifically know about ROM.  When it comes out of reset,
it fetches the stack pointer initial value from physical address 0 and
the program counter starting address from address 4.  It's up to your
hardware to ensure that 0 and 4 map to non-volatile memory and up to
your linker to ensure that the values are correct.

Typically, once the program starts running, those addresses are mapped
to RW memory (using the VBR on newer chips, a hardware hack on older
chips) so you can write interrupt vectors.

--
--