EASy68K  
It is currently Sun Nov 17, 2019 5:57 am

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Tue Oct 11, 2011 6:51 am 
Offline

Joined: Mon Oct 10, 2011 5:49 pm
Posts: 2
hello. i just wanna ask how can you assign the address of the 7-segment display and the toggle switch? i can't find it through the net.
For example, this memory mapping:
E00000 7 segment display 0
E00002 7 segment display 1
E00004 7 segment display 2
E00010 toggle switch 0
E00012 toggle switch 1

thanks in advance.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 11, 2011 1:51 pm 
Offline

Joined: Mon Jul 26, 2010 11:43 pm
Posts: 198
Location: Aurora, IL
What's the question? How are they defined, or how are they used? Your question lacks clarity.

You can set the base addresses within SIM68K (View->Hardware), if you really need to change them. If you need to change them, please state the reasoning so the question can be better understood.

In assembler you can load the address into a register

Code:
  LEA $E00000,A0


or

Code:
  MOVE.L #$E00000,A0


or write a value directly

Code:
LEDS  EQU  $E00010

   MOVE.B D0,LEDS


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 11, 2011 2:23 pm 
Offline

Joined: Mon Oct 10, 2011 5:49 pm
Posts: 2
clive wrote:
What's the question? How are they defined, or how are they used? Your question lacks clarity.

You can set the base addresses within SIM68K (View->Hardware), if you really need to change them. If you need to change them, please state the reasoning so the question can be better understood.



sorry for misunderstanding. what i meant was how the 7 segment display can be mapped to a certain address without touching the address on the 68k hardware. Is there a certain name to each 7 segment display so an address can be mapped with it through the source file? i'm sorry but it was required for us to map the 7 segment display on a certain memory address.

For clarity, if i want the following memory mapping:
E00000 7 segment display # 0
E00002 7 segment display # 1
E00004 7 segment display # 2
E00006 7 segment display # 3
E00008 7 segment display # 4
E0000A 7 segment display # 5
E0000C 7 segment display # 6
E0000E 7 segment display # 7

i cannot do it with just changing the base address in the easy68k hardware since the address are decreasing from display #7 to #0. If i put E0000E on the base address, the mapping would be this:
E0001C 7 segment display # 0
E0001A 7 segment display # 1
E00018 7 segment display # 2
E00016 7 segment display # 3
E00014 7 segment display # 4
E00012 7 segment display # 5
E00010 7 segment display # 6
E0000E 7 segment display # 7

sorry i'm not proficient in english so i couldn't clearly express the question. thanks for answering.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 12, 2011 12:30 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1103
There is no way to change the address of individual digits in the 7-segment display.

_________________
Prof. Kelly


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 12, 2011 2:48 pm 
Offline

Joined: Mon Jul 26, 2010 11:43 pm
Posts: 198
Location: Aurora, IL
Neither EASy68K or IDE68K handle their 7-Segment panel in this fashion. They both fill left-to-right.

If you have specific hardware that has different addresses you'll need to perform some level of abstraction when writing to the display. ie use EQU to define each element, or use DC.L to hold the address(es) and index into that table.

The addresses the simulator uses doesn't preclude you from assembling code at different addresses for your own hardware, it's just that you won't be able to simulate it. ie assemble then download the S-Records to your board and run it there.

Code:
   LEA SEGTBL,A1
   MOVEA.L   (A1)+,A0
   MOVE.B #$3F,(A0) ; 0
   MOVEA.L   (A1)+,A0
   MOVE.B #$06,(A0) ; 1
   MOVEA.L   (A1)+,A0
   MOVE.B #$5B,(A0) ; 2
   MOVEA.L   (A1)+,A0
   MOVE.B #$4F,(A0) ; 3
   MOVEA.L   (A1)+,A0
   MOVE.B #$66,(A0) ; 4
   MOVEA.L   (A1)+,A0
   MOVE.B #$6D,(A0) ; 5
   MOVEA.L   (A1)+,A0
   MOVE.B #$7D,(A0) ; 6
   MOVEA.L   (A1)+,A0
   MOVE.B #$07,(A0) ; 7

   MOVE.B   #9,D0
   TRAP   #15      ; halt simulator

SEGTBL   DC.L   $E0000E
   DC.L   $E0000C
   DC.L   $E0000A
   DC.L   $E00008
   DC.L   $E00006
   DC.L   $E00004
   DC.L   $E00002
   DC.L   $E00000


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group