有什么辦法快速把51的程序移植到430(1)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#define DS1302_IN P2IN
#define DS1302_OUT P2OUT
#define DS1302_RST BIT1
#define DS1302_SCLK BIT0
#define DS1302_SDI BIT2 //定義MSP320的端口
#define DS1302_RST_LO DS1302_OUT &= ~DS1302_RST
#define DS1302_RST_HI DS1302_OUT |= DS1302_RST
#define DS1302_SCLK_LO DS1302_OUT &= ~DS1302_SCLK
#define DS1302_SCLK_HI DS1302_OUT |= DS1302_SCLK
#define DS1302_SDI_LO DS1302_OUT &= ~DS1302_SDI
#define DS1302_SDI_HI DS1302_OUT |= DS1302_SDI
#define DS1302_OUT P2OUT
#define DS1302_RST BIT1
#define DS1302_SCLK BIT0
#define DS1302_SDI BIT2 //定義MSP320的端口
#define DS1302_RST_LO DS1302_OUT &= ~DS1302_RST
#define DS1302_RST_HI DS1302_OUT |= DS1302_RST
#define DS1302_SCLK_LO DS1302_OUT &= ~DS1302_SCLK
#define DS1302_SCLK_HI DS1302_OUT |= DS1302_SCLK
#define DS1302_SDI_LO DS1302_OUT &= ~DS1302_SDI
#define DS1302_SDI_HI DS1302_OUT |= DS1302_SDI
評(píng)論