fbpx

ARM7 Programming

Description

ARM7 is a 32-bit processor. Port 0 has 32 pins need to set the direction of pin i.e pin act as an input or output.

  • If pin act as input then pins are assigned as 0 else for output the pin is assigned as 1.
  • IODIR0 =0X00000000 totally 8 zeros that 8*4=32 pins DIR0 is setting port0 for port1 DIR1 THEN IODIR1.
  • IOPINPO =0XFFFFFFFF controlling the port0 pins by setting pins high or low if you want to control port1 then change it to IOPINP1.
  1. Bit instruction.
  2. Byte instruction.

Bit instruction

  • In bit instruction each port pins value assigned individually.
  • Example.
  • In port0 3rd pin should keep high and 4th pin should keep low it can be done in this way.
    • P0_3=1; (High) // Port 0 3rd pin:
    • P0_4=0; (Low) // Port 0 4th pin:

Byte instruction

  • In byte instruction entire port pins will be accessed.
  • Example
  • In port 0 all pin should keep low.
    • P0 = 0x00;
      0x0000|0000;
      0x 0 | 0 ; = 0x00;
    • In port 0 MSB should keep high and LSB should keep low
    • P0=0xF0;
      0x1111|0000;
      0x F | 0 ; = 0xF0

Binary Table

Byte Instruction

Leave a Reply

Your email address will not be published. Required fields are marked *