对于T触发器,当T=( )时,触发器处于保持状态。
查看答案
要使D触发器按Qn+1=Qn工作,应使输入D=( )
A. 0
B. 1
C. Q
D. /Q
使J=K=D,就可实现JK触发器到D触发器的功能转换。
A. 对
B. 错
若向量组的秩为r,则其中任意r+1个向量(如果存在)都线性相关。
A. 对
B. 错
通过Arduinonano、射频模块MFRC522、带I2C总线的LCD1602扩展板、热敏电阻、RGB三色灯、蜂鸣器设计高频读卡器。以下程序实现了自动读卡(MifareS50)功能,读卡成功后在LCD上显示卡号,并将卡号发送到串口上。#include#include#include#includeconstexpruint8_tRST_PIN=9;//Configurable,seetypicalpinlayoutaboveconstexpruint8_tSS_PIN=10;//Configurable,seetypicalpinlayoutaboveMFRC522rfid(SS_PIN,RST_PIN);//InstanceoftheclassLiquidCrystal_I2Clcd(0x27,20,4);bytenuidPICC[4];//InitarraythatwillstorenewNUIDvoidsetup(){Serial.begin(9600);SPI.begin();//InitSPIbusrfid.PCD_Init();//InitMFRC522lcd.init();lcd.backlight();}voidloop(){//Lookfornewcardsif(!rfid.PICC_IsNewCardPresent())return;//VerifyiftheNUIDhasbeenreadedif(!rfid.PICC_ReadCardSerial())return;if(rfid.uid.uidByte[0]!=nuidPICC[0]||rfid.uid.uidByte[1]!=nuidPICC[1]||rfid.uid.uidByte[2]!=nuidPICC[2]||rfid.uid.uidByte[3]!=nuidPICC[3]){Serial.println(F("Anewcardhasbeendetected."));//StoreNUIDintonuidPICCarrayfor(bytei=0;i<4;i++){nuidPICC[i]=rfid.uid.uidByte[i];}Serial.println(F("TheNUIDtagis:"));Serial.print(F("Inhex:"));printHex(rfid.uid.uidByte,rfid.uid.size);Serial.println();}elseSerial.println(F("Cardreadpreviously."));//HaltPICCrfid.PICC_HaltA();//StopencryptiononPCDrfid.PCD_StopCrypto1();}/***/HelperroutinetodumpabytearrayashexvaluestoSerialandLCD.*/voidprintHex(byte*buffer,bytebufferSize){lcd.setCursor(0,0);for(bytei=0;i