EmbeddedRelated.com
Forums

Bit banging for 8051, SPI

Started by methi June 12, 2005
Hi,
Does anybody have any idea about bit banging using SPI interface for
microcontrollers....esp the 8051...

Thank you,
Methi

methi wrote:
> Hi, > Does anybody have any idea about bit banging using SPI interface for > microcontrollers....esp the 8051...
Do you mean as a SPI Master, or a SPI Slave ? -jg
On 11 Jun 2005 22:14:03 -0700, "methi" <gmethi@gmail.com> wrote:

>Hi, >Does anybody have any idea about bit banging using SPI interface for >microcontrollers....esp the 8051...
SPI is dead simple to implement in software as a master. Where are you getting stuck? -- Rich Webb Norfolk, VA

Jim Granville wrote:
> methi wrote: > > Hi, > > Does anybody have any idea about bit banging using SPI interface for > > microcontrollers....esp the 8051... > > Do you mean as a SPI Master, or a SPI Slave ? > > -jg
Hi, I am interested in SPI Master for an 8051 Thanks, Methi

Rich Webb wrote:
> On 11 Jun 2005 22:14:03 -0700, "methi" <gmethi@gmail.com> wrote: > > >Hi, > >Does anybody have any idea about bit banging using SPI interface for > >microcontrollers....esp the 8051... > > SPI is dead simple to implement in software as a master. Where are you > getting stuck? > > -- > Rich Webb Norfolk, VA
Hi, I was trying to use the SPI interface in 8051 but am not getting the rquired output. So I thought I shall try bite banging instead... Was wondering if I would get some ideas... Thank you, Methi
In article <1118604925.523578.313760@o13g2000cwo.googlegroups.com>, 
methi <gmethi@gmail.com> writes
> > >Rich Webb wrote: >> On 11 Jun 2005 22:14:03 -0700, "methi" <gmethi@gmail.com> wrote: >> >> >Hi, >> >Does anybody have any idea about bit banging using SPI interface for >> >microcontrollers....esp the 8051... >> >> SPI is dead simple to implement in software as a master. Where are you >> getting stuck? >> >> -- >> Rich Webb Norfolk, VA > > >Hi, > >I was trying to use the SPI interface in 8051 but am not getting the >rquired output. > >So I thought I shall try bite banging instead... > >Was wondering if I would get some ideas... >
Which 8051 device are you using, standard 8051 does not have an SPI interface? to what SPI slave device? -- Tim Mitchell
Hi Tim,

I am using Cygnal's C8051F022 which has an SPI interface.

I am using a three-wire transfer mode with the lines MOSI,SCK and MISO.

My SPI slave is an FPGA.

Thank you,

Methi


Tim Mitchell wrote:
> In article <1118604925.523578.313760@o13g2000cwo.googlegroups.com>, > methi <gmethi@gmail.com> writes > > > > > >Rich Webb wrote: > >> On 11 Jun 2005 22:14:03 -0700, "methi" <gmethi@gmail.com> wrote: > >> > >> >Hi, > >> >Does anybody have any idea about bit banging using SPI interface for > >> >microcontrollers....esp the 8051... > >> > >> SPI is dead simple to implement in software as a master. Where are you > >> getting stuck? > >> > >> -- > >> Rich Webb Norfolk, VA > > > > > >Hi, > > > >I was trying to use the SPI interface in 8051 but am not getting the > >rquired output. > > > >So I thought I shall try bite banging instead... > > > >Was wondering if I would get some ideas... > > > Which 8051 device are you using, standard 8051 does not have an SPI > interface? > to what SPI slave device? > -- > Tim Mitchell
In article <1118670541.107425.81290@f14g2000cwb.googlegroups.com>, methi 
<gmethi@gmail.com> writes
>Tim Mitchell wrote: >> In article <1118604925.523578.313760@o13g2000cwo.googlegroups.com>, >> methi <gmethi@gmail.com> writes >> > >> > >> >Rich Webb wrote: >> >> On 11 Jun 2005 22:14:03 -0700, "methi" <gmethi@gmail.com> wrote: >> >> >> >> >Hi, >> >> >Does anybody have any idea about bit banging using SPI interface for >> >> >microcontrollers....esp the 8051... >> >> >> >> SPI is dead simple to implement in software as a master. Where are you >> >> getting stuck? >> >> >> >> -- >> >> Rich Webb Norfolk, VA >> > >> > >> >Hi, >> > >> >I was trying to use the SPI interface in 8051 but am not getting the >> >rquired output. >> > >> >So I thought I shall try bite banging instead... >> > >> >Was wondering if I would get some ideas... >> > >> Which 8051 device are you using, standard 8051 does not have an SPI >> interface? >> to what SPI slave device? > >I am using Cygnal's C8051F022 which has an SPI interface. > >I am using a three-wire transfer mode with the lines MOSI,SCK and MISO. > >My SPI slave is an FPGA. >
So can you describe what you are doing now, and what is happening (or not happening)? -- Tim Mitchell
On 13 Jun 2005 06:49:01 -0700, methi wrote:

> Hi Tim, > > I am using Cygnal's C8051F022 which has an SPI interface. > > I am using a three-wire transfer mode with the lines MOSI,SCK and MISO. > > My SPI slave is an FPGA. > > Thank you, > > Methi
I've bit-banged it on a Cygnal C8051F061 and as Rich Webb said earlier it is funnybook simple. My guess is that it should be even easier using the on-chip SPI hardware. Look for App notes on Silabs.com and user discussion on www.Cygnal.org forums. Bob
Hello,

I actually tried using the SPI interface in the micro itself..But I am
not receiving the right data on the MOSI line...The SCK is fine...its
110.6khz.....
My slave which is an FPGA takes in the serial data and converts it into
parallel...The FPGA is working fine..

I have initialized my SPI registers, port 0...etc..

I am right now sending two bytes of data....one following the other to
the slave..

When I probe my MOSI line, I see the wrong data being sent to the
FPGA..

SO I thought that I will instead go for the BIT BANGING method....

Thank you,

Methi

Tim Mitchell wrote:
> In article <1118670541.107425.81290@f14g2000cwb.googlegroups.com>, methi > <gmethi@gmail.com> writes > >Tim Mitchell wrote: > >> In article <1118604925.523578.313760@o13g2000cwo.googlegroups.com>, > >> methi <gmethi@gmail.com> writes > >> > > >> > > >> >Rich Webb wrote: > >> >> On 11 Jun 2005 22:14:03 -0700, "methi" <gmethi@gmail.com> wrote: > >> >> > >> >> >Hi, > >> >> >Does anybody have any idea about bit banging using SPI interface for > >> >> >microcontrollers....esp the 8051... > >> >> > >> >> SPI is dead simple to implement in software as a master. Where are you > >> >> getting stuck? > >> >> > >> >> -- > >> >> Rich Webb Norfolk, VA > >> > > >> > > >> >Hi, > >> > > >> >I was trying to use the SPI interface in 8051 but am not getting the > >> >rquired output. > >> > > >> >So I thought I shall try bite banging instead... > >> > > >> >Was wondering if I would get some ideas... > >> > > >> Which 8051 device are you using, standard 8051 does not have an SPI > >> interface? > >> to what SPI slave device? > > > >I am using Cygnal's C8051F022 which has an SPI interface. > > > >I am using a three-wire transfer mode with the lines MOSI,SCK and MISO. > > > >My SPI slave is an FPGA. > > > So can you describe what you are doing now, and what is happening (or > not happening)? > > -- > Tim Mitchell