hi i working on spi protocol using at89s8252 ...i want to know what is th role of spcr and spdr...i mean what is the function of spi controle register and spi data register and what is their effect during and after spi transmission ...i have read the datasheet of at89s8252 and some pdfs os spi protocol....so plz help me out..thanx in advance
also give sum idea how to visualise the spdr value in tool...because when i am debugingthe code in keil-2 spdr value is not showing plz help me about this......
hi i use only microchip
basically, to use spi you have to configure two register SSPSTAT and SSPCON.SSPCON register is used to set the spi mode if either slave or master, the sampling, the rising or the falling edge clock...etc
The SSPSTAT register is used to check if the data was sent or not.pretty easy in case of pic microntroller.
i did a little project with assembly,you can find it here https://www.edaboard.com/threads/293925/
yes sir thank and its good that u r a expert...plz help me how to visualize the spdr register value in tool of keil -2 when m debuging my code....i mean how to visualize the data soterd in spdr register ..
yes sir thank and its good that u r a expert...plz help me how to visualize the spdr register value in tool of keil -2 when m debuging my code....i mean how to visualize the data soterd in spdr register ..
The SPDR register is a read sensitive type. So you can't see it on Reg window. Instead you can read the Rx data through a local variable by read it...
i.e tmp = SPDR;
I don't know the exact Assembly programming. You could move the SFR--> SPDR to a general purpose register and watch it on your tool. If it's in C program i can help you...