??? 04/04/07 07:10 Modified: 04/04/07 07:12 Read: times |
#136559 - writing IS broken - but in several ways Responding to: ???'s previous message |
Andy Neil said:
How do you know that it's the writing specifically that's broken?
Maybe it writes OK, but the reading is broken? Andy, Have a look at what Asif wrote: Asif Ali said: Well the problem is that i the Port-1 (P1) is not becomming 00h, and Held to FFh which is default,
[...] LCALL WRITE ;Calling the Write Routine MOV P1,#000H ;Clearing the P1 to confirm data written Succesfully AGAIN: JB TST,$ ;Wait until the TST button to Ground Clearly, if he can't see 0 at P1 (and the TST is not bouncing wildly while idle, which is quite unlikely) - clearly the code is stuck in waiting for ACK in WRITE. This would indicate either some fatal problem with hardware, or the timing problem. However, there is also an another problem which would not come clear until Asif will remoev the wait for TST button press, namely, that there is not sufficient delay (or polling) to ensure the physical data write into EEPROM is finished (delay of several ms). JW PS. Asif, please use spaces instead of tabs to format your code |