PIC Vietnam

Go Back   PIC Vietnam > Microchip PIC > dsPIC - Bộ điều khiển tín hiệu số 16-bit

Tài trợ cho PIC Vietnam
Trang chủ Đăng Kí Hỏi/Ðáp Thành Viên Lịch Bài Trong Ngày Vi điều khiển

dsPIC - Bộ điều khiển tín hiệu số 16-bit Theo dự kiến của Microchip, vào khoảng năm 2011 dsPIC sẽ có doanh số lớn hơn PIC

 
 
Ðiều Chỉnh Xếp Bài
Prev Previous Post   Next Post Next
Old 28-08-2009, 09:03 PM   #1
hiodong
Nhập môn đệ tử
 
Tham gia ngày: Aug 2007
Bài gửi: 6
:
Hỏi về đọc ghi vào EEPROM của dsPIC30F

trong file dataEEPROM.h có nội dung
Code:
/*
 * ReadEErow prototype:
 * Parameters Definition:
 * Page:        is the 8 most significant bits of the source address in EEPROM
 * Offset:      is 16 least significant bits of the source address in EEPROM
 * DataOut:     is the 16-bit address of the destination RAM location or array
 * Size:        is the number of words to read from EEPROM and is a value of 1 or 16
 * Return Value:
 * Function returns ERROREE (or -1) if Size is invalid
 */
extern int ReadEE(int Page, int Offset, int* DataOut, int Size);

/*
 * EraseEErow prototype:
 * Parameters Definition:
 * Page:        is the 8 most significant bits of the address in EEPROM to be erased
 * Offset:      is 16 least significant bits of the address in EEPROM to be erased
 * Size:        is the number of words to read from EEPROM and is a value of 1, 16 or
 *              0xFFFF (for erasing ALL EEPROM memory)
 * Return Value:
 * Function returns ERROREE (or -1) if Size is invalid
 */
extern int EraseEE(int Page, int Offset, int Size);

/*
 * WriteEErow prototype:
 * Parameters Definition:
 * Page:        is the 8 most significant bits of the destination address in EEPROM
 * Offset:      is 16 least significant bits of the destination address in EEPROM
 * DataIn:      is the 16-bit address of the source RAM location or array
 * Size:        is the number of words to read from EEPROM and is a value of 1 or 16
 * Return Value:
 * Function returns ERROREE (or -1) if Size is invalid
 */
extern int WriteEE(int* DataIn, int Page, int Offset, int Size);
Em dùng thử mà kết quả ko chính xác, đồng thời ko hiểu rõ ý nghĩa của Page , Offset lắm
Nhờ mọi người giúp đỡ !
hiodong vẫn chưa có mặt trong diễn đàn   Trả Lời Với Trích Dẫn
 


Quyền Sử Dụng Ở Diễn Ðàn
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is Mở
Smilies đang Mở
[IMG] đang Mở
HTML đang Tắt

Chuyển đến


Múi giờ GMT. Hiện tại là 02:11 PM.


Được sáng lập bởi Đoàn Hiệp
Powered by vBulletin®
Page copy protected against web site content infringement by Copyscape
Copyright © PIC Vietnam