MCU_AddressLatch_DataMemory_DataLatch_PA0_RA0_



Embedded system programming of electronic devices

C/C++

 

0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xA0 0xB0 0xC0 0xD0 0xE0 0xF0
0x01 0x11 0x21 0x31 0x41 0x51 0x61 0x71 0x81 0x91 0xA1 0xB1 0xC1 0xD1 0xE1 0xF1
0x02 0x12 0x22 0x32 0x42 0x52 0x62 0x72 0x82 0x92 0xA2 0xB2 0xC2 0xD2 0xE2 0xF2
0x03 0x13 0x23 0x33 0x43 0x53 0x63 0x73 0x83 0x93 0xA3 0xB3 0xC3 0xD3 0xE3 0xF3
0x04 0x14 0x24 0x34 0x44 0x54 0x64 0x74 0x84 0x94 0xA4 0xB4 0xC4 0xD4 0xE4 0xF4
0x05 0x15 0x25 0x35 0x45 0x55 0x65 0x75 0x85 0x95 0xA5 0xB5 0xC5 0xD5 0xE5 0xF5
0x06 0x16 0x26 0x36 0x46 0x56 0x66 0x76 0x86 0x96 0xA6 0xB6 0xC6 0xD6 0xE6 0xF6
0x07 0x17 0x27 0x37 0x47 0x57 0x67 0x77 0x87 0x97 0xA7 0xB7 0xC7 0xD7 0xE7 0xF7
0x08 0x18 0x28 0x38 0x48 0x58 0x68 0x78 0x88 0x98 0xA8 0xB8 0xC8 0xD8 0xE8 0xF8
0x09 0x19 0x29 0x39 0x49 0x59 0x69 0x79 0x89 0x99 0xA9 0xB9 0xC9 0xD9 0xE9 0xF9
0x0A 0x1A 0x2A 0x3A 0x4A 0x5A 0x6A 0x7A 0x8A 0x9A 0xAA 0xBA 0xCA 0xDA 0xEA 0xFA
0x0B 0x1B 0x2B 0x3B 0x4B 0x5B 0x6B 0x7B 0x8B 0x9B 0xAB 0xBB 0xCB 0xDB 0xEB 0xFB
0x0C 0x1C 0x2C 0x3C 0x4C 0x5C 0x6C 0x7C 0x8C 0x9C 0xAC 0xBC 0xCC 0xDC 0xEC 0xFC
0x0D 0x1D 0x2D 0x3D 0x4D 0x5D 0x6D 0x7D 0x8D 0x9D 0xAD 0xBD 0xCD 0xDD 0xED 0xFD
0x0E 0x1E 0x2E 0x3E 0x4E 0x5E 0x6E 0x7E 0x8E 0x9E 0xAE 0xBE 0xCE 0xDE 0xEE 0xFE
0x0F 0x1F 0x2F 0x3F 0x4F 0x5F 0x6F 0x7F 0x8F 0x9F 0xAF 0xBF 0xCF 0xDF 0xEF 0xFF

 

/*List of commands of instruction*/

#define HIGH                                                                                                                0xFF

#define LOW                                                                                                                 0x00

#define Clear_Display                                                                                                  0x01

#define Return_Home                                                                                                  0x02

#define Decrement_Cursor                                                                                          0x04

#define Shift_Display_Right                                                                                        0x06

#define Shift_Display_Left                                                                                          0x07

#define Display_Off_and_Cursor_Off                                                                       0x08

#define Display_Off_and_Cursor_On                                                                        0x0A

#define Display_On_and_Cursor_Off                                                                        0x0C

#define Display_On_and_Cursor_Blinking                                                               0x0E

#define Display_On_and_Cursor_Blinking                                                               0x0F

#define Shift_Cursor_Position_to_Left                                                                      0x10

#define Shift_Cursor_Position_to_Right                                                                    0x14

#define Shift_Entire_Display_to_Left                                                                        0x18

#define Available_Interrupt_Pointers                                                                         0x3FF

#define Reserved_Interrupt_Pointers                                                                         0x07F

#define Reserved                                                                                                           0x016

#define Overflow                                                                                                           0x014

#define Non_Maskable                                                                                                 0x00C

#define Single_Step                                                                                                       0x008

#define Divide_Error                                                                                                    0x005

#define DSTATUS                                                                                                        0x00 //32 RW Status Register

#define DCFG                                                                                                               0x04 //32 RW DDR Configure Register

#define DCTRL                                                                                                            0x08 3//2 RW DDR Control Register

#define DLMR                                                                                                              0x0C //32 RW DDR Load-Mode-Register

#define DTIMING1                                                                                                             0x10 //32 RW DDR Timing Configure Register 1

#define DTIMING2                                                                                                                  0x14 //32 RW DDR Timing Configure Register 2

#define DREFCNT                                                                                                       0x18 //32 RW Auto-Refresh Counter

#define DDQS                                                                                                               0x1C //32 RW DDR DQS Delay Control Register

#define DDQSADJ                                                                                                       0x20 //32 RW DDR DQS Delay Adjust Register

#define DMMAP0                                                                                                         0x24 //32 RW DDR Memory CS0 Map Configure Register

#define DMMAP1                                                                                                         0x28 //32 RW DDR Memory CS1 Map Configure Register

#define DDELAYCTRL                                                                                              0x2C //32 RW DDR Memory Delay Control Register

#define Word_Select                                                                                                     0x0000

#define STOP                                                                                                                0x0000007B

#define SYSTEM_ERROR                                                                                         0x0000007E

#define EIC                                                                                                                   0xFFFFFFFF

#define EIC                                                                                                                   0xFFFFFC00

#define APB2                                                                                                                0xE0000000

#define APB1                                                                                                                0xC0000000

#define RCCU                                                                                                               0xA0000000

#define EXTMEM                                                                                                        0x60000000

#define FLASH                                                                                                             0x40000000

#define RAM                                                                                                                 0x20000000

#define BootMEM                                                                                                        0x00000000

#define ERROR_CODE                                                                                              0x000010FF

#define SIMPLE_RATE                                                                                              0x000012FF

#define URLACTION_ACTIVEX_MAX                                                                 0x000013FF

Configuration structures:

Setup()

Loop()

Main()

DateStampForUSB ()

Control()

Keypress ()

Keyboard()

USB_Mass_Storage_Device ()

USB_Device ()

Micro_SDHC ()

Modem()

Generic_USB_Hub ()

Standard_USB_Host_Controller ()

Universal_Serial_Bus_controllers ()

Network_adapters ()

Monitors()

Mice()

Storage_volumes ()

System_devices ()

GSM_CPU()

DAC_I2S()

SIM_I2C()

PWM_INIT()

Dialup_Tone ()

Dialup_Pulse ()

System_Firmware ()

USB_Input_Device ()

System_timer ()

UMBus_Root_Bus_Enumerator ()

USB_Composite_Device ()

USB_Root_Hub (xHCI)

Disk_drive ()

Register()

Shift_register ()

Encoder()

Decoder()

Arithmetic_logic_unit ()

Multiplexer()

Demultiplexer ()

SET_CLR_CARD_DETECT()

BUS_I2C()

USBtinyISP ()

Control Structures:

if (someVariable > 50)

{

// do something here

}

if (pinFiveInput < 500)

{

Action A

}

Else

{

Action B

}

for(initialization; condition; increment){

//Statement

}

switch (var) {

case 1:

//do something when var equals 1

break;

case 2:

//do something when var equals 2

break;

default:

// if nothing else matches, do the default

// default is optional

break;

}

while(expression){

Statement(s)

}

do

{

Statement block

}

while(test condition);

Default

Return

While

Continue

Goto

Further-syntax structures:

; (semicolon)

{} (curly braces)

// (single line comment)

/* */ (multi-line comment)

#define COMMAND PROGRAM_CODE

#include<FILE_NAME.h>

#pragma SIGNAL PROGRAM_CODE

#error “NOTIFICATION ABOUT ERROR”

#warning “NOTIFICATION ABOUT WARNING”

#line DIGIT “FILENAME”

#if

#ifdef IDENTIFIER

#ifndef DEBUG_FILENAME

#define DEBUG_FILENAME

#else

#elif DEVICE == VALUE

#endif

Structures of Arithmetic Operators:

= (assignment operator)

+ (addition)

- (subtraction)

* (multiplication)

/ (division)

% (modulo)

Structures of Comparison Operators:

== (equal to)

!= (not equal to)

< (less than)

> (greater than)

<= (less than or equal to)

>= (greater than or equal to)

Structures of Boolean Operators:

&& (and)

|| (or)

! (not)

Structures of Pointer-access Operators:

* dereference operator

& reference operator

Structures of Bitwise Operators:

& (bitwise and)

| (bitwise or)

^ (bitwise xor)

~ (bitwise not)

<< (bitshift left)

>> (bitshift right)

Structures of Compound Operators:

++ (increment)

-- (decrement)

+= (compound addition)

-= (compound subtraction)

*= (compound multiplication)

/= (compound division)

%= (compound modulo)

&= (compound bitwise and)

|= (compound bitwise or)

Variable constants:

HIGH | LOW

INPUT | OUTPUT | INPUT_PULLUP

LED_BUILTIN

true | false

LEFT | RIGHT | CENTER

CHANGE

PORTA | PORTB | PORTC | PORTD | PORTE

PINA | PINB | PINC | PIND | PINE

UP_BUTTON | DOWN_BUTTON

Variable data types:

Sbit DEVICE_PIN_NAME

void CONFIGURATIONS(){}

struct VALUE{}

boolean x = y; //

char x = "y"; //

unsigned char x = y; //

byte x = y; //

int x = y; //

uint8_t x = y; //

uint16_t x = y; //

uint32_t x = y; //

uint64_t x = y; //

unsigned int x = y; //

word x = y; //

long x = y; //

unsigned long x = y; //

short x = y; //

float x = y; //

double x, y; //

string - char array //

String x = "y"; //

Array

Variable conversion:

Char()

Byte()

Int ()

Word()

Long()

Float()

Variable scope and qualifiers:

Static

Volatile

Const

Register

Extern

Union

Class

Public

Private

Protected

Auto

Operator

Typedef

Enum

Variable utilities:

sizeof ();

PROGMEM

All Updating

Arduino_Updating

AVR-Microcontroller:

/*Microcontrollers Atmega8515/162 pin out configuration */

#ifndef AVR_PINOUT_H

#define AVR_PINOUT_H

#include"AVR_PINOUT.h"

#include"Arduino.h"

#else

#include<avr/io.h>

#else

#include<avr/signal.h>

/*Interface of Port B*/

#define MCU_SPI_PBDI_PORTB_PB0 0; //

#define MCU_SPI_PBDI_PORTB_PB1 1; //

#define MCU_SPI_PBDI_PORTB_PB2 2; //

#define MCU_SPI_PBDI_PORTB_PB3 3; //

#define MCU_SPI_PBDI_PORTB_PB4 4; //

#define MCU_SPI_PBDI_PORTB_PB5 5; //

#define MCU_SPI_PBDI_PORTB_PB6 6; //

#define MCU_SPI_PBDI_PORTB_PB7 7; //

/*Interface of Port D*/

#define MCU_USART_PDDI_PORTD_PD0 8; //

#define MCU_USART_PDDI_PORTD_PD1 9; //

#define MCU_USART_PDDI_PORTD_PD2 10; //

#define MCU_USART_PDDI_PORTD_PD3 11; //

#define MCU_USART_PDDI_PORTD_PD4 12; //

#define MCU_USART_PDDI_PORTD_PD5 13; //

#define MCU_USART_PDDI_PORTD_PD6 14; //

#define MCU_USART_PDDI_PORTD_PD7 15; //

/*Interface of Port C*/

#define MCU_PCDI_PORTC_PC0 16; //

#define MCU_PCDI_PORTC_PC1 17; //

#define MCU_PCDI_PORTC_PC2 18; //

#define MCU_PCDI_PORTC_PC3 19; //

#define MCU_PCDI_PORTC_PC4 20; //

#define MCU_PCDI_PORTC_PC5 21; //

#define MCU_PCDI_PORTC_PC6 22; //

#define MCU_PCDI_PORTC_PC7 23; //

/*Interface of Port A*/

#define MCU_PADI_PORTA_PA0 24; //

#define MCU_PADI_PORTA_PA1 25; //

#define MCU_PADI_PORTA_PA2 26; //

#define MCU_PADI_PORTA_PA3 27; //

#define MCU_PADI_PORTA_PA4 28; //

#define MCU_PADI_PORTA_PA5 29; //

#define MCU_PADI_PORTA_PA6 30; //

#define MCU_PADI_PORTA_PA7 31; //

/*Interface of Port E*/

#define MCU_PEDI_PORTE_PE2 34; //

#define MCU_PEDI_PORTE_PE1 33; //

#define MCU_PEDI_PORTE_PE0 32; //

/*Interface of Port B*/

MCU_SPI_PBDI_PORTB_PB0 = 0; //

MCU_SPI_PBDI_PORTB_PB1 = 1; //

MCU_SPI_PBDI_PORTB_PB2 = 2; //

MCU_SPI_PBDI_PORTB_PB3 = 3; //

MCU_SPI_PBDI_PORTB_PB4 = 4; //

MCU_SPI_PBDI_PORTB_PB5 = 5; //

MCU_SPI_PBDI_PORTB_PB6 = 6; //

MCU_SPI_PBDI_PORTB_PB7 = 7; //

/*Interface of Port D*/

MCU_USART_PDDI_PORTD_PD0 = 8; //

MCU_USART_PDDI_PORTD_PD1 = 9; //

MCU_USART_PDDI_PORTD_PD2 = 10; //

MCU_USART_PDDI_PORTD_PD3 = 11; //

MCU_USART_PDDI_PORTD_PD4 = 12; //

MCU_USART_PDDI_PORTD_PD5 = 13; //

MCU_USART_PDDI_PORTD_PD6 = 14; //

MCU_USART_PDDI_PORTD_PD7 = 15; //

/*Interface of Port C*/

MCU_PCDI_PORTC_PC0 = 16; //

MCU_PCDI_PORTC_PC1 = 17; //

MCU_PCDI_PORTC_PC2 = 18; //

MCU_PCDI_PORTC_PC3 = 19; //

MCU_PCDI_PORTC_PC4 = 20; //

MCU_PCDI_PORTC_PC5 = 21; //

MCU_PCDI_PORTC_PC6 = 22; //

MCU_PCDI_PORTC_PC7 = 23; //

/*Interface of Port A*/

MCU_PADI_PORTA_PA0 = 24; //

MCU_PADI_PORTA_PA1 = 25; //

MCU_PADI_PORTA_PA2 = 26; //

MCU_PADI_PORTA_PA3 = 27; //

MCU_PADI_PORTA_PA4 = 28; //

MCU_PADI_PORTA_PA5 = 29; //

MCU_PADI_PORTA_PA6 = 30; //

MCU_PADI_PORTA_PA7 = 31; //

/*Interface of Port E*/

MCU_PEDI_PORTE_PE2 = 34; //

MCU_PEDI_PORTE_PE1 = 33; //

MCU_PEDI_PORTE_PE0 = 32; //

/*Microcontrollers Atmega8535/16/32/164/324/644/1284 pin out configuration */

/*Interface of Port B*/

#define MCU_SPI_PBDI_PORTB_PB0_LED 0; //

#define MCU_SPI_PBDI_PORTB_PB1 1; //

#define MCU_SPI_PBDI_PORTB_PB2 2; //

#define MCU_SPI_PBDI_PORTB_PB3 3; //

#define MCU_SPI_PBDI_PORTB_PB4_SS 4; //

#define MCU_SPI_PBDI_PORTB_PB5_MOSI 5; //

#define MCU_SPI_PBDI_PORTB_PB6_MISO 6; //

#define MCU_SPI_PBDI_PORTB_PB7_SCK 7; //

/*Interface of Port D*/

#define MCU_USART_PDDI_PORTD_PD0_RXD 8; //

#define MCU_USART_PDDI_PORTD_PD1_TXD 9; //

#define MCU_USART_PDDI_PORTD_PD2 10; //

#define MCU_USART_PDDI_PORTD_PD3 11; //

#define MCU_USART_PDDI_PORTD_PD4 12; //

#define MCU_USART_PDDI_PORTD_PD5 13; //

#define MCU_USART_PDDI_PORTD_PD6 14; //

#define MCU_USART_PDDI_PORTD_PD7 15; //

/*Interface of Port C*/

#define MCU_TWI_PCDI_PORTC_PC0_SCL 16; //

#define MCU_TWI_PCDI_PORTC_PC1_SDA 17; //

#define MCU_TWI_PCDI_PORTC_PC2_TCK 18; //

#define MCU_TWI_PCDI_PORTC_PC3_TMS 19; //

#define MCU_TWI_PCDI_PORTC_PC4_TDO 20; //

#define MCU_TWI_PCDI_PORTC_PC5_TDI 21; //

#define MCU_TWI_PCDI_PORTC_PC6 22; //

#define MCU_TWI_PCDI_PORTC_PC7 23; //

/*Interface of Port A*/

#define MCU_PADI_PORTA_ADC_PA0 24; //

#define MCU_PADI_PORTA_ADC_PA1 25; //

#define MCU_PADI_PORTA_ADC_PA2 26; //

#define MCU_PADI_PORTA_ADC_PA3 27; //

#define MCU_PADI_PORTA_ADC_PA4 28; //

#define MCU_PADI_PORTA_ADC_PA5 29; //

#define MCU_PADI_PORTA_ADC_PA6 30; //

#define MCU_PADI_PORTA_ADC_PA7 31; //

/*Interface of Port B*/

MCU_SPI_PBDI_PORTB_PB0_LED = 0; //

MCU_SPI_PBDI_PORTB_PB1 = 1; //

MCU_SPI_PBDI_PORTB_PB2 = 2; //

MCU_SPI_PBDI_PORTB_PB3 = 3; //

MCU_SPI_PBDI_PORTB_PB4_SS = 4; //

MCU_SPI_PBDI_PORTB_PB5_MOSI = 5; //

MCU_SPI_PBDI_PORTB_PB6_MISO = 6; //

MCU_SPI_PBDI_PORTB_PB7_SCK = 7; //

/*Interface of Port D*/

MCU_USART_PDDI_PORTD_PD0_RXD = 8; //

MCU_USART_PDDI_PORTD_PD1_TXD = 9; //

MCU_USART_PDDI_PORTD_PD2 = 10; //

MCU_USART_PDDI_PORTD_PD3 = 11; //

MCU_USART_PDDI_PORTD_PD4 = 12; //

MCU_USART_PDDI_PORTD_PD5 = 13; //

MCU_USART_PDDI_PORTD_PD6 = 14; //

MCU_USART_PDDI_PORTD_PD7 = 15; //

/*Interface of Port C*/

MCU_TWI_PCDI_PORTC_PC0_SCL = 16; //

MCU_TWI_PCDI_PORTC_PC1_SDA = 17; //

MCU_TWI_PCDI_PORTC_PC2_TCK = 18; //

MCU_TWI_PCDI_PORTC_PC3_TMS = 19; //

MCU_TWI_PCDI_PORTC_PC4_TDO = 20; //

MCU_TWI_PCDI_PORTC_PC5_TDI = 21; //

MCU_TWI_PCDI_PORTC_PC6 = 22; //

MCU_TWI_PCDI_PORTC_PC7 = 23; //

/*Interface of Port A*/

MCU_PADI_PORTA_ADC_PA0 = 24; //

MCU_PADI_PORTA_ADC_PA1 = 25; //

MCU_PADI_PORTA_ADC_PA2 = 26; //

MCU_PADI_PORTA_ADC_PA3 = 27; //

MCU_PADI_PORTA_ADC_PA4 = 28; //

MCU_PADI_PORTA_ADC_PA5 = 29; //

MCU_PADI_PORTA_ADC_PA6 = 30; //

MCU_PADI_PORTA_ADC_PA7 = 31; //

/*Microcontrollers Atmega8/48/88/168/328 pin out configuration */

/*Interface of Port D*/

#define MCU_USART_PORTD_PD0_RXD 0; //

#define MCU_USART_PORTD_PD1_TXD 1; //

#define MCU_USART_PORTD_PD2 2; //

#define MCU_USART_PORTD_PD3 3; //

#define MCU_USART_PORTD_PD4 4; //

#define MCU_USART_PORTD_PD5 5; //

#define MCU_USART_PORTD_PD6 6; //

#define MCU_USART_PORTD_PD7 7; //

/*Interface of Port B*/

#define MCU_SPI_PORTB_PB0 8; //

#define MCU_SPI_PORTB_PB1 9; //

#define MCU_SPI_PORTB_PB2_SS 10; //

#define MCU_SPI_PORTB_PB3_MOSI 11; //

#define MCU_SPI_PORTB_PB4_MISO 12; //

#define MCU_SPI_PORTB_PB5_SCK 13; //

#define MCU_SPI_PORTB_PB6_XTAL1 20*; //

#define MCU_SPI_PORTB_PB7_XTAL2 21*; //

/*Interface of Port C*/

#define MCU_TWI_PORTC_ADC_PC0_A0 14; //

#define MCU_TWI_PORTC_ADC_PC1_A1 15; //

#define MCU_TWI_PORTC_ADC_PC2_A2 16; //

#define MCU_TWI_PORTC_ADC_PC3_A3 17; //

#define MCU_TWI_PORTC_ADC_PC4_A4_SDA 18; //

#define MCU_TWI_PORTC_ADC_PC5_A5_SCL 19; //

#define MCU_TWI_PORTC_ADC_PC6_RESET 20*; //

/*Interface of Port D*/

MCU_USART_PORTD_PD0_RXD = 0; //

MCU_USART_PORTD_PD1_TXD = 1; //

MCU_USART_PORTD_PD2 = 2; //

MCU_USART_PORTD_PD3 = 3; //

MCU_USART_PORTD_PD4 = 4; //

MCU_USART_PORTD_PD5 = 5; //

MCU_USART_PORTD_PD6 = 6; //

MCU_USART_PORTD_PD7 = 7; //

/*Interface of Port B*/

MCU_SPI_PORTB_PB0 = 8; //

MCU_SPI_PORTB_PB1 = 9; //

MCU_SPI_PORTB_PB2_SS = 10; //

MCU_SPI_PORTB_PB3_MOSI = 11; //

MCU_SPI_PORTB_PB4_MISO = 12; //

MCU_SPI_PORTB_PB5_SCK = 13; //

MCU_SPI_PORTB_PB6_XTAL1 = 20*; //

MCU_SPI_PORTB_PB7_XTAL2 = 21*; //

/*Interface of Port C*/

MCU_TWI_PORTC_ADC_PC0_A0 = 14; //

MCU_TWI_PORTC_ADC_PC1_A1 = 15; //

MCU_TWI_PORTC_ADC_PC2_A2 = 16; //

MCU_TWI_PORTC_ADC_PC3_A3 = 17; //

MCU_TWI_PORTC_ADC_PC4_A4_SDA = 18; //

MCU_TWI_PORTC_ADC_PC5_A5_SCL = 19; //

MCU_TWI_PORTC_ADC_PC6_RESET = 20*; //

/*Microcontrollers ATtiny87/167 pin out configuration */

/*Interface of Port A*/

#define MCU_TIMER_COUNTER0_PORTA_PA0_RXD 0; //

#define MCU_TIMER_COUNTER0_PORTA_PA1_TXD 1; //

#define MCU_TIMER_COUNTER0_PORTA_PA2_DO_MISO 2; //

#define MCU_TIMER_COUNTER0_PORTA_PA3 3; //

#define MCU_TIMER_COUNTER0_PORTA_PA4_DI_SDA_MOSI 4; //

#define MCU_TIMER_COUNTER0_PORTA_PA5_SCL_SCK 5; //

#define MCU_TIMER_COUNTER0_PORTA_PA6_SS 6; //

#define MCU_TIMER_COUNTER0_PORTA_PA7 7; //

/*Interface of Port B*/

#define MCU_TIMER_COUNTER1_PORTB_PB0 8; //

#define MCU_TIMER_COUNTER1_PORTB_PB1 9; //

#define MCU_TIMER_COUNTER1_PORTB_PB2 10; //

#define MCU_TIMER_COUNTER1_PORTB_PB3 11; //

#define MCU_TIMER_COUNTER1_PORTB_PB4 12; //

#define MCU_TIMER_COUNTER1_PORTB_PB5 13; //

#define MCU_TIMER_COUNTER1_PORTB_PB6 14; //

#define MCU_TIMER_COUNTER1_PORTB_PB7_RESET 15; //

/*Interface of Port A*/

MCU_TIMER_COUNTER0_PORTA_PA0_RXD = 0; //

MCU_TIMER_COUNTER0_PORTA_PA1_TXD = 1; //

MCU_TIMER_COUNTER0_PORTA_PA2_DO_MISO = 2; //

MCU_TIMER_COUNTER0_PORTA_PA3 = 3; //

MCU_TIMER_COUNTER0_PORTA_PA4_DI_SDA_MOSI = 4; //

MCU_TIMER_COUNTER0_PORTA_PA5_SCL_SCK = 5; //

MCU_TIMER_COUNTER0_PORTA_PA6_SS = 6; //

MCU_TIMER_COUNTER0_PORTA_PA7 = 7; //

/*Interface of Port B*/

MCU_TIMER_COUNTER1_PORTB_PB0 = 8; //

MCU_TIMER_COUNTER1_PORTB_PB1 = 9; //

MCU_TIMER_COUNTER1_PORTB_PB2 = 10; //

MCU_TIMER_COUNTER1_PORTB_PB3 = 11; //

MCU_TIMER_COUNTER1_PORTB_PB4 = 12; //

MCU_TIMER_COUNTER1_PORTB_PB5 = 13; //

MCU_TIMER_COUNTER1_PORTB_PB6 = 14; //

MCU_TIMER_COUNTER1_PORTB_PB7_RESET = 15; //

/*Microcontrollers ATtiny261/461/861 pin out configuration */

/*Interface of Port A*/

#define MCU_ADC_IBG_PORTA_PA0 0; //

#define MCU_ADC_IBG_PORTA_PA1 1; //

#define MCU_ADC_IBG_PORTA_PA2 2; //

#define MCU_ADC_IBG_PORTA_PA3 14; //

#define MCU_ADC_IBG_PORTA_PA4 10; //

#define MCU_ADC_IBG_PORTA_PA5 11; //

#define MCU_ADC_IBG_PORTA_PA6 12; //

#define MCU_ADC_IBG_PORTA_PA7 13; //

/*Interface of Port B*/

#define MCU_TIMER_COUNTER_USI_PORTB_PB0 9; //

#define MCU_TIMER_COUNTER_USI_PORTB_PB1 8; //

#define MCU_TIMER_COUNTER_USI_PORTB_PB2 7; //

#define MCU_TIMER_COUNTER_USI_PORTB_PB3 6; //

#define MCU_TIMER_COUNTER_USI_PORTB_PB4 5; //

#define MCU_TIMER_COUNTER_USI_PORTB_PB5 4; //

#define MCU_TIMER_COUNTER_USI_PORTB_PB6 3; //

#define MCU_TIMER_COUNTER_USI_PORTB_PB7 15; //

/*Interface of Port A*/

MCU_ADC_IBG_PORTA_PA0 = 0; //

MCU_ADC_IBG_PORTA_PA1 = 1; //

MCU_ADC_IBG_PORTA_PA2 = 2; //

MCU_ADC_IBG_PORTA_PA3 = 14; //

MCU_ADC_IBG_PORTA_PA4 = 10; //

MCU_ADC_IBG_PORTA_PA5 = 11; //

MCU_ADC_IBG_PORTA_PA6 = 12; //

MCU_ADC_IBG_PORTA_PA7 = 13; //

/*Interface of Port B*/

MCU_TIMER_COUNTER_USI_PORTB_PB0 = 9; //

MCU_TIMER_COUNTER_USI_PORTB_PB1 = 8; //

MCU_TIMER_COUNTER_USI_PORTB_PB2 = 7; //

MCU_TIMER_COUNTER_USI_PORTB_PB3 = 6; //

MCU_TIMER_COUNTER_USI_PORTB_PB4 = 5; //

MCU_TIMER_COUNTER_USI_PORTB_PB5 = 4; //

MCU_TIMER_COUNTER_USI_PORTB_PB6 = 3; //

MCU_TIMER_COUNTER_USI_PORTB_PB7 = 15; //

/*Microcontrollers ATtiny1634 pin out configuration */

MCU_TWI_USI_16BIT_DI_ISP_8BIT_USART0_USART1_TS_AC_TS_PORTA_PA0 = 8; //

MCU_TWI_USI_16BIT_DI_ISP_8BIT_USART0_USART1_TS_AC_TS_PORTA_PA1 = 7; //

MCU_TWI_USI_16BIT_DI_ISP_8BIT_USART0_USART1_TS_AC_TS_PORTA_PA2 = 6; //

MCU_TWI_USI_16BIT_DI_ISP_8BIT_USART0_USART1_TS_AC_TS_PORTA_PA3 = 5; //

MCU_TWI_USI_16BIT_DI_ISP_8BIT_USART0_USART1_TS_AC_TS_PORTA_PA4 = 4; //

MCU_TWI_USI_16BIT_DI_ISP_8BIT_USART0_USART1_TS_AC_TS_PORTA_PA5 = 3; //

MCU_TWI_USI_16BIT_DI_ISP_8BIT_USART0_USART1_TS_AC_TS_PORTA_PA6 = 2; //

MCU_TWI_USI_16BIT_DI_ISP_8BIT_USART0_USART1_TS_AC_TS_PORTA_PA7 = 1; //

MCU_TWI_USI_16BIT_DI_ISP_8BIT_USART0_USART1_TS_AC_TS_PORTB_PB0 = 0; //

MCU_TWI_USI_16BIT_DI_ISP_8BIT_USART0_USART1_TS_AC_TS_PORTB_PB1 = 16; //

MCU_TWI_USI_16BIT_DI_ISP_8BIT_USART0_USART1_TS_AC_TS_PORTB_PB2 = 15; //

MCU_TWI_USI_16BIT_DI_ISP_8BIT_USART0_USART1_TS_AC_TS_PORTB_PB3 = 14; //

MCU_TWI_USI_16BIT_DI_ISP_8BIT_USART0_USART1_TS_AC_TS_PORTC_PC0 = 13; //

MCU_TWI_USI_16BIT_DI_ISP_8BIT_USART0_USART1_TS_AC_TS_PORTC_PC1 = 12; //

MCU_TWI_USI_16BIT_DI_ISP_8BIT_USART0_USART1_TS_AC_TS_PORTC_PC2 = 11; //

MCU_TWI_USI_16BIT_DI_ISP_8BIT_USART0_USART1_TS_AC_TS_PORTC_PC3 = 17; //

MCU_TWI_USI_16BIT_DI_ISP_8BIT_USART0_USART1_TS_AC_TS_PORTC_PC4 = 10; //

MCU_TWI_USI_16BIT_DI_ISP_8BIT_USART0_USART1_TS_AC_TS_PORTC_PC5 = 9; //

/*Microcontrollers ATtiny2313/4313 pin out configuration */

/*Interface of Port A*/

#define MCU_TIMING_CONTROL_PORTA_PA0_XTAL1 3; //

#define MCU_TIMING_CONTROL_PORTA_PA1_XTAL2 2; //

#define MCU_TIMING_CONTROL_PORTA_PA2_RESET 17; //

/*Interface of Port B*/

#define MCU_SPI_DRPORTB_REGPORTB_PORTB_PB0 9; //

#define MCU_SPI_DRPORTB_REGPORTB_PORTB_PB1 10; //

#define MCU_SPI_DRPORTB_REGPORTB_PORTB_PB2 11; //

#define MCU_SPI_DRPORTB_REGPORTB_PORTB_PB3 12; //

#define MCU_SPI_DRPORTB_REGPORTB_PORTB_PB4 13; //

#define MCU_SPI_DRPORTB_REGPORTB_PORTB_PB5_MOSI 14; //

#define MCU_SPI_DRPORTB_REGPORTB_PORTB_PB6_MISO 15; //

#define MCU_SPI_DRPORTB_REGPORTB_PORTB_PB7_SCK 16; //

/*Interface of Port D*/

#define MCU_USART_DRPORTD_REGPORTD_PORTD_PD0_RXD 0; //

#define MCU_USART_DRPORTD_REGPORTD_PORTD_PD1_TXD 1; //

#define MCU_USART_DRPORTD_REGPORTD_PORTD_PD2 4; //

#define MCU_USART_DRPORTD_REGPORTD_PORTD_PD3 5; //

#define MCU_USART_DRPORTD_REGPORTD_PORTD_PD4 6; //

#define MCU_USART_DRPORTD_REGPORTD_PORTD_PD5 7; //

#define MCU_USART_DRPORTD_REGPORTD_PORTD_PD6 8; //

#else

/*Interface of Port A*/

MCU_TIMING_CONTROL_PORTA_PA0_XTAL1 = 3; //

MCU_TIMING_CONTROL_PORTA_PA1_XTAL2 = 2; //

MCU_TIMING_CONTROL_PORTA_PA2_RESET = 17; //

/*Interface of Port B*/

MCU_SPI_DRPORTB_REGPORTB_PORTB_PB0 = 9; //

MCU_SPI_DRPORTB_REGPORTB_PORTB_PB1 = 10; //

MCU_SPI_DRPORTB_REGPORTB_PORTB_PB2 = 11; //

MCU_SPI_DRPORTB_REGPORTB_PORTB_PB3 = 12; //

MCU_SPI_DRPORTB_REGPORTB_PORTB_PB4 = 13; //

MCU_SPI_DRPORTB_REGPORTB_PORTB_PB5_MOSI = 14; //

MCU_SPI_DRPORTB_REGPORTB_PORTB_PB6_MISO = 15; //

MCU_SPI_DRPORTB_REGPORTB_PORTB_PB7_SCK = 16; //

/*Interface of Port D*/

MCU_USART_DRPORTD_REGPORTD_PORTD_PD0_RXD = 0; //

MCU_USART_DRPORTD_REGPORTD_PORTD_PD1_TXD = 1; //

MCU_USART_DRPORTD_REGPORTD_PORTD_PD2 = 4; //

MCU_USART_DRPORTD_REGPORTD_PORTD_PD3 = 5; //

MCU_USART_DRPORTD_REGPORTD_PORTD_PD4 = 6; //

MCU_USART_DRPORTD_REGPORTD_PORTD_PD5 = 7; //

MCU_USART_DRPORTD_REGPORTD_PORTD_PD6 = 8; //

PIC-Microcontroller:

MCU_PA0_RA0_                       0x00

MCU_PA1_RA1_                       0x01

MCU_PA2_RA2_                       0x02

MCU_PA3_RA3_                       0x03

MCU_PA4_RA4_                       0x04

MCU_PA5_RA5_                       0x05

MCU_PA6_RA6_                       0x06

MCU_PA7_RA7_                       0x07

MCU_PB0_RB0_                       0x08

MCU_PB1_RB1_                       0x09

MCU_PB2_RB2_                       0x0A

MCU_PB3_RB3_                       0x0B

MCU_PB4_RB4_                       0x0C

MCU_PB5_RB5_                       0x0D

MCU_PB6_RB6_                       0x0E

MCU_PB7_RB7_                       0x0F

MCU_PC0_RC0_                       0x10

MCU_PC1_RC1_                       0x11

MCU_PC2_RC2_                       0x12

MCU_PC3_RC3_                       0x13

MCU_PC4_RC4_                       0x14

MCU_PC5_RC5_                       0x15

MCU_PC6_RC6_                       0x16

MCU_PC7_RC7_                       0x17

MCU_USB_PC4_RC4_DM = MCU_PIN; //

MCU_USB_PC5_RC5_DP = MCU_PIN; //

MCU_AddressLatch_DataMemory_DataLatch_PA0_RA0_


Дата добавления: 2018-09-20; просмотров: 229; Мы поможем в написании вашей работы!

Поделиться с друзьями:






Мы поможем в написании ваших работ!