|
Assembelly code register addressing
dunno if anyone here does embedded programming, if ya do Ive a little knot I need some help with
Im working with a 87C552, an 8051 derivative, and am reading a number from a keypad to use as an Id to select a servo motor to run PWM to.
1) I have the keypad scan function saving the kay value to the accumulator.
2) I have the current PWM value for each of the 5 motors stored in registers 1 to 5
How do I use the number in the accumulator to select the information in the relevant register?
IE
if A = 3
then
move data from R3 to PWM0.
|