Hi everybody !
I'm currently working on a project with a ADuC847 and I would like to copy the content of SBUF (data register of UART) to SPIDAT (data register of SPI).
Here is a part of my code:
T3CON = 0x83; //9600 Baud rate
T3FD = 0x12;
SCON = 0x52; // UART enable, variable baud rate.
SPICON = 0x2C; // SPI enable, slave mode
while(!RI); //interrupt flag of UART (Set when SBUF is full)
if(ISPI==0 && RI==1)
SPIDAT = SBUF; // This line doesn't work. Value is still egual to 0
value = SPIDAT;
RI = 0;
ISPI = 0;
Someone would have any idea ?
thanks in advance,