??? 11/05/04 03:13 Read: times |
#80411 - Try simplifying Responding to: ???'s previous message |
Trying simplifying the INTISP routine. It's a little hard to see what's going on with the BUFFER flag but it's clear that in some situations P2 will not be updated with the latest value received. Try making INTISP as follows:
INTSPI: MOV A,SPSR ANL A,#SPIF JZ INTSPI MOV P2,SPDR RETI See if your LEDs stay stable with the above code. If they do then you have something wrong in the rest of your ISP code. It looks like you have some kind of 16-byte buffer there but it's not clear what it's for. It looks you store 16 bytes from 60h through 6Fh but only update P2 after the 16th byte. Why not update it every time? And why are you bothering to store the 16 bytes in memory since it doesn't appear that any of them are used except the 16th byte? Regards, Craig Steiner |
Topic | Author | Date |
AT89S8252 SPI problem | 01/01/70 00:00 | |
Try simplifying | 01/01/70 00:00 | |
RE: Try simplifying | 01/01/70 00:00 | |
RE: Try simplifying | 01/01/70 00:00 | |
RE: AT89S8252 SPI problem | 01/01/70 00:00 | |
RE: AT89S8252 SPI problem | 01/01/70 00:00 | |
handshake | 01/01/70 00:00 | |
RE: AT89S8252 SPI problem![]() | 01/01/70 00:00 |