board.h

来自「This is my code (with PIC 18F458) for Mo」· C头文件 代码 · 共 45 行

H
45
字号
#byte PortA    = 0xF80
#byte PortB    = 0xF81
#byte PortC    = 0xF82
#byte PortD    = 0xF83
#byte PortE    = 0xF84

#byte TrisA    =0xf92
#byte TrisB    =0xf93
#byte TrisC    =0xf94
#byte TrisD    =0xf95
#byte TrisE    =0xf96

#byte LatA     = 0xF89
#byte LatB     = 0xF8A
#byte LatC     = 0xF8B
#byte LatD     = 0xF8C
#byte LatE     = 0xF8D

#bit trisa4    =TrisA.4
//#bit trisc2    =TrisC.2


#define Button       input(PIN_A4)
#define Led1On       output_high(pin_d0)
#define Led1Off      output_low(pin_d0)
#define Led2On       output_high(pin_d1)
#define Led2Off      output_low(pin_d1)
#define Led3On       output_high(pin_d2)
#define Led3Off      output_low(pin_d2)
#define Led4On       output_high(pin_d3)
#define Led4Off      output_low(pin_d3)
#define Led5On       output_high(pin_d4)
#define Led5Off      output_low(pin_d4)
#define Led6On       output_high(pin_d5)
#define Led6Off      output_low(pin_d5)
#define Led7On       output_high(pin_d6)
#define Led7Off      output_low(pin_d6)
#define Led8On       output_high(pin_d7)
#define Led8Off      output_low(pin_d7)

//#define ETransmit       output_high(pin_c2)
//#define EReceive        output_low(pin_c2)


⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?