Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] [Moved] spi,spcr,spdr, at89s8252

Status
Not open for further replies.

debabrta kar

Member level 5
Joined
May 20, 2013
Messages
86
Helped
7
Reputation
16
Reaction score
5
Trophy points
1,288
Location
india
Activity points
1,858
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
 

debabrta kar

Member level 5
Joined
May 20, 2013
Messages
86
Helped
7
Reputation
16
Reaction score
5
Trophy points
1,288
Location
india
Activity points
1,858
Re: spi,spcr,spdr, at89s8252

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......
 

kgavionics

Full Member level 3
Joined
Jun 12, 2012
Messages
158
Helped
7
Reputation
14
Reaction score
10
Trophy points
1,298
Location
Alberta.Canada
Activity points
2,359
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/
 

debabrta kar

Member level 5
Joined
May 20, 2013
Messages
86
Helped
7
Reputation
16
Reaction score
5
Trophy points
1,288
Location
india
Activity points
1,858
Re: spi,spcr,spdr, at89s8252

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 ..
 

kgavionics

Full Member level 3
Joined
Jun 12, 2012
Messages
158
Helped
7
Reputation
14
Reaction score
10
Trophy points
1,298
Location
Alberta.Canada
Activity points
2,359
Re: spi,spcr,spdr, at89s8252

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 ..
i'm very sorry,because i only know Microchip micro-controller, i don't have any clue about Atmega.
 

debabrta kar

Member level 5
Joined
May 20, 2013
Messages
86
Helped
7
Reputation
16
Reaction score
5
Trophy points
1,288
Location
india
Activity points
1,858
ok sir thank you......plz any1 who have worked on at89s8252 plz suggest me...............
 

debabrta kar

Member level 5
Joined
May 20, 2013
Messages
86
Helped
7
Reputation
16
Reaction score
5
Trophy points
1,288
Location
india
Activity points
1,858
yes sir i know but how to visualize value of SPDR in tool...........
 

debabrta kar

Member level 5
Joined
May 20, 2013
Messages
86
Helped
7
Reputation
16
Reaction score
5
Trophy points
1,288
Location
india
Activity points
1,858
i am using keil-2 and in debugging the spdr reg value is not showing...............
 

mathespbe

Full Member level 3
Joined
Jul 10, 2013
Messages
186
Helped
45
Reputation
90
Reaction score
44
Trophy points
28
Location
India, Tamilnadu, Coimbatore
Activity points
866
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;
 

debabrta kar

Member level 5
Joined
May 20, 2013
Messages
86
Helped
7
Reputation
16
Reaction score
5
Trophy points
1,288
Location
india
Activity points
1,858
actually i am using assembly langugage so help me how to read it...
 

mathespbe

Full Member level 3
Joined
Jul 10, 2013
Messages
186
Helped
45
Reputation
90
Reaction score
44
Trophy points
28
Location
India, Tamilnadu, Coimbatore
Activity points
866
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...
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top