This widget could not be displayed.
Not applicable
Oct 12, 2015
05:38 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 12, 2015
05:38 AM
Dear administrator
when I Developed controller by XC2265, I used EEPROM which is AT251N.
I had to see the Hot of Traning document (HOT_XE164FM_EEPROM.pdf)
so I used DAVE tool (ver 2.0)
as below
//////////////////////////////////////////////////////
U0C1_SCTRH = 0x0707; // Sets frame length on 2 byte
U0C1_SSC_vSendData1(0x06); // Enables write mode
U0C1_SCTRH = 0x070F; // Sets frame length on 4 byte
U0C1_SSC_vSendData1(0x01); // Sets status register ready to write
U0C1_SSC_vSendData1(0x02); // Resets array adresses protection
while( U0C1_SSC_uwGetData() ) // Waits till writing has ended
{
U0C1_SCTRH = 0x070F; // Sets frame length on 4 byte
U0C1_SSC_vSendData1(0x05); // Reads Status Register
U0C1_SSC_vSendData1(0x00);
}
// Writes data in EEPROM
U0C1_SCTRH = 0x0707; // Sets frame length on 1 byte
U0C1_SSC_vSendData1(0x06); // Enables write mode
U0C1_SCTRH = 0x071F; // Sets frame length on 4 byte
U0C1_SSC_vSendData1(0x02); // Introduction for WRITE
U0C1_SSC_vSendData1(0x02); // Introduction for WRITE
U0C1_SSC_vSendData1(0x00); // Memory of EEPROM
U0C1_SSC_vSendData1(0x00); // Memory of EEPROM
U0C1_SSC_vSendData1(wriValue); // Transmit data
while( U0C1_SSC_uwGetData() ) // Waits till writing has ended
{
U0C1_SCTRH = 0x070F; // Sets frame length on 4 byte
U0C1_SSC_vSendData1(0x05); // Reads Status Register
U0C1_SSC_vSendData1(0x00);
}
…….
U0C1_SCTRH = 0x071F; // Sets frame length on 8 byte
U0C1_SSC_vSendData1(0x03); // Enables read mode
U0C1_SSC_vSendData1(0x00); // Memory of EEPROM
U0C1_SSC_vSendData1(0x00); // Memory of EEPROM
U0C1_SSC_vSendData1(0x00);
U0C1_SCTRH = 0x070F; // Sets frame length on 4 byte
Page 27
U0C1_SSC_vSendData1(0x05); // Reads Status Register
U0C1_SSC_vSendData1(0x00);I recently used documents.
recValue = U0C1_SSC_uwGetData();
////////////////////////////////////////////////////////
we recently used Tri-core 1767.
and we bought Tri-core 1767 EV kit included EEPROM(AT251N).
and we need to use EEPROM(AT251N) working by SPI communication
but we can't working using Existing sources.
we tried to find 32-bit Tri-core register like "U0C1_SCTRH"
but we can't
so please help us.
if you can, would you like to offer source to us.
If hard, please let me know register used to SPI communication
when I Developed controller by XC2265, I used EEPROM which is AT251N.
I had to see the Hot of Traning document (HOT_XE164FM_EEPROM.pdf)
so I used DAVE tool (ver 2.0)
as below
//////////////////////////////////////////////////////
U0C1_SCTRH = 0x0707; // Sets frame length on 2 byte
U0C1_SSC_vSendData1(0x06); // Enables write mode
U0C1_SCTRH = 0x070F; // Sets frame length on 4 byte
U0C1_SSC_vSendData1(0x01); // Sets status register ready to write
U0C1_SSC_vSendData1(0x02); // Resets array adresses protection
while( U0C1_SSC_uwGetData() ) // Waits till writing has ended
{
U0C1_SCTRH = 0x070F; // Sets frame length on 4 byte
U0C1_SSC_vSendData1(0x05); // Reads Status Register
U0C1_SSC_vSendData1(0x00);
}
// Writes data in EEPROM
U0C1_SCTRH = 0x0707; // Sets frame length on 1 byte
U0C1_SSC_vSendData1(0x06); // Enables write mode
U0C1_SCTRH = 0x071F; // Sets frame length on 4 byte
U0C1_SSC_vSendData1(0x02); // Introduction for WRITE
U0C1_SSC_vSendData1(0x02); // Introduction for WRITE
U0C1_SSC_vSendData1(0x00); // Memory of EEPROM
U0C1_SSC_vSendData1(0x00); // Memory of EEPROM
U0C1_SSC_vSendData1(wriValue); // Transmit data
while( U0C1_SSC_uwGetData() ) // Waits till writing has ended
{
U0C1_SCTRH = 0x070F; // Sets frame length on 4 byte
U0C1_SSC_vSendData1(0x05); // Reads Status Register
U0C1_SSC_vSendData1(0x00);
}
…….
U0C1_SCTRH = 0x071F; // Sets frame length on 8 byte
U0C1_SSC_vSendData1(0x03); // Enables read mode
U0C1_SSC_vSendData1(0x00); // Memory of EEPROM
U0C1_SSC_vSendData1(0x00); // Memory of EEPROM
U0C1_SSC_vSendData1(0x00);
U0C1_SCTRH = 0x070F; // Sets frame length on 4 byte
Page 27
U0C1_SSC_vSendData1(0x05); // Reads Status Register
U0C1_SSC_vSendData1(0x00);I recently used documents.
recValue = U0C1_SSC_uwGetData();
////////////////////////////////////////////////////////
we recently used Tri-core 1767.
and we bought Tri-core 1767 EV kit included EEPROM(AT251N).
and we need to use EEPROM(AT251N) working by SPI communication
but we can't working using Existing sources.
we tried to find 32-bit Tri-core register like "U0C1_SCTRH"
but we can't
so please help us.
if you can, would you like to offer source to us.
If hard, please let me know register used to SPI communication
- Tags:
- IFX
- tc1767 eeprom
1 Reply
This widget could not be displayed.
Not applicable
Oct 12, 2015
09:39 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 12, 2015
09:39 PM
solved solved solved solved
This widget could not be displayed.