??? 09/21/04 12:07 Read: times |
#77791 - Problem is on P1.6 (MISO) Responding to: ???'s previous message |
check the reset level. MCU must be in reset state during serial downloading. It means, pin 9 should be provided with high level or VCC. Yes, that is working as expected. Reset is high when SP89 tries to program the part. pass the time before downloading for crystal freqence is stabilized. Not a problem. Once power is applied it takes me several seconds to execute the Sp89 command on the computer so I'm sure crystal is stable by then. - CLK frequency from PC must be less then OSC/40. Here it means: 276480Hz or less. I don't have a scope so I can't tell you the exact speed, but Sp89 has a parameter to indicate the speed of the crystal so that it can speed or slow down as appropriate. Additionally, during my tests I've slowed the thing down so far that it isn't sending more than about 4 or 5 bits per second so I'm well below the maximum threshold. CHECK Serial Programming Fuse. This fuse disables programming via SPI. It may be that you programmed this bit somehow with parallel programmer and serial downloading is not possible anymore. The Serial Programming Fuse can only be programmed or erased in the Parallel Programming Mode. I did that and I have made sure that SPI program is enabled using parallel programming mode. Again, what is worth noting is that when I move the reset line to P1.4 and run my monitor program on the AT89S8252 it seems to receive data from the PC just fine but the data I manually send back to the PC is garbled as described in my original post. I'm not sure I even need to focus on the details of the SPI-based ISP yet. For the time being the data I send manually on P1.6 (MISO) is not being received by the PC as I would expect. Until my program can send data on P1.6 to the PC accurately I don't think I have much hope for ISP programming to work. Likewise, once I fix the problem that is causing my program to fail to send data out P1.6 I think the problem with ISP programming will be resolved. Regards, Craig Steiner |