SPI (software based) code or reference needed for AT89c51

Discussion in 'Embedded Systems and Microcontrollers' started by tension885, Apr 6, 2008.

  1. tension885

    Thread Starter New Member

    Apr 6, 2008
    1
    0
    hi,
    i need some good reference or sample code for software based SPI
    for AT89c51 (only for master side).i have searched but not getting code or reference which show how to implement SPI in software. so please help me with your valuable
    suggestions and ideas or experience.
    also what is SPI mode 0,0 and 1,1?? how they will be implemented in software?

    please do reply
     
  2. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    This link will take you to an application note on the SPI interface at the ATMEL website. It may not be exactly what you are looking for but the information it contains could serve as a starting point for your coding efforts.

    hgmjr
     
  3. myztic_man

    Member

    Apr 27, 2009
    21
    0
  4. Arm_n_Legs

    Active Member

    Mar 7, 2007
    183
    10
    What do you mean software based SPI? Are you trying to generating signal on a 8051 without a built-in SPI hardware? Then you would need to have a good understanding of the SPI protocol and simply pulse the I/O pins to generate the required signals.
     
  5. GetDeviceInfo

    Senior Member

    Jun 7, 2009
    1,571
    230
Loading...