Author |
Message |
Topic: how to transmit data in spi slave mode? |
nahumof
Replies: 50
Views: 114771
|
Forum: General CCS C Discussion Posted: Fri May 13, 2011 3:41 pm Subject: how to transmit data in spi slave mode? |
i guess that´s it...
i´m using SPI with software spi for master using #use spi() library and using SPI HW for slave using setup_spi(SPI_SLAVE |SPI_MODE_1_1); .... |
Topic: how to transmit data in spi slave mode? |
nahumof
Replies: 50
Views: 114771
|
Forum: General CCS C Discussion Posted: Fri May 13, 2011 12:54 pm Subject: how to transmit data in spi slave mode? |
i really don't know the cause... but i try with all the mode configurations for master and slave and works with mode 3 for the slave and any mode for master!!! it just don't care!!!
master
#use sp ... |
Topic: how to transmit data in spi slave mode? |
nahumof
Replies: 50
Views: 114771
|
Forum: General CCS C Discussion Posted: Fri May 13, 2011 9:56 am Subject: how to transmit data in spi slave mode? |
ok PCM tks
well after a few test i discover that my program send a byte (0x0f)to the slave and save a returning byte in B:
B=SPI_XFER(0x0f);
i receive the byte in the slave and return the same ... |
Topic: how to transmit data in spi slave mode? |
nahumof
Replies: 50
Views: 114771
|
Forum: General CCS C Discussion Posted: Thu May 12, 2011 10:52 am Subject: how to transmit data in spi slave mode? |
tks for the answer and the info
and yes i understoot everything you say but:
the master send 0xff
a=spi_xfer(0xff);
and the slave get the 0xff and save into resp and return 0x05 to the master ... |
Topic: how to transmit data in spi slave mode? |
nahumof
Replies: 50
Views: 114771
|
Forum: General CCS C Discussion Posted: Wed May 11, 2011 8:36 pm Subject: how to transmit data in spi slave mode? |
i need to return the same data i'm sending
i also try with spi_read();
with no results... |
Topic: how to transmit data in spi slave mode? |
nahumof
Replies: 50
Views: 114771
|
Forum: General CCS C Discussion Posted: Wed May 11, 2011 7:55 pm Subject: mmm |
Hi I had to rebuild my circuit because I was using 2 PIC'S comunicating with software SPI, after a few bumps I get the answer. There is no way to get a software slave spi!!! using #use_SPI.
So I ... |
Topic: how to transmit data in spi slave mode? |
nahumof
Replies: 50
Views: 114771
|
Forum: General CCS C Discussion Posted: Fri Apr 15, 2011 9:17 am Subject: how to transmit data in spi slave mode? |
ok tks |
Topic: how to transmit data in spi slave mode? |
nahumof
Replies: 50
Views: 114771
|
Forum: General CCS C Discussion Posted: Fri Apr 15, 2011 9:05 am Subject: how to transmit data in spi slave mode? |
so if I'm going to use ISR the best thing to do is work with the register directly...
I GET THIS .LST!!!
ISR SPI READ
.................... #int_ssp
.................... void ssp_isr(voi ... |
Topic: how to transmit data in spi slave mode? |
nahumof
Replies: 50
Views: 114771
|
Forum: General CCS C Discussion Posted: Thu Apr 14, 2011 3:33 pm Subject: how to transmit data in spi slave mode? |
jejeje good to know
tks pcm |
Topic: how to transmit data in spi slave mode? |
nahumof
Replies: 50
Views: 114771
|
Forum: General CCS C Discussion Posted: Wed Apr 13, 2011 6:25 pm Subject: how to transmit data in spi slave mode? |
whats the advantage to use directly the register SSPBUF like the program of PCM (for select comands) instead use read spi and write spi
tks |
Topic: Software SPI help !!! |
nahumof
Replies: 18
Views: 20288
|
Forum: General CCS C Discussion Posted: Tue Apr 12, 2011 4:02 pm Subject: Software SPI help !!! |
tks ckielstra
i will try to use uart or rebuild the hardware... i was using spi because i got 6 devices 1 pic master 2 slaves and 3 devices slaves spi.
master
1 master 18f4550 USB
slave
1 s ... |
Topic: Software SPI help !!! |
nahumof
Replies: 18
Views: 20288
|
Forum: General CCS C Discussion Posted: Sat Apr 09, 2011 5:27 pm Subject: Software SPI help !!! |
tx for fix the link |
Topic: Software SPI help !!! |
nahumof
Replies: 18
Views: 20288
|
Forum: General CCS C Discussion Posted: Sat Apr 09, 2011 4:46 pm Subject: Software SPI help !!! |
Yes of course I see that is master spi code slaves don't make a clock
I was meaning apply something like that for polling using ssp interrupt but now I'm awareonly by a hardware SPI slave so maybe t ... |
Topic: Software SPI help !!! |
nahumof
Replies: 18
Views: 20288
|
Forum: General CCS C Discussion Posted: Sat Apr 09, 2011 3:34 pm Subject: Software SPI help !!! |
ok tks for the reply
I'm using 18f4550 as master using software SPI works fine, and 16f876 as slave spi also sw fail.
I can't use hardware spi because its being used by another purpose in a alre ... |
Topic: Software SPI help !!! |
nahumof
Replies: 18
Views: 20288
|
Forum: General CCS C Discussion Posted: Sat Apr 09, 2011 10:09 am Subject: spi slave |
hi all
I'm intending to do some communication between 2 pics by software spi
sosoftware SPI should only be used for the Master
then what is the use of #use spi(slave.......)? doesn't work as slave ... |
|