2003-04-01 02:18 PM
2003-03-30 01:29 AM
Hi everybody,
I have some questions. 1. I need to declare an array of 255 bytes in the ROM of the ST7. How can I do that? And how can I use it? 2. I need to program the EEPROM of the ST7c2334 and the FLASH. I have to write all '0' and all '1' and then read it again. How can I do that? thanks Chr2003-03-30 02:31 PM
First question
#pragma INTO_ROM const char data[256] = { ... }2003-03-30 02:52 PM
second question
1. set LAT bit in CSR of EEPROM, then write all ''0'' or ''1'', 2. After you finish the write operation, you set PGM bit in CSR of EEPROM until PGM become 0. 3. clear LAT bit ,you can read the EEPROM2003-03-30 03:05 PM
Sorry!, first question my reply is C code assembler is:
segment 'rom' .data DC.B $10,$AA,$00,$BB,50,%11111101,10,$FF DC.B ...2003-04-01 05:01 AM
Quote:
On 2003-03-31 04:22, DiDiDuDu wrote: second question 1. set LAT bit in CSR of EEPROM, then write all ''0'' or ''1'', 2. After you finish the write operation, you set PGM bit in CSR of EEPROM until PGM become 0. 3. clear LAT bit ,you can read the EEPROM How can I set that bit ? the EECSR is on adress $002C So I should do : bset $002C,#1 ? And how do I write? The EEprom is on 0C00h => ld A,#00 ld 0C00h,A ld OCO1,A ... ? And how can I program the flash memory? thank you Christophe2003-04-01 02:18 PM
bset $002C,#1 ;Set LAT bit to write mode
ld A,#00 ld 0C00h,A ld OCO1,A ... bset $002C,#0 ;Set PGM bit to program .WAIT BTJF $002C,#0,OVER ;Wait PGM bit be cleared by harewre JRA WAIT .OVER In your sources you can not program the flash memory.