CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Thanks to Hans Wedermeyer. , RJ Hamlett and Tomi

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Paul_B



Joined: 08 Sep 2003
Posts: 9
Location: Birmingham, UK

View user's profile Send private message

Thanks to Hans Wedermeyer. , RJ Hamlett and Tomi
PostPosted: Sat Mar 01, 2003 5:58 am     Reply with quote

I thought it appropriate although a little late now to say thanks to Hans Wedermeyer, RJ Hamlett, and Tomi whose replies to a message posted on this board steered me in the right direction to a problem that had me pulling my hair out at times.

By the way i did use the spi hardware and can receive 64 bit data at 1M/bits/s (well thats what i tested up to) using int_ssp and read_spi().

Well thanks guys.

And i'd better thanks to the likes of PCM Programmer also because his previous replies have also been helpful to me.

And sorry to everone else for taking up space on this message board with an off topic post.
___________________________
This message was ported from CCS's old forum
Original Post ID: 12253
Neutone



Joined: 08 Sep 2003
Posts: 839
Location: Houston

View user's profile Send private message

Re: Thanks to Hans Wedermeyer. , RJ Hamlett and Tomi
PostPosted: Sat Mar 01, 2003 8:34 am     Reply with quote

:=I thought it appropriate although a little late now to say thanks to Hans Wedermeyer, RJ Hamlett, and Tomi whose replies to a message posted on this board steered me in the right direction to a problem that had me pulling my hair out at times.
:=
:=By the way i did use the spi hardware and can receive 64 bit data at 1M/bits/s (well thats what i tested up to) using int_ssp and read_spi().
:=
:=Well thanks guys.
:=
:=And i'd better thanks to the likes of PCM Programmer also because his previous replies have also been helpful to me.
:=
:=And sorry to everone else for taking up space on this message board with an off topic post.

Why not post an example? I'm interested in moving 16 bytes of data in both directions at the same time.
___________________________
This message was ported from CCS's old forum
Original Post ID: 12254
Paul_B



Joined: 08 Sep 2003
Posts: 9
Location: Birmingham, UK

View user's profile Send private message

Re: Thanks to Hans Wedermeyer. , RJ Hamlett and Tomi
PostPosted: Mon Mar 03, 2003 5:04 am     Reply with quote

:=:=I thought it appropriate although a little late now to say thanks to Hans Wedermeyer, RJ Hamlett, and Tomi whose replies to a message posted on this board steered me in the right direction to a problem that had me pulling my hair out at times.
:=:=
:=:=By the way i did use the spi hardware and can receive 64 bit data at 1M/bits/s (well thats what i tested up to) using int_ssp and read_spi().
:=:=
:=:=Well thanks guys.
:=:=
:=:=And i'd better thanks to the likes of PCM Programmer also because his previous replies have also been helpful to me.
:=:=
:=:=And sorry to everone else for taking up space on this message board with an off topic post.
:=
:=Why not post an example? I'm interested in moving 16 bytes of data in both directions at the same time.

Here is my code for receiving and displaying 32 bits of data, don't know about sending. All previous code on this board was really complex compared to this, maybe people are scared to give things away, hence private reply.

Sending and recieving data at the same time? Is it possible to do that with SPI. Let me know if you can do it.

Don't know if this is of any use to you but it works fine for my application.

Let me know what you think.

int rx[4];
int i=0;


void main()
{

lcd_init();


setup_spi(SPI_SLAVE | SPI_L_to_H | SPI_SS_DISABLED);

delay_ms(100); //stabilization time for PIC


disable_interrupts ( GLOBAL );
enable_interrupts ( GLOBAL );
enable_interrupts (INT_SSP);

delay_ms(100);

do
{

if(i==3){
printf(lcd_putc,"\f a: \%x \%x \%x \%x ",rx[0], rx[1], rx[2], rx[3]);
delay_ms(1000);
lcd_putc("\f");
i=0;
}

}
while(1);
}



#INT_SSP
spi_isr()
{
rx[i]=spi_read();

i++;

}
___________________________
This message was ported from CCS's old forum
Original Post ID: 12302
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group