While workin with AT51RD2, we are facing a weird problem. The Code that is working well with AT89C51 doesnt wok with AT89C51RD2. we are not using any sfrs that are specifically used by RD2. It is a plain IO routine made in assembly. When we include the 89C51ix2.inc file it shows errors while compiling that, it shows the redefination error for the SFRs that are used in the 89c51 assembly routine. Can u tell us that in assembly how can eliminate the redfination error. thanx in advance
There was a thread about this recently. I seem to remember that you have to tell the assembler not to automatically include the standard 8051 definitions.
Thanx Mr. Duncanson, the problem has been sloved the routine can be compiled with the 89C51icx2.inc. We trying to interface AD7730 24 bit ADC with 89C51RD2 over the SPI bus. We earlier tried with 89C52 without the SPI bus by bit banging. it works well. But when we try to interface 89C51RD2 over the SPI bus with AD7730, the initialization of AD7730, works well i mean we are able to initialise the adc in countinuous read mode and read 3 bytes from the ADC the problem is the reading that we recieve from the AD7730 fluctuate drastically from LSB to MSB. the RDYpin of AD7730 is used to interrupt the controller so that it can start the read from the ADC. If we try on the AD7730 without RD2and SPI it works well. even if the 89C52 bitbanging routine is loaded in RD2 it shows the same fluctuations. Can u please help us in the above problem.
cross posted at http://www.8052.com/forum/read.phtml?id=90667