Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
softspi bug?
16-07-2015, 09:38 AM,
#1
softspi bug?
Code:
in spi.c

void SPI_setPin(u8 module, u8 sda, u8 sck)
{
    if (module == SPISW)
    {
        SPI[module].sda = sda;
        SPI[module].sck = sck;
        output(SPI[module].sda);
        output(SPI[module].sck);
    }
}

can not find sdi sdo ( sck )


but sda and sck look like i2c bus.

is a bug?
Reply
17-07-2015, 09:10 AM, (This post was last modified: 17-07-2015, 09:27 AM by pingotg.)
#2
RE: softspi bug?
What do you mean? I cannot understand you.

Also, you failed to say your board, OS, Pinguino version etc.

John
Reply
19-07-2015, 11:00 AM,
#3
RE: softspi bug?
hello

working on pinguino DIY mx270 os windows 8.1 , pinguino ide11

i know spi has 3 pin ( SCK for clok , MOSI  master out slave input, MISO master input return for slave)

in soft spi i see only sda for data out (i think) and SCK for clock right?
Reply
19-07-2015, 07:54 PM,
#4
RE: softspi bug?
Sounds like I2C.

John
Reply
19-07-2015, 09:29 PM,
#5
RE: softspi bug?
Hi

I checked, very strange routine, I think is used to control a Write Only device.

Instead of these routines you can use my library spiloc.c.


Bye Bye, Moreno
Reply
20-07-2015, 08:21 PM,
#6
RE: softspi bug?
@moreno i like tu try spiloc.c , where i can find it? (need read/write spi)
Reply
20-07-2015, 09:47 PM,
#7
RE: softspi bug?
Hi

??? Is in the same place of spi.c library (libraries instead of core).

the PDL file is

Code:
SPILOC.init SPILoc_Init#include <SpiLoc.c>
SPILOC.begin SPILoc_Init#include <SpiLoc.c>
SPILOC.write SPILoc_Write#include <SpiLoc.c>
SPILOC.transfer SPILoc_Write#include <SpiLoc.c>
SPILOC.read SPILoc_Read#include <SpiLoc.c>

This library is used inside MCP23S17.c


Bye Bye, Moreno
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)