Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

microprocessor 68000 mnemonic code

Status
Not open for further replies.

jass_yip

Newbie level 4
Joined
Mar 16, 2011
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,322
HELP PLS!
can any body help me?
i need to know how to write the mnemonic code?
i cannot understand at all, but i need to do my assingment.

project :

control the DC motor RUN by the button switch (ofrward and reverse).
 

by mnemonic code, you mean the assembly language code?

this may be helpful,
**broken link removed**
 

thanks for reply.
i have read that data sheet already, problem is, i don't know how to use the code.

such as how to control the motor run by using switch.
 

make a control flow for your program, such as when a particular pin'sstate changes, what should be done and so on.

As I understand from your first post, you want to run the motor forward in one switch state and reverse in the other?

This is quite simple, as you just need to connect the switch to one pin of the processor and poll it constantly. Make sure that the pin is not left floating, as it can lead to unexpected results.

For example, if it is high and that means that you want to move the motor forward, then the output pins of the processor which control the motor stay +1 and 0, else they become 0 and +1.
 
allow me to ask again. coz im really don't know how to write a program to my trainning kit.

my lecture show me the 7 segment program, such as:-

* 7 segment interface-one digit counter

begin org $080c00
move.b #$80,$10000d * set PACR to mode 1x
move.b #$ff,$100005 * set PADDR to output
move.b #$80,$10000f * set PBCR to mode 1x
move.b #$ff,$100007 * set PBDDR to output

ddd clr d0 *clear the first digit of 7-segment
eee bsr display *brand to display sub-routine
move.l d0,d1 *copy the content of d0, to d1 register
cmpi #$09,d1 *compare value 9 with d1
beq ddd *if equal branch to ddd sub-routine
addi #$01,d1 *else then add one to d1 which mean d1=d1+1
move.l d1,d0 *then copy the register d1 data to d0 register
bra eee *loop to routine eee

display: *display routine
move.l #$00ff,d5 *store $FF to d5 register as a temp. counter
repeat move.b #$fe,$100011 *activate the lsb digit (the first 7-seg digit)
move.b d0,$100013 *display the d0 data to port B
bsr delay *branch to delay routine
subq.l #$1,d5 *d5 = d5 -1
bne repeat *check d5 value =0? If not equal branch to repeat
rts *else return to sub-routine


delay move.l #$01ff,d6 *delay sub-routine
del1 subq.l #1,d6
bne del1
rts

end begin *end of program


and also the input switch code:-

begin org $080C00

move.b #$80,$10000d
move.b #$00,$100005
move.b #$80,$10000f
move.b #$ff,$100007
move.b #$00,$100013

read move.b $100011,d0 *get data from input switches
move.w #0,d3 *exit service routine
trap #0
end begin

my class trainer gv me this 2 mnemonic code and ask me to study my self then write a program that:

press the 1st button, 7 segment will show out the number increase,
press the 2nd button, 7 segment will show out the number decrease.

he never teach me any thing,
can anybody teach me how to write the programme?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top