30.10.2014 Views

o_195h4n6al16jb186b1b2qs7fgssa.pdf

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

in the string.<br />

For continuous display of data written to the P-tec PCOG1602B LCD<br />

controller, you could set up the display in a Shift mode.<br />

Source File: PutsXLCD.c<br />

PutrsXLCD.c<br />

Code Example: char display_char[13];<br />

putsXLCD(display_char);<br />

OpenXLCD (Continued)<br />

dsPIC Peripheral Libraries<br />

2004 Microchip Technology Inc. DS51456B-page 77<br />

ReadAddrXLCD<br />

Description: This function reads the address byte from the P-tec PCOG1602B<br />

LCD<br />

controller.<br />

Include: xlcd.h<br />

Prototype: unsigned char ReadAddrXLCD (void);<br />

Arguments: None<br />

Return Value: This function returns an 8-bit which is the 7-bit address in the<br />

lower<br />

7 bits of the byte and the BUSYstatus flag in the 8th bit.<br />

Remarks: This function reads the address byte from the P-tec PCOG1602B<br />

LCD<br />

controller. The user must first check to see if the LCD controller is busy<br />

by calling the BusyXLCD()function.<br />

The address read from the controller is for the character generator<br />

RAM or the display data RAM depending on the previous<br />

Set??RamAddr()function that was called where ?? can be CG or<br />

DD.<br />

Source File: ReadAddrXLCD.c<br />

Code Example: char address;<br />

while(BusyXLCD());<br />

address = ReadAddrXLCD();<br />

ReadDataXLCD<br />

Description: This function reads a data bytefrom the P-tec PCOG1602B LCD<br />

controller.<br />

Include: xlcd.h<br />

Prototype: char ReadDataXLCD (void);<br />

Arguments: None<br />

Remarks: This function reads a data bytefrom the P-tec PCOG1602B LCD<br />

controller. The user must first check to see if the LCD controller is busy<br />

Source File: SetCGRamAddr.c<br />

Mã số Ví dụ: char cgaddr = 0x1f;<br />

trong khi (BusyXLCD ());<br />

SetCGRamAddr (cgaddr);<br />

SetDDRamAddr<br />

Mô tả: Chức năng này đặt địa chỉ hiển thị dữ liệu.<br />

Bao gồm: xlcd.h<br />

Prototype: void SetDDRamAddr (unsigned char DDaddr);<br />

Đối số: DDaddr địa chỉ dữ liệu hiển thị.<br />

Trở lại giá trị: Không<br />

Ghi chú: Chức năng này đặt dataaddress hiển thị của PCOG1602B P-tec<br />

LCD điều khiển. Người dùng đầu tiên phải kiểm tra xem nếu bộ điều khiển là<br />

bận rộn<br />

bằng cách gọi BusyXLCD () chức năng.<br />

Source File: SetDDRamAddr.c<br />

Mã số Ví dụ: char ddaddr = 0x10;<br />

trong khi (BusyXLCD ());<br />

SetDDRamAddr (ddaddr);<br />

WriteDataXLCD<br />

Mô tả: Chức năng này ghi một byte dữ liệu (một nhân vật) từ P-tec<br />

PCOG1602B LCD điều khiển.<br />

Bao gồm: xlcd.h<br />

Prototype: void WriteDataXLCD (dữ liệu char);<br />

Đối số: dữ liệu Giá trị của datacan được bất kỳ giá trị 8-bit, nhưng nên<br />

tương ứng với các bảng tính RAM của P-tec<br />

PCOG1602B LCD điều khiển.<br />

Trở lại giá trị: Không<br />

Ghi chú: Chức năng này ghi một dữ liệu byteto P-tec PCOG1602B LCD<br />

điều khiển. Người dùng đầu tiên phải kiểm tra xem nếu bộ điều khiển màn hình<br />

LCD đang bận<br />

bằng cách gọi BusyXLCD () chức năng.<br />

Đọc dữ liệu từ bộ điều khiển là cho RAM máy phát điện nhân vật hoặc<br />

RAM hiển thị dữ liệu tùy thuộc vào trước Set ?? RamAddr ()<br />

chức năng được gọi là nơi ?? đề cập đến một trong hai CG hoặc DD.<br />

Source File: WriteDataXLCD.c<br />

Mã số Ví dụ: WriteDataXLCD (0x30);<br />

dsPIC Thư viện ngoại vi<br />

2004 Microchip Technology Inc DS51456B trang 79<br />

WriteCmdXLCD<br />

Mô tả: Chức năng này ghi một commandto P-tec PCOG1602B LCD

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!