SoloCodigo

Programación Específica => Microcontroladores => Mensaje iniciado por: deomes en Martes 6 de Febrero de 2007, 04:42

Título: Operaciones Aritmeticas Logicas De Microprocesado
Publicado por: deomes en Martes 6 de Febrero de 2007, 04:42
buenas noche.

sirva el presente para consultarle sobre el siguiente tema:

1 . cuales son las operaciones aritmetica permitadas en registro, en memoria y entre registro y memoria.

2. Operaciones logicas permitidas
en registro en memoria y entre registro y memoria?
Título: Re: Operaciones Aritmeticas Logicas De Microprocesado
Publicado por: lalo_soft en Martes 6 de Febrero de 2007, 15:58
Las Logicas son AND,OR,XOR,NOT,NEG
Las Aritmeticas son ADD,ADDC,SUB,SUBC, en algunos micros MUL, DIV

Con respecto a la ejecucion de estas operacione entre memoria y registros esto varia
dependiendo de la arquitectura del micro si este es orientado a acumulador (como el caso de los pic 15xxx 16xxx) u orientado a registro (ARM,AVR,x86,PIC18) ,como queda claro en el caso de cpu orientado a acumulador estas operaciones seran validas entre acc-memoria ,acc-registro y para el segundo caso seran reg-mem ,men-reg.

PD:Como comentrario los lenguajes de alto nivel para microcontroladores como C , se desempeña de manera mas optima en micros orientados a registro de ahi que pic18 este mejor equipado para C que las familias anteriores.
Título: Re: Operaciones Aritmeticas Logicas De Microprocesado
Publicado por: Aristides Alvarez en Sábado 10 de Febrero de 2007, 01:55
Para el micro Propeller, estos son algunos datos:

Idioma Spin

Unary Operators
+ Positive (+X); unary form of Add; p 256.
- Negate (-X); unary form of Subtract; p 256.
- - Pre-decrement (--X) or post-decrement (X--) and assign; p 257.
+ + Pre-increment (++X) or post-increment (X++) and assign; p 257.
^^ Square root; p 261.
|| Absolute Value; p 261.
~ Sign-extend from bit 7 (~X) or post-clear to 0 (X~); p 262.
~~ Sign-extend from bit 15 (~~X) or post-set to -1(X~~); p 263.
? Random number forward (?X) or reverse (X?); p 264.
|< Decode value (modulus of 32; 0-31) into single-high-bit long; p 265.
>| Encode long into magnitude (0 - 32) as high-bit priority; p 266.
! Bitwise: NOT; p 272.
NOT Boolean: NOT (promotes non-0 to -1); p 274.
@ Symbol address; p 278.
@@ Object address plus symbol value; p 279.

Binary Operators
NOTE: All right-column operators are assignment operators.
= --and-- = Constant assignment (CON blocks); p 254.
:= --and-- := Variable assignment (PUB/PRI blocks); p 255.
+ --or-- += Add; p 255.
- --or-- -= Subtract; p 256.
* --or-- *= Multiply and return lower 32 bits (signed); p 258.
** --or-- **= Multiply and return upper 32 bits (signed); p 259.
/ --or-- /= Divide (signed); p 259.
// --or-- //= Modulus (signed); p 259.
#> --or-- #>= Limit minimum (signed); p 260.
<# --or-- <#= Limit maximum (signed); p 261.
~> --or-- ~>= Shift arithmetic right; p 264.
<< --or-- <<= Bitwise: Shift left; p 266.
>> --or-- >>= Bitwise: Shift right; p 267.
<- --or-- <-= Bitwise: Rotate left; p 267.
-> --or-- ->= Bitwise: Rotate right; p 268.
>< --or-- ><= Bitwise: Reverse; p 268.
& --or-- &= Bitwise: AND; p 269.
| --or-- |= Bitwise: OR; p 270.
^ --or-- ^= Bitwise: XOR; p 271.
AND --or-- AND= Boolean: AND (promotes non-0 to -1); p 272.
OR --or-- OR= Boolean: OR (promotes non-0 to -1); p 273.
= = --or-- = = = Boolean: Is equal; p 275.
<> --or-- <>= Boolean: Is not equal; p 275.
< --or-- <= Boolean: Is less than (signed); p 276.
> --or-- >= Boolean: Is greater than (signed); p 276.
=< --or-- =<= Boolean: Is equal or less (signed); p 277.
=> --or-- =>= Boolean: Is equal or greater (signed); p 277.

lenguaje Assembly

Common Operations
ABS Get absolute value of a number; p 353.
ABSNEG Get negative of number’s absolute value; p 354.
NEG Get negative of a number; p 386.
NEGC Get a value, or its additive inverse, based on C; p 386.
NEGNC Get a value or its additive inverse, based on !C; p 387.
NEGZ Get a value, or its additive inverse, based on Z; p 389.
NEGNZ Get a value, or its additive inverse, based on !Z; p 388.
MIN Limit minimum of unsigned value to another unsigned value; p 379.
MINS Limit minimum of signed value to another signed value; p 380.
MAX Limit maximum of unsigned value to another unsigned value; p 378.
MAXS Limit maximum of signed value to another signed value; p 378.
ADD Add two unsigned values; p 354.
ADDABS Add absolute value to another value; p 355.
ADDS Add two signed values; p 356.
ADDX Add two unsigned values plus C; p 357.
ADDSX Add two signed values plus C; p 356.
SUB Subtract two unsigned values; p 403.
SUBABS Subtract an absolute value from another value; p 404.
SUBS Subtract two signed values; p 404.
SUBX Subtract unsigned value plus C from another unsigned value; p 406.
SUBSX Subtract signed value plus C from another signed value; p 405.
SUMC Sum signed value with another of C-affected sign; p 406.
SUMNC Sum signed vaule with another of !C-affected sign; p 407.
SUMZ Sum signed value with another Z-affected sign; p 408.
SUMNZ Sum signed value with another of !Z-afected sign; p 408.
MUL <reserved for future use>
MULS <reserved for future use>
AND Bitwise AND two values; p 358.
ANDN Bitwise AND value with NOT of another; p 359.
OR Bitwise OR two values; p 392.
XOR Bitwise XOR two values; p 417.
ONES <reserved for future use>
ENC <reserved for future use>
RCL Rotate C left into value by specified number of bits; p 393.
RCR Rotate C right into value by specified number of bits; p 394.
REV Reverse LSBs of value and zero-extend; p 399.
ROL Rotate value left by specified number of bits; p 400.
ROR Rotate value right by specified number of bits; p 400.
SHL Shift value left by specified number of bits; p 402.
SHR Shift value right by specified number of bits; p 402.
SAR Shift value arithmetically right by specified number of bits; p 401.
CMP Compare two unsigned values; p 362.
CMPS Compare two signed values; p 362.
CMPX Compare two unsigned values plus C; p 364.
CMPSX Compare two signed values plus C; p 364.
CMPSUB Compare unsigned values, subtract second if lesser or equal; p 363.
TEST Bitwise AND two values to affect flags only; p 409.
MOV Set a register to a value; p 380.
MOVS Set a register’s source field to a value; p 382.
MOVD Set a register’s destination field to a value; p 381.
MOVI Set a register’s instruction field to a value; p 381.
MUXC Set discrete bits of a value to the state of C; p 383.
MUXNC Set discrete bits of a value to the state of !C; p 384.
MUXZ Set discrete bits of a value to the state of Z; p 385.
MUXNZ Set discrete bits of a value to the state of !Z; p 384.
HUBOP Perform a hub operation; p 373.
NOP No operation, just elapse four cycles; p 389.

Si querés darle una mirada al manual, está el PDF en:

http://www.parallax.com/propeller/downloads.asp (http://www.parallax.com/propeller/downloads.asp)
Título: Re: Operaciones Aritmeticas Logicas De Microprocesado
Publicado por: lalo_soft en Domingo 11 de Febrero de 2007, 17:16
He visto la campaña prublicitaria del Propeller y encuentro que es un BasicStamp con algunos perifericos dedicados como video,mouse y otros.Pese a lo atractivo de esto encuentro que tendra el mismo final del BStamp y que a la larga no servira para hacer nada util.
Título: Re: Operaciones Aritmeticas Logicas De Microprocesado
Publicado por: Aristides Alvarez en Lunes 12 de Febrero de 2007, 01:43
El Propeller no es un BASIC Stamp, ni nada parecido a cualquier otro micro que se encuentre en el mercado, sin ningún periférico asociado puede; generar una señal de TV color (incluso con portadora, para entrar por canales bajos), VGA color, mientras mira el mouse  y el key por otros pines, debido a que son 8 micros que  están en el mismo chip y responde cada uno a su programación, lo único tienen en común es el sistema de clk.

Otro detalle interesante es que trabaja con variables LONG (32 bits) y clk de más de 80 MHz.

Si tenés oportunidad de viajar por MDQ, te puedo hacer una demostración personalmente.
Título: Re: Operaciones Aritmeticas Logicas De Microprocesado
Publicado por: Aristides Alvarez en Lunes 12 de Febrero de 2007, 01:57
Cita de: "lalo_soft"
He visto la campaña prublicitaria del Propeller y encuentro que es un BasicStamp con algunos perifericos dedicados como video,mouse y otros.Pese a lo atractivo de esto encuentro que tendra el mismo final del BStamp y que a la larga no servira para hacer nada util.
En este link podés ver algunas de las cosas. que creo que son "útiles" y se hicieron con BASIC Stamps:

http://www.parallax.com/html_pages/resourc...stapps/main.asp (http://www.parallax.com/html_pages/resources/custapps/main.asp)