laktronics
Banned
increase code memory of 89v51rd2
Hi,
I think your code should work, the leading zeros are acceptable to the chip, so long as DI is not high. Use a pull up to MISO since DO goes tristate at times.
1. You check your device is 93C46 and not 93C46A, the two are slightly different in operation.
2.When you are having hardware SPI, you can send and receive simultaneously 8bits. After writing a desired byte or a dummy byte, always look for SPIF to be true, clear SPIF and read SPIDAT if only required.
3. You can check for ready status after a byte write by sending a zero byte and looking for a nonzero received byte.Reading MISO may not work since the pins are configured as SPI.
4. You can set MISO once only in the beginning if required , mostly even that is not required since configuring as an SPI master will make all SPI bits to their required state. No need to define any output bit in 8051.
5. Check your code carefully.
Regards,
Laktronics
Hi,
I think your code should work, the leading zeros are acceptable to the chip, so long as DI is not high. Use a pull up to MISO since DO goes tristate at times.
1. You check your device is 93C46 and not 93C46A, the two are slightly different in operation.
2.When you are having hardware SPI, you can send and receive simultaneously 8bits. After writing a desired byte or a dummy byte, always look for SPIF to be true, clear SPIF and read SPIDAT if only required.
3. You can check for ready status after a byte write by sending a zero byte and looking for a nonzero received byte.Reading MISO may not work since the pins are configured as SPI.
4. You can set MISO once only in the beginning if required , mostly even that is not required since configuring as an SPI master will make all SPI bits to their required state. No need to define any output bit in 8051.
5. Check your code carefully.
Regards,
Laktronics