Renesas Single-Chip Microcomputer M37531T-ADS Información técnica Pagina 48

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 57
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 47
No.M16C-55-0006
( 5 / 5 )
Function Mnemonic
BCLR, BNOT, BSET, BTSTC, BTSTS
Shift ROLC, RORC, ROT, SHA, SHL
Arithmetic ABS, ADC, ADCF, ADD, DEC, EXTS, INC, MUL, MULU, NEG,
SBB, SUB
Bit manipulation
Logical AND, NOT, OR, XOR
Jump ADJNZ, SBJNZ
#pragma ADDRESS UDF 0384h
char near UDF;
void func(void)
{
UDF = 0x01 ;
}
Image of extract
MOV.B #01h, UDF
(1)
struct bit_def {
char b0:1;
char b1:1;
char b2:1;
char b3:1;
char b4:1;
char b5:1;
char b6:1;
char b7:1;
};
union byte_def{
struct bit_def bit;
char byte;
};
#pragma ADDRESS UDF 0384h
char near UDF;
#pragma BIT UDF_RAM
union byte_def UDF_RAM=0 ; /*Initial data*/
#define TA0UD_RAM UDF_RAM.bit.b0
#define TA1UD_RAM UDF_RAM.bit.b1
#define TA2UD_RAM UDF_RAM.bit.b2
#define TA3UD_RAM UDF_RAM.bit.b3
#define TA4UD_RAM UDF_RAM.bit.b4
#define TA2P_RAM UDF_RAM.bit.b5
#define TA3P_RAM UDF_RAM.bit.b6
#define TA4P_RAM UDF_RAM.bit.b7
void func(void);
void func(void)
{
TA0UD_RAM = 1 ;
UDF = UDF_RAM.byte ;
}
Image of extract
BSET TA0UD_RAM
MOV.B UDF_RAM, UDF
(2)
Table 10. Instruction table for Read Modify Write
3. C language programming
Figure 3 shows an example using C programming
Figure 3. Example for C programming
Vista de pagina 47
1 2 ... 43 44 45 46 47 48 49 50 51 52 53 ... 56 57

Comentarios a estos manuales

Sin comentarios