The AT24C512 provides 524,288 bits of serial electrically erasable and programmable
read only memory (EEPROM) organized as 65,536 words of 8 bits each. The device鈥檚
cascadable feature allows up to four devices to share a common two-wire bus. The
device is optimized for use in many industrial and commercial applications where lowpower
and low-voltage operation are essential. The devices are available in spacesaving
8-pin PDIP, 8-lead EIAJ SOIC, 8-lead JEDEC SOIC, 8-lead TSSOP, 8-lead
Leadless Array (LAP), and 8-lead SAP packages. In addition, the entire family is available
in 2.7V (2.7V to 5.5V) and 1.8V (1.8V to 3.6V) versions.
procedure senddata
var
i:integer commflg : Boolean
begin
commflg:=true
for i:=1 to 8 do
begin
if not fcomm comml writecommdata(sendbutter,i) then
begin
Commflg=false
break
end
end
end
(4) 接收數據
在編寫基于串口的計算機工業測控時,通常需要由下位機向PC機發送數據以使PC機了解系統的測試數據或下位機的運行狀態,并進而控制下位機的行為。利用Spcomm串口控件接收下位機發送的數據信息的示例代碼如下:
//事件驅動方式接收數據程序
procedure TForm1.CommlReceiveData(Sender:Tobject Buffer:Pointer bufferLength:Word)
var
receivedata:array of byte
begin
sleep(100) //等待100ms,保證接收到所有數據
move(buffef ,receivedata,bufferlength)
//將接收緩存區中的數據轉移到數組中
……
end
(5) 關閉串口
在系統開發中,應注意在不使用串口時應及時關閉串口,釋放系統資源,否則可能會影響系統的其它應用。關閉串口的代碼如下:
procedure TForm1.FormClose ( Sender TObj ect:var Action:TCIoseAction )
begin
comml.StopComm
end
Cromfs is a compressed read-only filesystem for Linux. Cromfs is best at archiving gigabytes of big files that have a lot of redundancy. It aims primarily at achieving a strong compression, even at the cost of memory and CPU time resources. It uses the LZMA compression algorithm from 7-zip and block merging.
AppWizard has created this autorun application for you. This application
not only demonstrates the basics of using the Microsoft Foundation classes
but is also a starting point for writing your application.