利用mscomm向硬件传送数据。
      type
          Tbyterec=record
          Lo,Hi:Byte;
      end;
       tempbyte[0]:=Tbyterec(systemtime.wSecond).Lo ;
       mscomm1.Output:=tempbyte;
       tempbyte[0]:=Tbyterec(systemtime.wMinute ).Lo;
       mscomm1.Output:=tempbyte;
       tempbyte[0]:=Tbyterec(systemtime.wHour).Lo;
       mscomm1.Output:=tempbyte;
       tempbyte[0]:=Tbyterec(systemtime.wDay).Lo;
       mscomm1.Output:=tempbyte;
       tempbyte[0]:=Tbyterec(systemtime.wMonth).Lo;
       mscomm1.Output:=tempbyte;
       tempbyte[0]:=Tbyterec(systemtime.wDayOfWeek).Lo;
       mscomm1.Output:=tempbyte;
       tempbyte[0]:=Tbyterec(systemtime.wYear).Lo;
我用上面的方法,传送数据。告诉我错误“Access violation at address 004E1BA0 in module "***.exe". write of address 00000000”?
请问我应该怎么样写才能把秒、分、时、天、月、星期、年写到硬件中?