登录 注册
当前位置:主页 > 资源下载 > 31 > AS393x_FW_Sources_1.0.2.zip源码下载

AS393x_FW_Sources_1.0.2.zip源码下载

  • 更新:2024-10-05 19:08:08
  • 大小:1.71MB
  • 推荐:★★★★★
  • 来源:网友上传分享
  • 类别:单片机 - 硬件开发
  • 格式:ZIP

资源介绍

PIC单片机控制AS3933接收和发送 IRQ_COUNT = 0; // all I/O digital AD1PCFG = 0xFFFF; // set as output TRISA = ~0x001C; TRISB = ~0xE01F; // turn on internal pull ups for switch BUTTON_INTERNAL_PULL_UP = 1; EXT_INT_VBUS_INTERNAL_PULL_UP = 0; // set up spi interface /* route SDI1 to pin RP5 (RA0) */ RPINR20bits.SDI1R = 5; /* route pin RP4 (RB4) to SDO1 */ RPOR2bits.RP4R = 7; /* route pin RP3 (RB3) to SCK1 */ RPOR1bits.RP3R = 8; // /* route pin RP2 (RB2) to SS1 */ // RPOR1bits.RP2R = 9; // enable external interrupt for wake pin /* route INT1 to pin RP8 () */ RPINR0bits.INT1R = 8; INTCON2bits.INT1EP = 0; // on positive edge IPC5bits.INT1IP = 3; // middle priority IFS1bits.INT1IF = 0; // clear pending interrupts IEC1bits.INT1IE = 1; // enable interrupt // enable capture for frequency measurement (CL_DAT, 32 kHz oscillator) /* route IC1 to pin RP6 (RA1) */ RPINR7bits.IC1R = 6; // IC1 gets set up every time we need it //IPC0bits.IC1IP = 4; // middle priority //IEC0bits.IC1IE = 1; // enable interrupt // enable capture for frequency measurement (DAT, LFxP on LCO (125 kHz)) /* route IC2 to pin RP7 (RB7) */ RPINR7bits.IC2R = 7;